[Bleeding] Fix witches dropping empty ItemStacks on death. Fixes BUKKIT-3554

This commit is contained in:
GJ 2013-12-11 13:14:40 -05:00 committed by Nate Mortensen
parent a0e50c36b9
commit 1ff8132bdd

View File

@ -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);