From d1dd96f5605b24de2dfece64b613b46dd153abdb Mon Sep 17 00:00:00 2001 From: EvilSeph Date: Fri, 9 Mar 2012 13:09:15 -0500 Subject: [PATCH] Made Chunk.getEntities() account for the world height increase. Fixes BUKKIT-1059 --- src/main/java/org/bukkit/craftbukkit/CraftChunk.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java index 0038c565b5..61af6ddea9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java @@ -84,13 +84,13 @@ public class CraftChunk implements Chunk { int count = 0, index = 0; net.minecraft.server.Chunk chunk = getHandle(); - for (int i = 0; i < 8; i++) { + for (int i = 0; i < 16; i++) { count += chunk.entitySlices[i].size(); } Entity[] entities = new Entity[count]; - for (int i = 0; i < 8; i++) { + for (int i = 0; i < 16; i++) { for (Object obj : chunk.entitySlices[i].toArray()) { if (!(obj instanceof net.minecraft.server.Entity)) { continue;