mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-06 15:12:13 -07:00
net/minecraft/stats/
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
--- a/net/minecraft/stats/ServerRecipeBook.java
|
||||
+++ b/net/minecraft/stats/ServerRecipeBook.java
|
||||
@@ -67,7 +_,7 @@
|
||||
|
||||
for (RecipeHolder<?> recipeHolder : recipes) {
|
||||
ResourceKey<Recipe<?>> resourceKey = recipeHolder.id();
|
||||
- if (!this.known.contains(resourceKey) && !recipeHolder.value().isSpecial()) {
|
||||
+ if (!this.known.contains(resourceKey) && !recipeHolder.value().isSpecial() && org.bukkit.craftbukkit.event.CraftEventFactory.handlePlayerRecipeListUpdateEvent(player, resourceKey.location())) { // CraftBukkit{
|
||||
this.add(resourceKey);
|
||||
this.addHighlight(resourceKey);
|
||||
this.displayResolver
|
||||
@@ -78,7 +_,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (!list.isEmpty()) {
|
||||
+ if (!list.isEmpty() && player.connection != null) { // SPIGOT-4478 during PlayerLoginEvent
|
||||
player.connection.send(new ClientboundRecipeBookAddPacket(list, false));
|
||||
}
|
||||
|
||||
@@ -96,7 +_,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (!list.isEmpty()) {
|
||||
+ if (!list.isEmpty() && player.connection != null) { // SPIGOT-4478 during PlayerLoginEvent
|
||||
player.connection.send(new ClientboundRecipeBookRemovePacket(list));
|
||||
}
|
||||
|
Reference in New Issue
Block a user