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;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class DungeonLoot extends WeightedRandomItem
|
public static class DungeonLoot extends WeightedRandomItem
|
||||||
{
|
{
|
||||||
private ItemStack itemStack;
|
private ItemStack itemStack;
|
||||||
|
@ -234,7 +234,7 @@ public class DungeonHooks
|
||||||
|
|
||||||
public boolean equals(ItemStack item, int min, int max)
|
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)
|
public boolean equals(ItemStack item)
|
||||||
|
@ -242,7 +242,7 @@ public class DungeonHooks
|
||||||
return item.isItemEqual(this.itemStack);
|
return item.isItemEqual(this.itemStack);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class DungeonMob extends WeightedRandomItem
|
public static class DungeonMob extends WeightedRandomItem
|
||||||
{
|
{
|
||||||
public String type;
|
public String type;
|
||||||
|
@ -251,7 +251,7 @@ public class DungeonHooks
|
||||||
super(weight);
|
super(weight);
|
||||||
this.type = type;
|
this.type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object target)
|
public boolean equals(Object target)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue