From 07950ecf6fe9175185bd9426ef9dc8371206c027 Mon Sep 17 00:00:00 2001 From: Light_Quanta Date: Thu, 10 Jul 2025 15:12:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=81=E8=AE=B8=E5=8F=96=E5=8F=8D=E5=8D=93?= =?UTF-8?q?=E8=B6=8A=E7=89=A9=E5=93=81=E6=8E=A5=E5=8F=A3=E6=9C=9D=E5=90=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../superbwarfare/block/SuperbItemInterfaceBlock.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/atsuishio/superbwarfare/block/SuperbItemInterfaceBlock.java b/src/main/java/com/atsuishio/superbwarfare/block/SuperbItemInterfaceBlock.java index 9360ba676..785a00b7a 100644 --- a/src/main/java/com/atsuishio/superbwarfare/block/SuperbItemInterfaceBlock.java +++ b/src/main/java/com/atsuishio/superbwarfare/block/SuperbItemInterfaceBlock.java @@ -84,6 +84,9 @@ public class SuperbItemInterfaceBlock extends BaseEntityBlock { protected @NotNull ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) { if (stack.is(ModItems.CROWBAR.get()) || stack.is(ModTags.Items.WRENCHES_TAG) || stack.is(ModTags.Items.WRENCH_TAG)) { var facing = hitResult.getDirection(); + if (state.getValue(FACING) == facing) { + facing = facing.getOpposite(); + } level.setBlockAndUpdate(pos, state.setValue(FACING, facing)); return ItemInteractionResult.SUCCESS; }