Merge branch 'master' into 1.19.4

This commit is contained in:
DBotThePony 2024-01-01 15:47:02 +07:00
commit 6dbd942626
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -6,7 +6,11 @@ package ru.dbotthepony.mc.otm.block
import com.google.common.collect.ImmutableMap
import net.minecraft.core.BlockPos
import net.minecraft.core.Direction
import net.minecraft.world.InteractionHand
import net.minecraft.world.InteractionResult
import net.minecraft.world.entity.player.Player
import net.minecraft.world.level.BlockGetter
import net.minecraft.world.level.Level
import net.minecraft.world.level.block.Block
import net.minecraft.world.level.block.EntityBlock
import net.minecraft.world.level.block.SoundType
@ -16,6 +20,7 @@ import net.minecraft.world.level.block.state.StateDefinition
import net.minecraft.world.level.block.state.properties.BooleanProperty
import net.minecraft.world.level.material.Material
import net.minecraft.world.level.material.PushReaction
import net.minecraft.world.phys.BlockHitResult
import net.minecraft.world.phys.shapes.BooleanOp
import net.minecraft.world.phys.shapes.CollisionContext
import net.minecraft.world.phys.shapes.Shapes
@ -57,6 +62,11 @@ abstract class CableBlock(properties: Properties) : MatteryBlock(properties) {
return getShapeForEachState { getShapeFor(it, halfCoreSize) }
}
@Suppress("OVERRIDE_DEPRECATION")
override fun use(blockState: BlockState, level: Level, blockPos: BlockPos, ply: Player, hand: InteractionHand, blockHitResult: BlockHitResult): InteractionResult {
return InteractionResult.PASS
}
companion object {
fun getShapeFor(it: BlockState, halfCoreSize: Double): VoxelShape {
val shapes = ArrayList<VoxelShape>()