diff options
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; + } + } + |