Add rotate method to lab lamp light
This commit is contained in:
parent
f737abd976
commit
5d7abb6ee8
@ -12,6 +12,7 @@ import net.minecraft.world.level.Level
|
||||
import net.minecraft.world.level.block.Block
|
||||
import net.minecraft.world.level.block.Blocks
|
||||
import net.minecraft.world.level.block.RenderShape
|
||||
import net.minecraft.world.level.block.Rotation
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
import net.minecraft.world.level.block.state.StateDefinition
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties
|
||||
@ -48,6 +49,12 @@ class LaboratoryLampLight : Block(Properties.of(Material.AIR).strength(-1.0F, 36
|
||||
return if (p_60558_.isHoldingItem(Items.LIGHT)) Shapes.block() else Shapes.empty()
|
||||
}
|
||||
|
||||
@Suppress("OVERRIDE_DEPRECATION")
|
||||
override fun rotate(blockState: BlockState, rotation: Rotation): BlockState {
|
||||
@Suppress("DEPRECATION")
|
||||
return super.rotate(blockState, rotation).setValue(RotatableMatteryBlock.FACING_FULL, rotation.rotate(blockState[RotatableMatteryBlock.FACING_FULL]))
|
||||
}
|
||||
|
||||
@Suppress("OVERRIDE_DEPRECATION")
|
||||
override fun getRenderShape(p_60550_: BlockState): RenderShape {
|
||||
return RenderShape.INVISIBLE
|
||||
|
Loading…
Reference in New Issue
Block a user