mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-28 05:25:42 +01:00
Prevent (Entity) null to be added to the entity list.
This commit is contained in:
parent
16d3b705c5
commit
38ad0ea5fd
@ -866,6 +866,8 @@ public class World implements IBlockAccess {
|
|||||||
|
|
||||||
public boolean addEntity(Entity entity, SpawnReason spawnReason) { // Changed signature, added SpawnReason
|
public boolean addEntity(Entity entity, SpawnReason spawnReason) { // Changed signature, added SpawnReason
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
if (entity == null) return false;
|
||||||
|
|
||||||
int i = MathHelper.floor(entity.locX / 16.0D);
|
int i = MathHelper.floor(entity.locX / 16.0D);
|
||||||
int j = MathHelper.floor(entity.locZ / 16.0D);
|
int j = MathHelper.floor(entity.locZ / 16.0D);
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user