13
0
geforkt von Mirrors/Paper

SPIGOT-1165: Restore getNearbyEntities behaviour to include spectators.

Dieser Commit ist enthalten in:
md_5 2015-09-06 14:54:41 +10:00
Ursprung 9a17f01ff1
Commit 5e9f698fac
2 geänderte Dateien mit 4 neuen und 9 gelöschten Zeilen

Datei anzeigen

@ -712,7 +712,7 @@ public class CraftWorld implements World {
}
AxisAlignedBB bb = new AxisAlignedBB(location.getX() - x, location.getY() - y, location.getZ() - z, location.getX() + x, location.getY() + y, location.getZ() + z);
List<net.minecraft.server.Entity> entityList = getHandle().getEntities(null, bb);
List<net.minecraft.server.Entity> entityList = getHandle().a((net.minecraft.server.Entity) null, bb, null); // PAIL : rename
List<Entity> bukkitEntityList = new ArrayList<org.bukkit.entity.Entity>(entityList.size());
for (Object entity : entityList) {
bukkitEntityList.add(((net.minecraft.server.Entity) entity).getBukkitEntity());

Datei anzeigen

@ -1,6 +1,8 @@
package org.bukkit.craftbukkit.entity;
import com.google.common.base.Preconditions;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Set;
import java.util.UUID;
@ -247,14 +249,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
}
public List<org.bukkit.entity.Entity> getNearbyEntities(double x, double y, double z) {
@SuppressWarnings("unchecked")
List<Entity> notchEntityList = entity.world.getEntities(entity, entity.getBoundingBox().grow(x, y, z));
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;
return new ArrayList<org.bukkit.entity.Entity>(getHandle().getWorld().getWorld().getNearbyEntities(getLocation(), x, y, z));
}
public int getEntityId() {