mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-11 02:37:36 +01:00
SPIGOT-1192: Restore some behaviour to entity.getNearbyEntities
By: md_5 <git@md-5.net>
This commit is contained in:
parent
bec7083140
commit
08a3d51d7c
@ -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