Make modifiers only applicable to their valid types. Fix some inconsistencies with that. Might possibly contain bugs still.

This commit is contained in:
Bernhard Bonigl committed 2014-09-24 00:47:06 +02:00
1 parent 9d8e8128b0
commit 1cd4f214ff
7 files changed
+36 -4

No files matched your search

@@ -33,6 +33,6 @@ public abstract class ArmorMod extends ItemModifier
@Override
public boolean validType (IModifyable type)
{
return type.getModifyType().equals("Armor");
return type.getModifyType().equals("Armor") || type.getModifyType().equals("Clothing");
}
}
@@ -21,7 +21,7 @@ public class ModifyBuilder
boolean built = false;
for (ItemModifier mod : itemModifiers)
{
if (mod.matches(modifiers, copy))
if (mod.matches(modifiers, copy) && mod.validType(item))
{
built = true;
mod.addMatchingEffect(copy); //Order matters here