summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTravis Watkins <amaranth@ubuntu.com>2014-07-10 19:19:48 -0500
committerTravis Watkins <amaranth@ubuntu.com>2014-07-10 19:19:48 -0500
commit319a9c20eb4416295e7fb32f0d011ee4ff62ed77 (patch)
treef7637a5fe5933e88e4539355c075754a6bd6be5a
parent13482ac7f63f1e652b194b63fadf918720ec3c9e (diff)
downloadcraftbukkit-319a9c20eb4416295e7fb32f0d011ee4ff62ed77.tar
craftbukkit-319a9c20eb4416295e7fb32f0d011ee4ff62ed77.tar.gz
craftbukkit-319a9c20eb4416295e7fb32f0d011ee4ff62ed77.tar.lz
craftbukkit-319a9c20eb4416295e7fb32f0d011ee4ff62ed77.tar.xz
craftbukkit-319a9c20eb4416295e7fb32f0d011ee4ff62ed77.zip
Handle uniform block ids greater than 127. Fixes BUKKIT-5686
-rw-r--r--src/main/java/net/minecraft/server/ChunkSection.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java
index e33712a4..db1e52c9 100644
--- a/src/main/java/net/minecraft/server/ChunkSection.java
+++ b/src/main/java/net/minecraft/server/ChunkSection.java
@@ -13,7 +13,7 @@ public class ChunkSection {
private NibbleArray emittedLight;
private NibbleArray skyLight;
// CraftBukkit start - Compact storage
- private byte compactId;
+ private int compactId;
private byte compactExtId;
private byte compactData;
private byte compactEmitted;
@@ -125,7 +125,7 @@ public class ChunkSection {
// CraftBukkit start - Compact storage
if (this.blockIds == null) {
this.blockIds = new byte[4096];
- Arrays.fill(this.blockIds, this.compactId);
+ Arrays.fill(this.blockIds, (byte) (this.compactId & 255));
}
// CraftBukkit end
@@ -351,7 +351,7 @@ public class ChunkSection {
// CraftBukkit start - Compact storage
if (this.blockIds == null) {
byte[] ids = new byte[4096];
- Arrays.fill(ids, this.compactId);
+ Arrays.fill(ids, (byte) (this.compactId & 255));
return ids;
}
// CraftBukkit end
@@ -401,7 +401,7 @@ public class ChunkSection {
this.blockIds = null;
return;
} else if (canBeCompact(abyte)) {
- this.compactId = abyte[0];
+ this.compactId = abyte[0] & 255;
return;
}
// CraftBukkit end