From 563d579aab418c6fd437255996a1c67221e31fde Mon Sep 17 00:00:00 2001 From: Justin Parsell Date: Sun, 21 Nov 2021 23:33:59 -0500 Subject: [PATCH] Updated onUse for better client handling --- src/main/java/me/parsell/wireddust/common/WDWireBlock.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/parsell/wireddust/common/WDWireBlock.java b/src/main/java/me/parsell/wireddust/common/WDWireBlock.java index f94bc04..9cce943 100644 --- a/src/main/java/me/parsell/wireddust/common/WDWireBlock.java +++ b/src/main/java/me/parsell/wireddust/common/WDWireBlock.java @@ -215,7 +215,10 @@ public class WDWireBlock extends Block{ @Override // For each link, set to break and update the blocks around me (above and below) public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit){ if(world.isClient) - return ActionResult.SUCCESS; + if(hasConnection(state) && !player.hasStackEquipped(EquipmentSlot.MAINHAND)) + return ActionResult.SUCCESS; + else + return ActionResult.PASS; if(player.abilities.allowModifyWorld) if(hasConnection(state) && !player.hasStackEquipped(EquipmentSlot.MAINHAND)) { Iterator dirItr = Direction.Type.HORIZONTAL.iterator();