diff options
Diffstat (limited to 'patches/server/0788-ItemStack-damage-API.patch')
-rw-r--r-- | patches/server/0788-ItemStack-damage-API.patch | 7 |
1 files changed, 4 insertions, 3 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 |