From 9ea6c34543d6052f1e91b5035e87b756cb2358b8 Mon Sep 17 00:00:00 2001 From: creeper123123321 <7974274+creeper123123321@users.noreply.github.com> Date: Sat, 19 Oct 2019 15:35:34 -0300 Subject: [PATCH] use setflatblock --- .../api/type/types/version/ChunkSectionType1_13.java | 3 +-- .../ViaVersion/api/type/types/version/ChunkSectionType1_9.java | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/common/src/main/java/us/myles/ViaVersion/api/type/types/version/ChunkSectionType1_13.java b/common/src/main/java/us/myles/ViaVersion/api/type/types/version/ChunkSectionType1_13.java index 171915be3..ca439ee2a 100644 --- a/common/src/main/java/us/myles/ViaVersion/api/type/types/version/ChunkSectionType1_13.java +++ b/common/src/main/java/us/myles/ViaVersion/api/type/types/version/ChunkSectionType1_13.java @@ -43,8 +43,7 @@ public class ChunkSectionType1_13 extends Type { blockData[i] = buffer.readLong(); } CompactArrayUtil.iterateCompactArray(bitsPerBlock, ChunkSection.SIZE, blockData, - bitsPerBlock == GLOBAL_PALETTE ? (i, val) -> chunkSection.setBlock(i, val >> 4, val & 0xF) - : chunkSection::setPaletteIndex); + bitsPerBlock == GLOBAL_PALETTE ? chunkSection::setFlatBlock : chunkSection::setPaletteIndex); } return chunkSection; diff --git a/common/src/main/java/us/myles/ViaVersion/api/type/types/version/ChunkSectionType1_9.java b/common/src/main/java/us/myles/ViaVersion/api/type/types/version/ChunkSectionType1_9.java index b91f69747..d77509ba9 100644 --- a/common/src/main/java/us/myles/ViaVersion/api/type/types/version/ChunkSectionType1_9.java +++ b/common/src/main/java/us/myles/ViaVersion/api/type/types/version/ChunkSectionType1_9.java @@ -52,7 +52,7 @@ public class ChunkSectionType1_9 extends Type { blockData[i] = buffer.readLong(); } CompactArrayUtil.iterateCompactArray(bitsPerBlock, ChunkSection.SIZE, blockData, - bitsPerBlock == GLOBAL_PALETTE ? (i, val) -> chunkSection.setBlock(i, val >> 4, val & 0xF) + bitsPerBlock == GLOBAL_PALETTE ? chunkSection::setFlatBlock : chunkSection::setPaletteIndex); }