aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/unapplied/server/0708-Expand-PlayerItemDamageEvent.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/unapplied/server/0708-Expand-PlayerItemDamageEvent.patch')
-rw-r--r--patches/unapplied/server/0708-Expand-PlayerItemDamageEvent.patch23
1 files changed, 0 insertions, 23 deletions
diff --git a/patches/unapplied/server/0708-Expand-PlayerItemDamageEvent.patch b/patches/unapplied/server/0708-Expand-PlayerItemDamageEvent.patch
deleted file mode 100644
index 0162e1da45..0000000000
--- a/patches/unapplied/server/0708-Expand-PlayerItemDamageEvent.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: HexedHero <[email protected]>
-Date: Sun, 10 Apr 2022 06:26:32 +0100
-Subject: [PATCH] Expand PlayerItemDamageEvent
-
-
-diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
-index aa0a5b392942e03123b1dbd68ec8e9e1321457e9..0ac1d8cf71dc685bcf2d1f9ab1440e933757359c 100644
---- a/src/main/java/net/minecraft/world/item/ItemStack.java
-+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
-@@ -661,10 +661,11 @@ public final class ItemStack implements DataComponentHolder {
- }
- }
-
-+ int originalDamage = amount; // Paper - Expand PlayerItemDamageEvent
- amount -= k;
- // CraftBukkit start
- if (player instanceof ServerPlayer serverPlayer) { // Paper - Add EntityDamageItemEvent
-- PlayerItemDamageEvent event = new PlayerItemDamageEvent(serverPlayer.getBukkitEntity(), CraftItemStack.asCraftMirror(this), amount); // Paper - Add EntityDamageItemEvent
-+ PlayerItemDamageEvent event = new PlayerItemDamageEvent(serverPlayer.getBukkitEntity(), CraftItemStack.asCraftMirror(this), amount, originalDamage); // Paper - Add EntityDamageItemEvent & Expand PlayerItemDamageEvent
- event.getPlayer().getServer().getPluginManager().callEvent(event);
-
- if (amount != event.getDamage() || event.isCancelled()) {