diff options
author | MiniDigger | Martin <[email protected]> | 2024-01-14 11:04:49 +0100 |
---|---|---|
committer | MiniDigger | Martin <[email protected]> | 2024-01-14 11:04:49 +0100 |
commit | bee74680e607c2e29b038329f62181238911cd83 (patch) | |
tree | 708fd1a4a0227d9071243adf2a42d5e9e96cde4a /patch-remap/mache-vineflower-stripped/net/minecraft/stats/ServerRecipeBook.java.patch | |
parent | 0a44692ef6ff6e255d48eb3ba1bb114166eafda9 (diff) | |
download | Paper-softspoon.tar.gz Paper-softspoon.zip |
add remapped patches as a testsoftspoon
Diffstat (limited to 'patch-remap/mache-vineflower-stripped/net/minecraft/stats/ServerRecipeBook.java.patch')
-rw-r--r-- | patch-remap/mache-vineflower-stripped/net/minecraft/stats/ServerRecipeBook.java.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/stats/ServerRecipeBook.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/stats/ServerRecipeBook.java.patch new file mode 100644 index 0000000000..9be367b6e9 --- /dev/null +++ b/patch-remap/mache-vineflower-stripped/net/minecraft/stats/ServerRecipeBook.java.patch @@ -0,0 +1,36 @@ +--- a/net/minecraft/stats/ServerRecipeBook.java ++++ b/net/minecraft/stats/ServerRecipeBook.java +@@ -19,6 +20,8 @@ + import net.minecraft.world.item.crafting.RecipeManager; + import org.slf4j.Logger; + ++import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit ++ + public class ServerRecipeBook extends RecipeBook { + public static final String RECIPE_BOOK_TAG = "recipeBook"; + private static final Logger LOGGER = LogUtils.getLogger(); +@@ -27,14 +34,16 @@ + List<ResourceLocation> list = Lists.newArrayList(); + int i = 0; + +- for (RecipeHolder<?> recipeHolder : recipes) { +- ResourceLocation resourceLocation = recipeHolder.id(); +- if (!this.known.contains(resourceLocation) && !recipeHolder.value().isSpecial()) { +- this.add(resourceLocation); +- this.addHighlight(resourceLocation); +- list.add(resourceLocation); +- CriteriaTriggers.RECIPE_UNLOCKED.trigger(player, recipeHolder); +- i++; ++ while (iterator.hasNext()) { ++ RecipeHolder<?> recipeholder = (RecipeHolder) iterator.next(); ++ ResourceLocation minecraftkey = recipeholder.id(); ++ ++ if (!this.known.contains(minecraftkey) && !recipeholder.value().isSpecial() && CraftEventFactory.handlePlayerRecipeListUpdateEvent(player, minecraftkey)) { // CraftBukkit ++ this.add(minecraftkey); ++ this.addHighlight(minecraftkey); ++ list.add(minecraftkey); ++ CriteriaTriggers.RECIPE_UNLOCKED.trigger(player, recipeholder); ++ ++i; + } + } + |