diff options
-rw-r--r-- | patches/server/0788-ItemStack-damage-API.patch | 7 | ||||
-rw-r--r-- | patches/server/1015-Optimize-Hoppers.patch | 4 | ||||
-rw-r--r-- | patches/server/1037-General-ItemMeta-fixes.patch | 4 |
3 files changed, 8 insertions, 7 deletions
diff --git a/patches/server/0788-ItemStack-damage-API.patch b/patches/server/0788-ItemStack-damage-API.patch index 22cb6ab1d8..ba4a14ae11 100644 --- a/patches/server/0788-ItemStack-damage-API.patch +++ b/patches/server/0788-ItemStack-damage-API.patch @@ -11,14 +11,15 @@ the logic associated with damaging them public net.minecraft.world.entity.LivingEntity entityEventForEquipmentBreak(Lnet/minecraft/world/entity/EquipmentSlot;)B diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index acce1b72185d4687ef5a72dd4014d87149f4b092..ee0e08be375234e003675b19c5b77b9249f5c355 100644 +index acce1b72185d4687ef5a72dd4014d87149f4b092..dc473b46394b41d951b68ed0eb6993e6807a0d29 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -713,7 +713,13 @@ public final class ItemStack implements DataComponentHolder { +@@ -713,7 +713,14 @@ public final class ItemStack implements DataComponentHolder { return; } } + // Paper start - ItemStack damage API - split hurtAndBreak to skip pre-checks like creative mode ++ this.hurtAndBreakWithoutChecks(amount, entity, slot); + } + } @@ -28,7 +29,7 @@ index acce1b72185d4687ef5a72dd4014d87149f4b092..ee0e08be375234e003675b19c5b77b92 RandomSource randomsource = entity.getRandom(); ServerPlayer entityplayer; -@@ -726,7 +732,7 @@ public final class ItemStack implements DataComponentHolder { +@@ -726,7 +733,7 @@ public final class ItemStack implements DataComponentHolder { } this.hurtAndBreak(amount, randomsource, entity, () -> { // Paper - Add EntityDamageItemEvent diff --git a/patches/server/1015-Optimize-Hoppers.patch b/patches/server/1015-Optimize-Hoppers.patch index 270241346c..d84cfedddd 100644 --- a/patches/server/1015-Optimize-Hoppers.patch +++ b/patches/server/1015-Optimize-Hoppers.patch @@ -62,10 +62,10 @@ index 4f076eae3a9c597e41f4520dae8378ec429d9f69..810b6099e734a5524e696beb3f25d6ca this.profiler.push(() -> { String s = String.valueOf(worldserver); diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 8000e5415976c737ca56003d1198ea07d1848cc9..a3325dda33372d8995effaefa244d2841e83b9a8 100644 +index ea5a36a192258b2f147b4a820f5cc988eb0e1180..86dcad62f59f68d2eefe2d5df1cdaee0955dc6e3 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -800,10 +800,16 @@ public final class ItemStack implements DataComponentHolder { +@@ -801,10 +801,16 @@ public final class ItemStack implements DataComponentHolder { } public ItemStack copy() { diff --git a/patches/server/1037-General-ItemMeta-fixes.patch b/patches/server/1037-General-ItemMeta-fixes.patch index bfae3c7f92..d0c3e1ad50 100644 --- a/patches/server/1037-General-ItemMeta-fixes.patch +++ b/patches/server/1037-General-ItemMeta-fixes.patch @@ -10,7 +10,7 @@ public org/bukkit/craftbukkit/block/CraftBlockStates getBlockState(Lorg/bukkit/W public net/minecraft/world/level/block/entity/BlockEntity saveId(Lnet/minecraft/nbt/CompoundTag;)V diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index a3325dda33372d8995effaefa244d2841e83b9a8..549ba156be055ec9bf4af035e986a95fa2e3f7d3 100644 +index 86dcad62f59f68d2eefe2d5df1cdaee0955dc6e3..1bd673336f13f12a875210acd23bd8496b5773ae 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -414,7 +414,7 @@ public final class ItemStack implements DataComponentHolder { @@ -22,7 +22,7 @@ index a3325dda33372d8995effaefa244d2841e83b9a8..549ba156be055ec9bf4af035e986a95f int newCount = this.getCount(); this.setCount(oldCount); this.restorePatch(oldData); -@@ -1257,6 +1257,11 @@ public final class ItemStack implements DataComponentHolder { +@@ -1258,6 +1258,11 @@ public final class ItemStack implements DataComponentHolder { public void setItem(Item item) { this.bukkitStack = null; // Paper this.item = item; |