Do not apply optimization to subclasses of ItemValue

This commit is contained in:
embeddedt 2025-06-05 18:08:19 -04:00
parent 2e0ec6ae9e
commit 20b3d8bffa
No known key found for this signature in database
GPG Key ID: A69433EC199B5613

View File

@ -22,7 +22,7 @@ public class IngredientValueDeduplicator {
});
public static Ingredient.Value deduplicate(Ingredient.Value value) {
if (value instanceof Ingredient.ItemValue) {
if (value.getClass() == Ingredient.ItemValue.class) {
synchronized (VALUES) {
return VALUES.addOrGet((Ingredient.ItemValue)value);
}