Fix broken bows being usable

This commit is contained in:
Bernhard Bonigl committed 2014-11-21 19:25:41 +01:00
1 parent eea8d165a4
commit 81da6633ed
1 file changed
+4
@@ -138,6 +138,10 @@ public abstract class ProjectileWeapon extends ToolCore implements IAccuracy, IW
if(getWindupTime(stack) == 0.0f)
return stack;
// broken tool?
if(stack.hasTagCompound() && stack.getTagCompound().hasKey(getBaseTagName()) && stack.getTagCompound().getCompoundTag(getBaseTagName()).getBoolean("Broken"))
return stack;
// only if ammo is present
if(searchForAmmo(player, stack) != null)
player.setItemInUse(stack, this.getMaxItemUseDuration(stack));