summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server
diff options
context:
space:
mode:
authorNathan Adams <dinnerbone@dinnerbone.com>2012-03-02 20:12:53 +0000
committerNathan Adams <dinnerbone@dinnerbone.com>2012-03-02 20:12:53 +0000
commit61fb069c616f7a7ce25a4b37d68b93930ef5c8cf (patch)
tree14e9dd1ef5575917ac6aac16d17248e495a6aba5 /src/main/java/net/minecraft/server
parentede443234e0fa807c7180e10e590f618fc36d024 (diff)
downloadcraftbukkit-61fb069c616f7a7ce25a4b37d68b93930ef5c8cf.tar
craftbukkit-61fb069c616f7a7ce25a4b37d68b93930ef5c8cf.tar.gz
craftbukkit-61fb069c616f7a7ce25a4b37d68b93930ef5c8cf.tar.lz
craftbukkit-61fb069c616f7a7ce25a4b37d68b93930ef5c8cf.tar.xz
craftbukkit-61fb069c616f7a7ce25a4b37d68b93930ef5c8cf.zip
Fixed fatal crashes when there's a block at maxheight at spawn - this fixes BUKKIT-922.
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r--src/main/java/net/minecraft/server/Chunk.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 34887c39..ab006bbe 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -330,12 +330,14 @@ public class Chunk {
}
public int getTypeId(int i, int j, int k) {
+ if (j >> 4 >= sections.length) return 0;
ChunkSection chunksection = this.sections[j >> 4];
return chunksection != null ? chunksection.a(i, j & 15, k) : 0;
}
public int getData(int i, int j, int k) {
+ if (j >> 4 >= sections.length) return 0;
ChunkSection chunksection = this.sections[j >> 4];
return chunksection != null ? chunksection.b(i, j & 15, k) : 0;