summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorErik Broes <erikbroes@grum.nl>2011-01-18 12:37:01 +0100
committerErik Broes <erikbroes@grum.nl>2011-01-18 12:38:41 +0100
commit90c52739c44dd4292825b0d74fe0d4e5413bd74c (patch)
tree979d280995998e4de627c275dd93b730af248e0f /src
parent3143e503fe2e528f58115539bec0b4f52c6c1c30 (diff)
downloadcraftbukkit-90c52739c44dd4292825b0d74fe0d4e5413bd74c.tar
craftbukkit-90c52739c44dd4292825b0d74fe0d4e5413bd74c.tar.gz
craftbukkit-90c52739c44dd4292825b0d74fe0d4e5413bd74c.tar.lz
craftbukkit-90c52739c44dd4292825b0d74fe0d4e5413bd74c.tar.xz
craftbukkit-90c52739c44dd4292825b0d74fe0d4e5413bd74c.zip
Fixed getChunkAt and usage.
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftWorld.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 289300c4..d3aebcce 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -64,7 +64,7 @@ public class CraftWorld implements World {
}
public Chunk getChunkAt(Block block) {
- return getChunkAt(block.getX() << 4, block.getZ() << 4);
+ return getChunkAt(block.getX() >> 4, block.getZ() >> 4);
}
public boolean isChunkLoaded(Chunk chunk) {
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index 1c7ba3c6..867a8812 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -30,7 +30,7 @@ public class CraftBlock implements Block {
this.type = type;
this.data = data;
this.light = (byte)world.getHandle().j(x, y, z);
- this.chunk = (CraftChunk)world.getChunkAt(x << 4, z << 4);
+ this.chunk = (CraftChunk)world.getChunkAt(x >> 4, z >> 4);
}
protected CraftBlock(final CraftWorld world, final int x, final int y,
@@ -42,7 +42,7 @@ public class CraftBlock implements Block {
this.type = type;
this.data = data;
this.light = light;
- this.chunk = (CraftChunk)world.getChunkAt(x << 4, z << 4);
+ this.chunk = (CraftChunk)world.getChunkAt(x >> 4, z >> 4);
}
/**