mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-09 04:09:54 +01:00
SPIGOT-1192: Restore some behaviour to entity.getNearbyEntities
This commit is contained in:
parent
c3730616ee
commit
701ae54ffc
@ -249,7 +249,13 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
}
|
||||
|
||||
public List<org.bukkit.entity.Entity> getNearbyEntities(double x, double y, double z) {
|
||||
return new ArrayList<org.bukkit.entity.Entity>(getHandle().getWorld().getWorld().getNearbyEntities(getLocation(), x, y, z));
|
||||
List<Entity> notchEntityList = entity.world.a(entity, entity.getBoundingBox().grow(x, y, z), null);
|
||||
List<org.bukkit.entity.Entity> bukkitEntityList = new java.util.ArrayList<org.bukkit.entity.Entity>(notchEntityList.size());
|
||||
|
||||
for (Entity e : notchEntityList) {
|
||||
bukkitEntityList.add(e.getBukkitEntity());
|
||||
}
|
||||
return bukkitEntityList;
|
||||
}
|
||||
|
||||
public int getEntityId() {
|
||||
|
Loading…
Reference in New Issue
Block a user