Fix comparing ItemStack tags for equality

This commit is contained in:
Christian 2012-12-18 18:02:41 -05:00
parent f5e800d288
commit c976aae00c

View file

@ -199,7 +199,7 @@ public class DungeonHooks
}
return null;
}
public static class DungeonLoot extends WeightedRandomItem
{
private ItemStack itemStack;
@ -234,7 +234,7 @@ public class DungeonHooks
public boolean equals(ItemStack item, int min, int max)
{
return (min == minCount && max == maxCount && item.isItemEqual(this.itemStack));
return (min == minCount && max == maxCount && item.isItemEqual(this.itemStack) && ItemStack.areItemStackTagsEqual(item, itemStack));
}
public boolean equals(ItemStack item)
@ -242,7 +242,7 @@ public class DungeonHooks
return item.isItemEqual(this.itemStack);
}
}
public static class DungeonMob extends WeightedRandomItem
{
public String type;
@ -251,7 +251,7 @@ public class DungeonHooks
super(weight);
this.type = type;
}
@Override
public boolean equals(Object target)
{