Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9648)
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: 6b34da8f SPIGOT-7467: Add getAddress to RemoteConsoleCommandSender CraftBukkit Changes: db4ba2897 SPIGOT-7467: Add getAddress to RemoteConsoleCommandSender 4f7ff4dec PR-1246: Add missing AbstractTestingBase to tests which need them f70a7b68d SPIGOT-7465, MC-264979: Fresh installations print NoSuchFileException for server.properties 8ef7afef6 PR-1240: Call BlockGrowEvent for vines that are growing on additional sides of an existing vine block Spigot Changes: d2eba2c8 Rebuild patches
This commit is contained in:
parent
0c0a480d82
commit
b8edb0e130
432 changed files with 235 additions and 271 deletions
|
@ -1,30 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Josh Roy <joshroy126@gmail.com>
|
||||
Date: Mon, 23 Jan 2023 19:19:01 -0500
|
||||
Subject: [PATCH] Remove CraftItemStack#setAmount null assignment
|
||||
|
||||
This creates a problem with Paper's item serialization
|
||||
api where deserialized items, which are internally
|
||||
created as a CraftItemStack, will be completely lost if
|
||||
#setAmount(0) is invoked (since the underlying handle
|
||||
is set to null), while a regular Bukkit ItemStack
|
||||
simply sets the amount field to zero, retaining the
|
||||
item's data.
|
||||
|
||||
Vanilla treats items with zero amounts the same as items
|
||||
with less than zero amounts, so this code doesn't create
|
||||
a problem with operations on the vanilla ItemStack.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
index 28e6933e5b02d1d2f983968692bffa2b9e572051..ce82f313007762b6d1d9f006f21a8858e2976efb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
@@ -157,7 +157,7 @@ public final class CraftItemStack extends ItemStack {
|
||||
}
|
||||
|
||||
this.handle.setCount(amount);
|
||||
- if (amount == 0) {
|
||||
+ if (false && amount == 0) { // Paper - remove CraftItemStack#setAmount null assignment
|
||||
this.handle = null;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue