aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0969-Fix-removing-recipes-from-RecipeIterator.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0969-Fix-removing-recipes-from-RecipeIterator.patch')
-rw-r--r--patches/server/0969-Fix-removing-recipes-from-RecipeIterator.patch8
1 files changed, 3 insertions, 5 deletions
diff --git a/patches/server/0969-Fix-removing-recipes-from-RecipeIterator.patch b/patches/server/0969-Fix-removing-recipes-from-RecipeIterator.patch
index 636f3d2440..a8f124b458 100644
--- a/patches/server/0969-Fix-removing-recipes-from-RecipeIterator.patch
+++ b/patches/server/0969-Fix-removing-recipes-from-RecipeIterator.patch
@@ -7,7 +7,7 @@ Subject: [PATCH] Fix removing recipes from RecipeIterator
public net.minecraft.world.item.crafting.RecipeManager byName
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java b/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java
-index 4e0f7564f04d5d566660a2623fb1b325e3b4e67c..39d2d67bf478beb4c72e41e6f59337893cf47e69 100644
+index 4e0f7564f04d5d566660a2623fb1b325e3b4e67c..ca0c82fdd7bd1c2055e84253d90b17857c51b771 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java
@@ -9,6 +9,7 @@ import org.bukkit.inventory.Recipe;
@@ -18,7 +18,7 @@ index 4e0f7564f04d5d566660a2623fb1b325e3b4e67c..39d2d67bf478beb4c72e41e6f5933789
public RecipeIterator() {
this.recipes = MinecraftServer.getServer().getRecipeManager().recipes.byType.entries().iterator();
-@@ -21,11 +22,19 @@ public class RecipeIterator implements Iterator<Recipe> {
+@@ -21,11 +22,17 @@ public class RecipeIterator implements Iterator<Recipe> {
@Override
public Recipe next() {
@@ -32,9 +32,7 @@ index 4e0f7564f04d5d566660a2623fb1b325e3b4e67c..39d2d67bf478beb4c72e41e6f5933789
@Override
public void remove() {
+ // Paper start - fix removing recipes from RecipeIterator
-+ if (this.currentRecipe instanceof org.bukkit.Keyed keyed) {
-+ MinecraftServer.getServer().getRecipeManager().byName.remove(org.bukkit.craftbukkit.util.CraftNamespacedKey.toMinecraft(keyed.getKey()));
-+ }
++ if (true) throw new UnsupportedOperationException();
+ // Paper end - fix removing recipes from RecipeIterator
this.recipes.remove();
}