diff options
author | GJ <gjmcferrin@gmail.com> | 2013-12-11 13:14:40 -0500 |
---|---|---|
committer | Nate Mortensen <nate.richard.mortensen@gmail.com> | 2013-12-13 22:21:12 -0700 |
commit | 1ff8132bdd5bfe6e60d16ee3d54f58c472ab0296 (patch) | |
tree | 5fc7abcf4783db63cf8d16070fc51bc9a9d134b5 /src/main/java/net/minecraft | |
parent | a0e50c36b96b46e8187213f8ab5ff8e586720d86 (diff) | |
download | craftbukkit-1ff8132bdd5bfe6e60d16ee3d54f58c472ab0296.tar craftbukkit-1ff8132bdd5bfe6e60d16ee3d54f58c472ab0296.tar.gz craftbukkit-1ff8132bdd5bfe6e60d16ee3d54f58c472ab0296.tar.lz craftbukkit-1ff8132bdd5bfe6e60d16ee3d54f58c472ab0296.tar.xz craftbukkit-1ff8132bdd5bfe6e60d16ee3d54f58c472ab0296.zip |
[Bleeding] Fix witches dropping empty ItemStacks on death. Fixes BUKKIT-3554
Diffstat (limited to 'src/main/java/net/minecraft')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityWitch.java | 4 |
1 files changed, 3 insertions, 1 deletions
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); |