summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft
diff options
context:
space:
mode:
authorGJ <gjmcferrin@gmail.com>2013-12-11 13:14:40 -0500
committerNate Mortensen <nate.richard.mortensen@gmail.com>2013-12-13 22:21:12 -0700
commit1ff8132bdd5bfe6e60d16ee3d54f58c472ab0296 (patch)
tree5fc7abcf4783db63cf8d16070fc51bc9a9d134b5 /src/main/java/net/minecraft
parenta0e50c36b96b46e8187213f8ab5ff8e586720d86 (diff)
downloadcraftbukkit-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.java4
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);