Fix bound tools working on incorrect materials (#752)

This commit is contained in:
Nicholas Ignoffo 2016-05-27 23:03:32 -07:00
parent 6302ce8133
commit 36a5b7f6a1
3 changed files with 14 additions and 1 deletions

View file

@ -101,6 +101,9 @@ public class ItemBoundPickaxe extends ItemBoundTool implements IMeshProvider
if (blockStack.getBlock().isAir(blockStack.getState(), world, blockPos))
continue;
if (blockStack.getState().getMaterial() != Material.ROCK && !EFFECTIVE_ON.contains(blockStack.getBlock()))
continue;
BlockEvent.BreakEvent event = new BlockEvent.BreakEvent(world, blockPos, blockStack.getState(), player);
if (MinecraftForge.EVENT_BUS.post(event) || event.getResult() == Event.Result.DENY)
continue;