From 9db83af2ab039e072df1646a6c037b14066f204d Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Tue, 7 May 2019 08:20:32 -0700 Subject: [PATCH] Fix foxes not dropping items --- Spigot-Server-Patches/0305-Improve-death-events.patch | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Spigot-Server-Patches/0305-Improve-death-events.patch b/Spigot-Server-Patches/0305-Improve-death-events.patch index 3ca7d840b..8f1bef1d4 100644 --- a/Spigot-Server-Patches/0305-Improve-death-events.patch +++ b/Spigot-Server-Patches/0305-Improve-death-events.patch @@ -1,4 +1,4 @@ -From 91e26b7d4f46295ba6b5efd3577a49eeed07b55c Mon Sep 17 00:00:00 2001 +From 87f19f8f0e3245d63d69328ac2941f934d31a857 Mon Sep 17 00:00:00 2001 From: Phoenix616 Date: Tue, 21 Aug 2018 01:39:35 +0100 Subject: [PATCH] Improve death events @@ -61,7 +61,7 @@ index 7031dd0e4c..f6dc96434b 100644 } diff --git a/src/main/java/net/minecraft/server/EntityFox.java b/src/main/java/net/minecraft/server/EntityFox.java -index 917d603507..c099e2fbb6 100644 +index 917d603507..95d6b3f369 100644 --- a/src/main/java/net/minecraft/server/EntityFox.java +++ b/src/main/java/net/minecraft/server/EntityFox.java @@ -597,15 +597,25 @@ public class EntityFox extends EntityAnimal { @@ -69,9 +69,10 @@ index 917d603507..c099e2fbb6 100644 @Override - protected void d(DamageSource damagesource) { +- ItemStack itemstack = this.getEquipment(EnumItemSlot.MAINHAND); + protected org.bukkit.event.entity.EntityDeathEvent d(DamageSource damagesource) { // Paper - ItemStack itemstack = this.getEquipment(EnumItemSlot.MAINHAND); - ++ ItemStack itemstack = this.getEquipment(EnumItemSlot.MAINHAND).cloneItemStack(); // Paper ++ + // Paper start - Cancellable death event + org.bukkit.event.entity.EntityDeathEvent deathEvent = super.d(damagesource); + @@ -81,7 +82,7 @@ index 917d603507..c099e2fbb6 100644 + return deathEvent; + } + // Paper end -+ + if (!itemstack.isEmpty()) { this.a(itemstack); this.setSlot(EnumItemSlot.MAINHAND, ItemStack.a);