Prevent (Entity) null to be added to the entity list.

This commit is contained in:
Erik Broes 2012-01-27 19:42:04 +01:00
parent 16d3b705c5
commit 38ad0ea5fd

View File

@ -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;