Make lab lamps face the player when placed
This commit is contained in:
parent
c563a301dc
commit
cb9454dadb
@ -108,7 +108,9 @@ class LaboratoryLamp(val invertRedstone: Boolean) : Block(Properties.of(Material
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun getStateForPlacement(context: BlockPlaceContext): BlockState {
|
override fun getStateForPlacement(context: BlockPlaceContext): BlockState {
|
||||||
return super.getStateForPlacement(context)!!.setValue(BlockStateProperties.LIT, !invertRedstone).setValue(RotatableMatteryBlock.FACING_FULL, context.nearestLookingDirection)
|
return super.getStateForPlacement(context)!!
|
||||||
|
.setValue(BlockStateProperties.LIT, !invertRedstone)
|
||||||
|
.setValue(RotatableMatteryBlock.FACING_FULL, -context.nearestLookingDirection)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun appendHoverText(
|
override fun appendHoverText(
|
||||||
|
Loading…
Reference in New Issue
Block a user