Skip to content

Commit

Permalink
Fix broken bows being usable
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Nov 21, 2014
1 parent eea8d16 commit 81da663
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -138,6 +138,10 @@ public ItemStack onItemRightClick (ItemStack stack, World world, EntityPlayer pl
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));
Expand Down

0 comments on commit 81da663

Please sign in to comment.