From cb9454dadb0af7123ff7fa75c3602779a21f4576 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Mon, 10 Oct 2022 16:11:45 +0700 Subject: [PATCH] Make lab lamps face the player when placed --- src/main/kotlin/ru/dbotthepony/mc/otm/block/LaboratoryLamp.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/LaboratoryLamp.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/LaboratoryLamp.kt index 3f99ea112..14ad15748 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/LaboratoryLamp.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/LaboratoryLamp.kt @@ -108,7 +108,9 @@ class LaboratoryLamp(val invertRedstone: Boolean) : Block(Properties.of(Material } 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(