Don't make cables seem to be interactable
This commit is contained in:
parent
3db63aa589
commit
50112bfbaf
@ -6,7 +6,11 @@ package ru.dbotthepony.mc.otm.block
|
|||||||
import com.google.common.collect.ImmutableMap
|
import com.google.common.collect.ImmutableMap
|
||||||
import net.minecraft.core.BlockPos
|
import net.minecraft.core.BlockPos
|
||||||
import net.minecraft.core.Direction
|
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.BlockGetter
|
||||||
|
import net.minecraft.world.level.Level
|
||||||
import net.minecraft.world.level.block.Block
|
import net.minecraft.world.level.block.Block
|
||||||
import net.minecraft.world.level.block.EntityBlock
|
import net.minecraft.world.level.block.EntityBlock
|
||||||
import net.minecraft.world.level.block.SoundType
|
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.StateDefinition
|
||||||
import net.minecraft.world.level.block.state.properties.BooleanProperty
|
import net.minecraft.world.level.block.state.properties.BooleanProperty
|
||||||
import net.minecraft.world.level.material.MapColor
|
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.BooleanOp
|
||||||
import net.minecraft.world.phys.shapes.CollisionContext
|
import net.minecraft.world.phys.shapes.CollisionContext
|
||||||
import net.minecraft.world.phys.shapes.Shapes
|
import net.minecraft.world.phys.shapes.Shapes
|
||||||
@ -53,6 +58,11 @@ abstract class CableBlock(properties: Properties) : MatteryBlock(properties) {
|
|||||||
return getShapeForEachState { getShapeFor(it, halfCoreSize) }
|
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 {
|
companion object {
|
||||||
fun getShapeFor(it: BlockState, halfCoreSize: Double): VoxelShape {
|
fun getShapeFor(it: BlockState, halfCoreSize: Double): VoxelShape {
|
||||||
val shapes = ArrayList<VoxelShape>()
|
val shapes = ArrayList<VoxelShape>()
|
||||||
|
Loading…
Reference in New Issue
Block a user