diff --git a/src/main/java/gregtech/api/recipes/RecipeMap.java b/src/main/java/gregtech/api/recipes/RecipeMap.java index b782e5e9f4e..df5ae2d7d2e 100644 --- a/src/main/java/gregtech/api/recipes/RecipeMap.java +++ b/src/main/java/gregtech/api/recipes/RecipeMap.java @@ -437,7 +437,7 @@ public boolean removeRecipe(@NotNull Recipe recipe) { * @see GTRecipeHandler#removeAllRecipes(RecipeMap) */ @ApiStatus.Internal - void removeAllRecipes() { + protected void removeAllRecipes() { if (GroovyScriptModule.isCurrentlyRunning()) { this.lookup.getRecipes(false).forEach(this.getGroovyScriptRecipeMap()::addBackup); } diff --git a/src/main/java/gregtech/api/recipes/machines/RecipeMapAssemblyLine.java b/src/main/java/gregtech/api/recipes/machines/RecipeMapAssemblyLine.java index 7edeb9a7f62..5c23b88f6a2 100644 --- a/src/main/java/gregtech/api/recipes/machines/RecipeMapAssemblyLine.java +++ b/src/main/java/gregtech/api/recipes/machines/RecipeMapAssemblyLine.java @@ -61,6 +61,12 @@ public boolean removeRecipe(@NotNull Recipe recipe) { return true; } + @Override + protected void removeAllRecipes() { + super.removeAllRecipes(); + researchEntries.clear(); + } + @Override public void addDataStickEntry(@NotNull String researchId, @NotNull Recipe recipe) { if (researchId.contains("xmetaitem.")) { diff --git a/src/main/java/gregtech/common/items/behaviors/DataItemBehavior.java b/src/main/java/gregtech/common/items/behaviors/DataItemBehavior.java index 7be90f4d9ff..116dca7ee5d 100644 --- a/src/main/java/gregtech/common/items/behaviors/DataItemBehavior.java +++ b/src/main/java/gregtech/common/items/behaviors/DataItemBehavior.java @@ -6,11 +6,12 @@ import gregtech.api.recipes.RecipeMaps; import gregtech.api.recipes.machines.IResearchRecipeMap; import gregtech.api.util.AssemblyLineManager; +import gregtech.api.util.ItemStackHashStrategy; import net.minecraft.client.resources.I18n; import net.minecraft.item.ItemStack; -import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; +import it.unimi.dsi.fastutil.objects.ObjectOpenCustomHashSet; import org.jetbrains.annotations.NotNull; import java.util.Collection; @@ -41,7 +42,7 @@ public void addInformation(@NotNull ItemStack itemStack, List lines) { .getDataStickEntry(researchId); if (recipes != null && !recipes.isEmpty()) { lines.add(I18n.format("behavior.data_item.assemblyline.title")); - Collection added = new ObjectOpenHashSet<>(); + Collection added = new ObjectOpenCustomHashSet<>(ItemStackHashStrategy.comparingAllButCount()); for (Recipe recipe : recipes) { ItemStack output = recipe.getOutputs().get(0); if (added.add(output)) {