Fix bound tools unreliably breaking blocks
This commit is contained in:
parent
830a6bcc36
commit
14267656cb
|
@ -65,11 +65,11 @@ public class ItemBoundAxe extends ItemBoundTool
|
|||
BlockStack blockStack = BlockStack.getStackFromPos(world, blockPos);
|
||||
|
||||
if (blockStack.getBlock().isAir(world, blockPos))
|
||||
break;
|
||||
continue;
|
||||
|
||||
BlockEvent.BreakEvent event = new BlockEvent.BreakEvent(world, blockPos, blockStack.getState(), player);
|
||||
if (MinecraftForge.EVENT_BUS.post(event) || event.getResult() == Event.Result.DENY)
|
||||
break;
|
||||
continue;
|
||||
|
||||
if (blockStack.getBlock().getBlockHardness(world, blockPos) != -1)
|
||||
{
|
||||
|
|
|
@ -70,11 +70,11 @@ public class ItemBoundPickaxe extends ItemBoundTool
|
|||
BlockStack blockStack = BlockStack.getStackFromPos(world, blockPos);
|
||||
|
||||
if (blockStack.getBlock().isAir(world, blockPos))
|
||||
break;
|
||||
continue;
|
||||
|
||||
BlockEvent.BreakEvent event = new BlockEvent.BreakEvent(world, blockPos, blockStack.getState(), player);
|
||||
if (MinecraftForge.EVENT_BUS.post(event) || event.getResult() == Event.Result.DENY)
|
||||
break;
|
||||
continue;
|
||||
|
||||
if (blockStack.getBlock() != null && blockStack.getBlock().getBlockHardness(world, blockPos) != -1)
|
||||
{
|
||||
|
|
|
@ -63,11 +63,11 @@ public class ItemBoundShovel extends ItemBoundTool
|
|||
BlockStack blockStack = BlockStack.getStackFromPos(world, blockPos);
|
||||
|
||||
if (blockStack.getBlock().isAir(world, blockPos))
|
||||
break;
|
||||
continue;
|
||||
|
||||
BlockEvent.BreakEvent event = new BlockEvent.BreakEvent(world, blockPos, blockStack.getState(), player);
|
||||
if (MinecraftForge.EVENT_BUS.post(event) || event.getResult() == Event.Result.DENY)
|
||||
break;
|
||||
continue;
|
||||
|
||||
if (blockStack.getBlock() != null && blockStack.getBlock().getBlockHardness(world, blockPos) != -1)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue