Fix adding multiple definitions for same item model again

This commit is contained in:
Eclipse 2024-12-12 16:21:42 +00:00
parent a4c17daf24
commit a80e90d648
No known key found for this signature in database
GPG key ID: 95E6998F82EC938A
2 changed files with 5 additions and 1 deletions

View file

@ -775,6 +775,11 @@ public class ItemRegistryPopulator {
}
} // TODO not a fan of how this looks
}
if (first.predicates().size() == second.predicates().size()) {
return -1; // If there's no preferred range predicate order and they both have the same amount of predicates, prefer the first
}
return second.predicates().size() - first.predicates().size();
}
}

View file

@ -59,7 +59,6 @@ import java.util.function.Function;
/**
* This is only a separate class for testing purposes so we don't have to load in GeyserImpl in ItemTranslator.
*/
@Slf4j
public final class CustomItemTranslator {
@Nullable