diff options
author | Antony Riley <antony@cyberiantiger.org> | 2015-07-18 23:06:31 +0300 |
---|---|---|
committer | md_5 <git@md-5.net> | 2015-07-19 09:23:48 +1000 |
commit | 87b9f46d72040ca15d8b0bd9008030be962f86ec (patch) | |
tree | f03c0fefb0ff48a7d08f7db9e87ec50c0172ce43 /src/main | |
parent | 09ddd9b35e490d611ee74c999117dc2cdacd487f (diff) | |
download | craftbukkit-87b9f46d72040ca15d8b0bd9008030be962f86ec.tar craftbukkit-87b9f46d72040ca15d8b0bd9008030be962f86ec.tar.gz craftbukkit-87b9f46d72040ca15d8b0bd9008030be962f86ec.tar.lz craftbukkit-87b9f46d72040ca15d8b0bd9008030be962f86ec.tar.xz craftbukkit-87b9f46d72040ca15d8b0bd9008030be962f86ec.zip |
SPIGOT-1060: Allow custom generators to use block ids > 127 with bytes.
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java index 4e925824..9ecdad45 100644 --- a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java +++ b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java @@ -88,7 +88,7 @@ public class CustomChunkGenerator extends InternalChunkGenerator { char[] secBlkID = new char[4096]; // Allocate block ID bytes for (int i = 0; i < secBlkID.length; i++) { - Block b = Block.getById(btypes[sec][i]); + Block b = Block.getById(btypes[sec][i] & 0xFF); secBlkID[i] = (char) Block.d.b(b.getBlockData()); } csect[sec] = new ChunkSection(sec << 4, true, secBlkID); @@ -125,7 +125,7 @@ public class CustomChunkGenerator extends InternalChunkGenerator { csbytes = cs.getIdArray(); } - Block b = Block.getById(blk); + Block b = Block.getById(blk & 0xFF); csbytes[(cy << 8) | (cz << 4) | cx] = (char) Block.d.b(b.getBlockData()); } } |