From e937307596f9ec6b562df1c3b89968fe51143813 Mon Sep 17 00:00:00 2001 From: feildmaster Date: Fri, 21 Dec 2012 15:07:02 -0600 Subject: [PATCH] Add a null check for Item Entities. Fixes BUKKIT-3249 --- src/main/java/net/minecraft/server/EntityItem.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java index c877686769..0b139a623d 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -28,6 +28,11 @@ public class EntityItem extends Entity { public EntityItem(World world, double d0, double d1, double d2, ItemStack itemstack) { this(world, d0, d1, d2); + // CraftBukkit start - Can't set null items in the datawatcher + if (itemstack == null || itemstack.getItem() == null) { + return; + } + // CraftBukkit end this.setItemStack(itemstack); }