mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-10 01:21:46 +01:00
Fix NPE with Entity.getNearbyEntities
By: md_5 <git@md-5.net>
This commit is contained in:
parent
4b9c250321
commit
0acd422f48
@ -2,6 +2,7 @@ package org.bukkit.craftbukkit.entity;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.base.Predicates;
|
||||
import com.google.common.collect.Lists;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
@ -526,7 +527,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
|
||||
@Override
|
||||
public List<org.bukkit.entity.Entity> getNearbyEntities(double x, double y, double z) {
|
||||
List<Entity> notchEntityList = entity.level.getEntities(entity, entity.getBoundingBox().grow(x, y, z), null);
|
||||
List<Entity> notchEntityList = entity.level.getEntities(entity, entity.getBoundingBox().grow(x, y, z), Predicates.alwaysTrue());
|
||||
List<org.bukkit.entity.Entity> bukkitEntityList = new java.util.ArrayList<org.bukkit.entity.Entity>(notchEntityList.size());
|
||||
|
||||
for (Entity e : notchEntityList) {
|
||||
|
Loading…
Reference in New Issue
Block a user