From aa008dff0f9bedbe88e1fe79831776b0a52eb90a Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 1 Mar 2016 08:32:46 +1100 Subject: Update to Minecraft 1.9 --- nms-patches/ChunkSection.patch | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'nms-patches/ChunkSection.patch') 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); + } -- cgit v1.2.3