diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/Cables.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/Cables.kt index d0405c814..50b6a759a 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/Cables.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/Cables.kt @@ -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 @@ -15,6 +19,7 @@ import net.minecraft.world.level.block.state.BlockState import net.minecraft.world.level.block.state.StateDefinition import net.minecraft.world.level.block.state.properties.BooleanProperty import net.minecraft.world.level.material.MapColor +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 @@ -53,6 +58,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()