Fix moss/negative damage for javelins reducing ammo count #1229

This commit is contained in:
Bernhard Bonigl committed 2014-12-19 14:09:44 +01:00
1 parent 5422d3881a
commit 875aeb8b74
1 file changed
+2 -1
@@ -9,7 +9,8 @@ import tconstruct.library.weaponry.IAmmo;
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)