From 6b313cb65e12311c2619d26248faa444a7c89636 Mon Sep 17 00:00:00 2001 From: creeper123123321 Date: Sat, 2 Mar 2019 17:07:23 -0300 Subject: [PATCH] Fix 1.9 chunk missing blocks, update travis badge url --- README.md | 2 +- .../us/myles/ViaVersion/api/minecraft/chunks/ChunkSection.java | 3 +-- .../ViaVersion/api/type/types/version/ChunkSectionType1_8.java | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 40e5f534d..ea37d123c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # ViaVersion 1.6.0 - Spigot, Sponge, BungeeCord -[![Build Status](https://travis-ci.org/MylesIsCool/ViaVersion.svg?branch=master)](https://travis-ci.org/MylesIsCool/ViaVersion) +[![Build Status](https://travis-ci.com/ViaVersion/ViaVersion.svg?branch=master)](https://travis-ci.com/ViaVersion/ViaVersion) [![Discord](https://img.shields.io/badge/chat-on%20discord-blue.svg)](https://viaversion.com/discord) IRC: [#viaversion](http://irc.spi.gt/iris/?channels=viaversion) on irc.spi.gt for Support. diff --git a/common/src/main/java/us/myles/ViaVersion/api/minecraft/chunks/ChunkSection.java b/common/src/main/java/us/myles/ViaVersion/api/minecraft/chunks/ChunkSection.java index cd102fdef..4f5feb7a8 100644 --- a/common/src/main/java/us/myles/ViaVersion/api/minecraft/chunks/ChunkSection.java +++ b/common/src/main/java/us/myles/ViaVersion/api/minecraft/chunks/ChunkSection.java @@ -30,8 +30,7 @@ public class ChunkSection { public ChunkSection() { this.blocks = new int[SIZE]; this.blockLight = new NibbleArray(SIZE); - palette.add(0); - inversePalette.put(0, 0); + addPaletteEntry(0); } /** diff --git a/common/src/main/java/us/myles/ViaVersion/api/type/types/version/ChunkSectionType1_8.java b/common/src/main/java/us/myles/ViaVersion/api/type/types/version/ChunkSectionType1_8.java index 7a496f670..b9fb18036 100644 --- a/common/src/main/java/us/myles/ViaVersion/api/type/types/version/ChunkSectionType1_8.java +++ b/common/src/main/java/us/myles/ViaVersion/api/type/types/version/ChunkSectionType1_8.java @@ -15,7 +15,7 @@ public class ChunkSectionType1_8 extends Type { @Override public ChunkSection read(ByteBuf buffer) throws Exception { ChunkSection chunkSection = new ChunkSection(); - chunkSection.clearPalette(); + // Don't clear palette because 0 index needs to be air in 1.9 version ByteBuf littleEndianView = buffer.order(ByteOrder.LITTLE_ENDIAN);