From 1ff8132bdd5bfe6e60d16ee3d54f58c472ab0296 Mon Sep 17 00:00:00 2001 From: GJ Date: Wed, 11 Dec 2013 13:14:40 -0500 Subject: [Bleeding] Fix witches dropping empty ItemStacks on death. Fixes BUKKIT-3554 --- src/main/java/net/minecraft/server/EntityWitch.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/java/net/minecraft/server/EntityWitch.java b/src/main/java/net/minecraft/server/EntityWitch.java index d300ec0b..99a89411 100644 --- a/src/main/java/net/minecraft/server/EntityWitch.java +++ b/src/main/java/net/minecraft/server/EntityWitch.java @@ -142,7 +142,9 @@ public class EntityWitch extends EntityMonster implements IRangedEntity { l += this.random.nextInt(i + 1); } - loot.add(new org.bukkit.inventory.ItemStack(org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(item), l)); + if (l > 0) { + loot.add(new org.bukkit.inventory.ItemStack(org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(item), l)); + } } org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDeathEvent(this, loot); -- cgit v1.2.3