Skip to content

Commit

Permalink
Fix some armor modifiers being applicable to everything, crashing the…
Browse files Browse the repository at this point in the history
… game. #885
  • Loading branch information
bonii-xx committed Aug 21, 2014
1 parent fa40865 commit 8959a70
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/main/java/tconstruct/modifiers/armor/AModBoolean.java
Expand Up @@ -30,11 +30,8 @@ protected boolean canModify (ItemStack armor, ItemStack[] recipe)
if (!(i instanceof ArmorCore))
return false;
ArmorCore item = (ArmorCore) armor.getItem();
if (armorTypes.contains(item.armorPart))
{
NBTTagCompound tags = getModifierTag(armor);
return tags.getInteger("Modifiers") > 0;
}
if (!armorTypes.contains(item.armorPart))
return false;
NBTTagCompound tags = getModifierTag(armor);
return tags.getInteger("Modifiers") > 0 && !tags.getBoolean(key); //Will fail if the modifier is false or the tag doesn't exist
}
Expand Down

0 comments on commit 8959a70

Please sign in to comment.