Skip to content

Commit

Permalink
Fix moss/negative damage for javelins reducing ammo count #1229
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Dec 19, 2014
1 parent 5422d38 commit 875aeb8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/tconstruct/weaponry/WeaponryActiveToolMod.java
Expand Up @@ -9,7 +9,8 @@
public class WeaponryActiveToolMod extends ActiveToolMod {
@Override
public boolean damageTool(ItemStack stack, int damage, EntityLivingBase entity) {
if(stack.getItem() == TinkerWeaponry.javelin && stack.hasTagCompound()) {
// does not proc on tool 'healing'
if(stack.getItem() == TinkerWeaponry.javelin && stack.hasTagCompound() && damage > 0) {
NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool");
IAmmo ammo =(IAmmo)stack.getItem();
if(tags.getInteger("Damage") == 0)
Expand Down

0 comments on commit 875aeb8

Please sign in to comment.