This commit is contained in:
LexManos 2012-09-25 06:33:01 -07:00
parent 5d3371ab3b
commit 5285e1d918

View file

@ -16,7 +16,7 @@
- ItemStack var4 = new ItemStack(var3.getItem().getContainerItem()); - ItemStack var4 = new ItemStack(var3.getItem().getContainerItem());
+ ItemStack var4 = var3.getItem().getContainerItemStack(var3); + ItemStack var4 = var3.getItem().getContainerItemStack(var3);
+ +
+ if (var4.isItemStackDamageable() && var4.getItemDamage() > var4.getMaxDamage()) + if (var4.isItemStackDamageable() && var4.getItemDamage() >= var4.getMaxDamage())
+ { + {
+ MinecraftForge.EVENT_BUS.post(new PlayerDestroyItemEvent(thePlayer, var4)); + MinecraftForge.EVENT_BUS.post(new PlayerDestroyItemEvent(thePlayer, var4));
+ var4 = null; + var4 = null;