diff --git a/README.md b/README.md index 1cd76474d..70f67f323 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ViaVersion 0.3.6 +# ViaVersion 0.3.7 **Allows the connection of 1.8 clients to 1.9** This plugin modifies netty to allow connection of 1.9 clients to 1.8, diff --git a/src/main/java/org/spacehq/mc/protocol/util/NetUtil.java b/src/main/java/org/spacehq/mc/protocol/util/NetUtil.java index f8f332ccf..67dad9ce0 100644 --- a/src/main/java/org/spacehq/mc/protocol/util/NetUtil.java +++ b/src/main/java/org/spacehq/mc/protocol/util/NetUtil.java @@ -39,7 +39,7 @@ public class NetUtil { public static Column readOldChunkData(int x, int z, boolean isFullChunk, int bitmask, byte[] input, boolean checkForSky, boolean hasSkyLight) { int pos = 0; - int expected = 0; + int expected = isFullChunk ? 256 : 0; boolean sky = false; ShortBuffer buf = ByteBuffer.wrap(input).order(ByteOrder.LITTLE_ENDIAN).asShortBuffer(); // 0 = Calculate expected length and determine if the packet has skylight. @@ -85,7 +85,7 @@ public class NetUtil { } if(pass == 3) { - if(chunks[ind].getSkyLight() != null) { + if(sky) { NibbleArray3d skylight = chunks[ind].getSkyLight(); System.arraycopy(input, pos, skylight.getData(), 0, skylight.getData().length); pos += skylight.getData().length; diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index f51140e30..5f2537806 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,4 +1,4 @@ name: ViaVersion main: us.myles.ViaVersion.ViaVersionPlugin author: _MylesC -version: 0.3.6 \ No newline at end of file +version: 0.3.7 \ No newline at end of file