summaryrefslogtreecommitdiffstats
path: root/src/main/java/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net')
-rw-r--r--src/main/java/net/minecraft/server/EntityItem.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
index c8776867..0b139a62 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);
}