diff options
Diffstat (limited to 'nms-patches/ChunkSection.patch')
-rw-r--r-- | nms-patches/ChunkSection.patch | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/nms-patches/ChunkSection.patch b/nms-patches/ChunkSection.patch index 6a96a992..da356273 100644 --- a/nms-patches/ChunkSection.patch +++ b/nms-patches/ChunkSection.patch @@ -1,13 +1,19 @@ --- a/net/minecraft/server/ChunkSection.java +++ b/net/minecraft/server/ChunkSection.java -@@ -19,6 +19,18 @@ +@@ -19,6 +19,24 @@ } + // CraftBukkit start + public ChunkSection(int y, boolean flag, char[] blockIds) { + this.yPos = y; -+ this.blockIds = blockIds; ++ this.blockIds = new DataPaletteBlock(); ++ for (int i = 0; i < blockIds.length; i++) { ++ int xx = i & 15; ++ int yy = (i >> 8) & 15; ++ int zz = (i >> 4) & 15; ++ this.blockIds.setBlock(xx, yy, zz, Block.REGISTRY_ID.fromId(blockIds[i])); ++ } + this.emittedLight = new NibbleArray(); + if (flag) { + this.skyLight = new NibbleArray(); @@ -17,5 +23,5 @@ + // CraftBukkit end + public IBlockData getType(int i, int j, int k) { - IBlockData iblockdata = (IBlockData) Block.d.a(this.blockIds[j << 8 | k << 4 | i]); - + return this.blockIds.a(i, j, k); + } |