Updated Upstream (Bukkit/CraftBukkit/Spigot) (#11561)

Updated Upstream (Bukkit/CraftBukkit/Spigot)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
b9df8e9f SPIGOT-7933: Improve custom Minecart max speed
fc496179 Fix InstrumentTest
7c0ec598 PR-1075: Make Art an interface
c389f5a4 PR-1074: Make Sound an interface

CraftBukkit Changes:
df1efc0bb SPIGOT-7945: `Bukkit#dispatchCommand` throws `UnsupportedOperationException`
285df6e85 SPIGOT-7933: Improve custom Minecart max speed
a0f3d4e50 SPIGOT-7940: Recipe book errors after reload
9e0618ec2 SPIGOT-7937: Cannot spawn minecart during world generation with minecart_improvements enabled
1eb4d28da SPIGOT-7941: Fix resistance over 4 amplify causing issues in damage
52b99158a PR-1504: Make Art an interface
e18ae35f1 PR-1502: Make Sound an interface

Spigot Changes:
e65d67a7 SPIGOT-7934: Item entities start "bouncing" under certain conditions
This commit is contained in:
Jake Potrebic
2024-11-04 09:42:38 -08:00
parent 75993b6fb4
commit 071b776261
25 changed files with 12102 additions and 92 deletions

View File

@@ -15,7 +15,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper start - API for updating recipes on clients
+ this.reloadAdvancementData();
+ this.reloadTagData();
+ this.reloadRecipeData();
+ this.reloadRecipes();
+ }
+ public void reloadAdvancementData() {
+ // Paper end - API for updating recipes on clients
@@ -30,12 +30,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+ public void reloadTagData() {
this.broadcastAll(new ClientboundUpdateTagsPacket(TagNetworkSerialization.serializeTagsToNetwork(this.registries)));
+ }
+ public void reloadRecipeData() {
// CraftBukkit start
- this.reloadRecipes();
+ // this.reloadRecipes(); // Paper - do not reload recipes just because tag data was reloaded
+ // Paper end - API for updating recipes on clients
RecipeManager craftingmanager = this.server.getRecipeManager();
ClientboundUpdateRecipesPacket packetplayoutrecipeupdate = new ClientboundUpdateRecipesPacket(craftingmanager.getSynchronizedItemProperties(), craftingmanager.getSynchronizedStonecutterRecipes());
Iterator iterator1 = this.players.iterator();
}
public void reloadRecipes() {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -52,7 +53,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
+ @Override
+ public void updateRecipes() {
+ this.playerList.reloadRecipeData();
+ this.playerList.reloadRecipes();
+ }
+ // Paper end - API for updating recipes on clients
+
@@ -79,7 +80,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
toAdd.addToCraftingManager();
+ // Paper start - API for updating recipes on clients
+ if (true || resendRecipes) { // Always needs to be resent now... TODO
+ this.playerList.reloadRecipeData();
+ this.playerList.reloadRecipes();
+ }
+ // Paper end - API for updating recipes on clients
return true;
@@ -103,7 +104,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ final ResourceKey<net.minecraft.world.item.crafting.Recipe<?>> minecraftKey = CraftRecipe.toMinecraft(recipeKey);
+ final boolean removed = this.getServer().getRecipeManager().removeRecipe(minecraftKey);
+ if (removed/* && resendRecipes*/) { // TODO Always need to resend them rn - deprecate this method?
+ this.playerList.reloadRecipeData();
+ this.playerList.reloadRecipes();
+ }
+ return removed;
+ // Paper end - resend recipes on successful removal