diff options
author | Spottedleaf <[email protected]> | 2024-10-25 12:47:52 -0700 |
---|---|---|
committer | Spottedleaf <[email protected]> | 2024-10-25 13:05:26 -0700 |
commit | e4efb590e49d30c9abe606838572aa5b4e9b5572 (patch) | |
tree | 9b60f27fd5f94daa2ea0a24edef90eb52c5811ea /patches/server/0969-Fix-removing-recipes-from-RecipeIterator.patch | |
parent | 2e76d3f1e200c567e62337e0d50ddcb01e3ea895 (diff) | |
download | Paper-e4efb590e49d30c9abe606838572aa5b4e9b5572.tar.gz Paper-e4efb590e49d30c9abe606838572aa5b4e9b5572.zip |
fix compile issues
Diffstat (limited to 'patches/server/0969-Fix-removing-recipes-from-RecipeIterator.patch')
-rw-r--r-- | patches/server/0969-Fix-removing-recipes-from-RecipeIterator.patch | 8 |
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(); } |