diff options
Diffstat (limited to 'patch-remap/mache-spigotflower-stripped/net/minecraft/stats/ServerRecipeBook.java.patch')
-rw-r--r-- | patch-remap/mache-spigotflower-stripped/net/minecraft/stats/ServerRecipeBook.java.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower-stripped/net/minecraft/stats/ServerRecipeBook.java.patch b/patch-remap/mache-spigotflower-stripped/net/minecraft/stats/ServerRecipeBook.java.patch new file mode 100644 index 0000000000..8ffb0784be --- /dev/null +++ b/patch-remap/mache-spigotflower-stripped/net/minecraft/stats/ServerRecipeBook.java.patch @@ -0,0 +1,28 @@ +--- a/net/minecraft/stats/ServerRecipeBook.java ++++ b/net/minecraft/stats/ServerRecipeBook.java +@@ -20,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"; +@@ -36,11 +38,11 @@ + RecipeHolder<?> recipeholder = (RecipeHolder) iterator.next(); + 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(serverplayer, recipeholder); ++ 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; + } + } |