SPIGOT-1192: Restore some behaviour to entity.getNearbyEntities

This commit is contained in:
md_5 2015-09-18 15:15:56 +10:00
parent c3730616ee
commit 701ae54ffc

View File

@ -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() {