SPIGOT-1192: Restore some behaviour to entity.getNearbyEntities

Dieser Commit ist enthalten in:
md_5 2015-09-18 15:15:56 +10:00
Ursprung c3730616ee
Commit 701ae54ffc

Datei anzeigen

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