From 38ad0ea5fd78404490ba52c7be2241f7b4036dec Mon Sep 17 00:00:00 2001 From: Erik Broes Date: Fri, 27 Jan 2012 19:42:04 +0100 Subject: [PATCH] Prevent (Entity) null to be added to the entity list. --- src/main/java/net/minecraft/server/World.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java index 3dfe7661a6..a0d0fc91ea 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -866,6 +866,8 @@ public class World implements IBlockAccess { public boolean addEntity(Entity entity, SpawnReason spawnReason) { // Changed signature, added SpawnReason // CraftBukkit end + if (entity == null) return false; + int i = MathHelper.floor(entity.locX / 16.0D); int j = MathHelper.floor(entity.locZ / 16.0D); boolean flag = false;