SPIGOT-1831: Chicken / sheep not dropping items correctly.

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2016-03-08 17:58:52 +11:00
parent ced78d5d27
commit 1fec65442b
4 changed files with 42 additions and 24 deletions

View File

@@ -364,7 +364,7 @@
public EntityItem a(ItemStack itemstack, float f) {
if (itemstack.count != 0 && itemstack.getItem() != null) {
+ // CraftBukkit start - Capture drops for death event
+ if (this instanceof EntityLiving) {
+ if (this instanceof EntityLiving && !((EntityLiving) this).forceDrops) {
+ ((EntityLiving) this).drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(itemstack));
+ return null;
+ }