diff options
Diffstat (limited to 'patches/server/0711-Added-EntityDamageItemEvent.patch')
-rw-r--r-- | patches/server/0711-Added-EntityDamageItemEvent.patch | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/patches/server/0711-Added-EntityDamageItemEvent.patch b/patches/server/0711-Added-EntityDamageItemEvent.patch index 2a1dad2ab6..bab8258ae6 100644 --- a/patches/server/0711-Added-EntityDamageItemEvent.patch +++ b/patches/server/0711-Added-EntityDamageItemEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Added EntityDamageItemEvent diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index a0d1877e9b5229bc04dba72fb629e26d25e85bfb..f9b7292c2eb2588c9769fcd8f56cc8da5259e7ce 100644 +index 9afecaa4cfa0466abb691977e55bcddb64b7feda..66f808cabcf6a9a6584849b285f1c60133adc7b4 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -526,7 +526,7 @@ public final class ItemStack { +@@ -525,7 +525,7 @@ public final class ItemStack { return this.getItem().getMaxDamage(); } @@ -17,7 +17,7 @@ index a0d1877e9b5229bc04dba72fb629e26d25e85bfb..f9b7292c2eb2588c9769fcd8f56cc8da if (!this.isDamageableItem()) { return false; } else { -@@ -544,8 +544,8 @@ public final class ItemStack { +@@ -543,8 +543,8 @@ public final class ItemStack { amount -= k; // CraftBukkit start @@ -28,7 +28,7 @@ index a0d1877e9b5229bc04dba72fb629e26d25e85bfb..f9b7292c2eb2588c9769fcd8f56cc8da event.getPlayer().getServer().getPluginManager().callEvent(event); if (amount != event.getDamage() || event.isCancelled()) { -@@ -556,6 +556,14 @@ public final class ItemStack { +@@ -555,6 +555,14 @@ public final class ItemStack { } amount = event.getDamage(); @@ -43,7 +43,7 @@ index a0d1877e9b5229bc04dba72fb629e26d25e85bfb..f9b7292c2eb2588c9769fcd8f56cc8da } // CraftBukkit end if (amount <= 0) { -@@ -563,8 +571,8 @@ public final class ItemStack { +@@ -562,8 +570,8 @@ public final class ItemStack { } } @@ -54,7 +54,7 @@ index a0d1877e9b5229bc04dba72fb629e26d25e85bfb..f9b7292c2eb2588c9769fcd8f56cc8da } j = this.getDamageValue() + amount; -@@ -576,7 +584,7 @@ public final class ItemStack { +@@ -575,7 +583,7 @@ public final class ItemStack { public <T extends LivingEntity> void hurtAndBreak(int amount, T entity, Consumer<T> breakCallback) { if (!entity.level.isClientSide && (!(entity instanceof net.minecraft.world.entity.player.Player) || !((net.minecraft.world.entity.player.Player) entity).getAbilities().instabuild)) { if (this.isDamageableItem()) { |