Fix comparing ItemStack tags for equality
This commit is contained in:
parent
f5e800d288
commit
c976aae00c
1 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue