From 6a7b18cc6ba91f657c847107e73c1645f9a57100 Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Sun, 13 Jul 2025 18:27:00 -0400 Subject: [PATCH] Compare prototype maps using value equality --- .../neoforge/recipe/IngredientValueDeduplicator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neoforge/src/main/java/org/embeddedt/modernfix/neoforge/recipe/IngredientValueDeduplicator.java b/neoforge/src/main/java/org/embeddedt/modernfix/neoforge/recipe/IngredientValueDeduplicator.java index 441c2b91..06e1e046 100644 --- a/neoforge/src/main/java/org/embeddedt/modernfix/neoforge/recipe/IngredientValueDeduplicator.java +++ b/neoforge/src/main/java/org/embeddedt/modernfix/neoforge/recipe/IngredientValueDeduplicator.java @@ -35,11 +35,11 @@ public class IngredientValueDeduplicator { } private boolean areComponentsSame(ItemStack a, ItemStack b) { - // Compare using stricter logic than vanilla: require the prototype maps to be identity-equal, and require + // Compare using stricter logic than vanilla: require the prototype maps to be equal, and require // the values in the patch to also be identity-equal. This works around Neo allowing Holder.Reference objects // made with the server & client registries to be considered equal. if (a.getComponents() instanceof PatchedDataComponentMapAccessor aComps && b.getComponents() instanceof PatchedDataComponentMapAccessor bComps) { - if (aComps.mfix$getPrototype() != bComps.mfix$getPrototype()) { + if (!aComps.mfix$getPrototype().equals(bComps.mfix$getPrototype())) { return false; } var aPatch = aComps.mfix$getPatch();