mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 12:42:05 -07:00
[ci skip] Add more patch identifying comments, merge related patches
This commit is contained in:
@@ -12,13 +12,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
}
|
||||
|
||||
public void reloadResources() {
|
||||
+ // Paper start - split this method up into separate methods
|
||||
+ // Paper start - API for updating recipes on clients
|
||||
+ this.reloadAdvancementData();
|
||||
+ this.reloadTagData();
|
||||
+ this.reloadRecipeData();
|
||||
+ }
|
||||
+ public void reloadAdvancementData() {
|
||||
+ // Paper end
|
||||
+ // Paper end - API for updating recipes on clients
|
||||
// CraftBukkit start
|
||||
/*Iterator iterator = this.advancements.values().iterator();
|
||||
|
||||
@@ -26,15 +26,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
+ // Paper start
|
||||
+ // Paper start - API for updating recipes on clients
|
||||
+ }
|
||||
+ public void reloadTagData() {
|
||||
+ // Paper end
|
||||
+ // Paper end - API for updating recipes on clients
|
||||
this.broadcastAll(new ClientboundUpdateTagsPacket(TagNetworkSerialization.serializeTagsToNetwork(this.registries)));
|
||||
+ // Paper start
|
||||
+ // Paper start - API for updating recipes on clients
|
||||
+ }
|
||||
+ public void reloadRecipeData() {
|
||||
+ // Paper end
|
||||
+ // Paper end - API for updating recipes on clients
|
||||
ClientboundUpdateRecipesPacket packetplayoutrecipeupdate = new ClientboundUpdateRecipesPacket(this.server.getRecipeManager().getRecipes());
|
||||
Iterator iterator1 = this.players.iterator();
|
||||
|
||||
@@ -46,7 +46,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
ReloadCommand.reload(this.console);
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ // Paper start - API for updating recipes on clients
|
||||
+ @Override
|
||||
+ public void updateResources() {
|
||||
+ this.playerList.reloadResources();
|
||||
@@ -56,7 +56,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ public void updateRecipes() {
|
||||
+ this.playerList.reloadRecipeData();
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - API for updating recipes on clients
|
||||
+
|
||||
private void loadIcon() {
|
||||
this.icon = new CraftIconCache(null);
|
||||
@@ -65,13 +65,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
@Override
|
||||
public boolean addRecipe(Recipe recipe) {
|
||||
+ // Paper start
|
||||
+ // Paper start - API for updating recipes on clients
|
||||
+ return this.addRecipe(recipe, false);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean addRecipe(Recipe recipe, boolean resendRecipes) {
|
||||
+ // Paper end
|
||||
+ // Paper end - API for updating recipes on clients
|
||||
CraftRecipe toAdd;
|
||||
if (recipe instanceof CraftRecipe) {
|
||||
toAdd = (CraftRecipe) recipe;
|
||||
@@ -79,11 +79,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
}
|
||||
}
|
||||
toAdd.addToCraftingManager();
|
||||
+ // Paper start
|
||||
+ // Paper start - API for updating recipes on clients
|
||||
+ if (resendRecipes) {
|
||||
+ this.playerList.reloadRecipeData();
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - API for updating recipes on clients
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -91,13 +91,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
@Override
|
||||
public boolean removeRecipe(NamespacedKey recipeKey) {
|
||||
+ // Paper start
|
||||
+ // Paper start - API for updating recipes on clients
|
||||
+ return this.removeRecipe(recipeKey, false);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean removeRecipe(NamespacedKey recipeKey, boolean resendRecipes) {
|
||||
+ // Paper end
|
||||
+ // Paper end - API for updating recipes on clients
|
||||
Preconditions.checkArgument(recipeKey != null, "recipeKey == null");
|
||||
|
||||
ResourceLocation mcKey = CraftNamespacedKey.toMinecraft(recipeKey);
|
||||
|
Reference in New Issue
Block a user