fix compile issues
This commit is contained in:
parent
2e76d3f1e2
commit
e4efb590e4
99 changed files with 14 additions and 31 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue