Improve support for TropicalFishBucket

This commit is contained in:
Len 2026-07-30 08:15:40 -05:00
parent 23ab3747fd
commit a98b35d073

View File

@ -228,13 +228,19 @@ public class ItemMatcher {
matcherList.add(
(meta1, meta2) -> {
if (meta1 instanceof TropicalFishBucketMeta tropicalFishBucketMeta1 && meta2 instanceof TropicalFishBucketMeta tropicalFishBucketMeta2) {
if (tropicalFishBucketMeta1.hasVariant() != tropicalFishBucketMeta2.hasVariant()) {
if (tropicalFishBucketMeta1.hasVariant() && tropicalFishBucketMeta2.hasVariant()) {
if (tropicalFishBucketMeta1.getPattern() != tropicalFishBucketMeta2.getPattern()) {
return false;
}
return !tropicalFishBucketMeta1.hasVariant()
|| (tropicalFishBucketMeta1.getPattern() == tropicalFishBucketMeta2.getPattern()
&& tropicalFishBucketMeta1.getBodyColor().equals(tropicalFishBucketMeta2.getBodyColor())
&& tropicalFishBucketMeta1.getPatternColor().equals(tropicalFishBucketMeta2.getPatternColor()));
if (tropicalFishBucketMeta1.getBodyColor() != tropicalFishBucketMeta2.getBodyColor()) {
return false;
}
return tropicalFishBucketMeta1.getPatternColor() == tropicalFishBucketMeta2.getPatternColor();
}
// return !tropicalFishBucketMeta1.hasVariant()
// || (tropicalFishBucketMeta1.getPattern() == tropicalFishBucketMeta2.getPattern()
// && tropicalFishBucketMeta1.getBodyColor().equals(tropicalFishBucketMeta2.getBodyColor())
// && tropicalFishBucketMeta1.getPatternColor().equals(tropicalFishBucketMeta2.getPatternColor()));
}
return true;
}