From 5c4f1d75b5dc510052eac608421bd7d79dd289ee Mon Sep 17 00:00:00 2001 From: Tahg Date: Fri, 11 Mar 2011 17:57:59 -0500 Subject: [PATCH] stupid ChunkPosition's are relative to the chunk --- src/main/java/org/bukkit/craftbukkit/CraftChunk.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java index 08ff697ebc..e013923f8e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java @@ -89,7 +89,7 @@ public class CraftChunk implements Chunk { for (Object obj : chunk.l.keySet().toArray()) { if (!(obj instanceof ChunkPosition)) continue; ChunkPosition position = (ChunkPosition) obj; - entities[index++] = worldServer.getWorld().getBlockAt(position.a, position.b, position.c).getState(); + entities[index++] = worldServer.getWorld().getBlockAt(position.a + (chunk.j << 4), position.b, position.c + (chunk.k << 4)).getState(); } return entities; }