summaryrefslogtreecommitdiffstats
path: root/nms-patches/ChunkSection.patch
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-03-01 08:32:46 +1100
committermd_5 <git@md-5.net>2016-03-01 09:32:45 +1100
commitaa008dff0f9bedbe88e1fe79831776b0a52eb90a (patch)
treecb520e0f4cc5d683fb9b7fb95de37480a7443dfb /nms-patches/ChunkSection.patch
parente1ebe524a78e27f6a2829ed4574fded3779094e1 (diff)
downloadcraftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar
craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar.gz
craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar.lz
craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar.xz
craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.zip
Update to Minecraft 1.9
Diffstat (limited to 'nms-patches/ChunkSection.patch')
-rw-r--r--nms-patches/ChunkSection.patch14
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);
+ }