Fix some armor modifiers being applicable to everything, crashing the game. #885

This commit is contained in:
Bernhard Bonigl committed 2014-08-21 21:42:44 +02:00
1 parent fa40865f6e
commit 8959a70387
1 file changed
+2 -5
@@ -30,11 +30,8 @@ public class AModBoolean extends ArmorMod
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
}