13
0
geforkt von Mirrors/Paper

Fix chunk.getEntities

By: Erik Broes <erikbroes@grum.nl>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2011-04-02 17:56:06 +02:00
Ursprung 7dc8bdfeaa
Commit b2456309ff

Datei anzeigen

@ -79,12 +79,12 @@ public class CraftChunk implements Chunk {
for (int i = 0; i < 8; i++) { for (int i = 0; i < 8; i++) {
count += chunk.m[i].size(); count += chunk.m[i].size();
} }
Entity[] entities = new Entity[count]; Entity[] entities = new Entity[count];
for (int i = 0; i < 8; i++) { for (int i = 0; i < 8; i++) {
for (Object obj : (net.minecraft.server.Entity[])chunk.m[i].toArray()) { for (Object obj: chunk.m[i].toArray()) {
if (!(obj instanceof net.minecraft.server.Entity)) continue; if (!(obj instanceof net.minecraft.server.Entity)) continue;
net.minecraft.server.Entity entity = (net.minecraft.server.Entity) obj; entities[index++] = ((net.minecraft.server.Entity) obj).getBukkitEntity();
entities[index++] = entity.getBukkitEntity();
} }
} }
return entities; return entities;