From 5973ea3565402503910afa99789835448be25f13 Mon Sep 17 00:00:00 2001 From: GearShocky Date: Mon, 10 Jul 2023 01:46:22 +0600 Subject: [PATCH] Fix funny blockpos checks for Android chargers --- .../ru/dbotthepony/mc/otm/block/tech/AndroidChargerBlock.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/tech/AndroidChargerBlock.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/tech/AndroidChargerBlock.kt index 93faa46bc..2ffc08985 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/tech/AndroidChargerBlock.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/tech/AndroidChargerBlock.kt @@ -57,10 +57,10 @@ class AndroidChargerBlock : RotatableMatteryBlock(Properties.of().destroyTime(2. override fun getStateForPlacement(context: BlockPlaceContext): BlockState? { val level = context.level - if (level.isOutsideBuildHeight(context.clickedPos + BlockPos(0, 0, 2))) return null + if (level.isOutsideBuildHeight(context.clickedPos + BlockPos(0, 2, 0))) return null for (i in 1 .. 2) { - val pos = context.clickedPos + BlockPos(0, 0, i) + val pos = context.clickedPos + BlockPos(0, i, 0) if (!level.getBlockState(pos).canBeReplaced(context)) return null }