From 7493c8d7b71939b20e133b051d42472e79d09623 Mon Sep 17 00:00:00 2001 From: KennyTV Date: Thu, 11 Feb 2021 00:00:02 +0100 Subject: [PATCH] Add setSections to Chunk --- .../myles/ViaVersion/api/minecraft/chunks/BaseChunk.java | 7 ++++++- .../us/myles/ViaVersion/api/minecraft/chunks/Chunk.java | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/us/myles/ViaVersion/api/minecraft/chunks/BaseChunk.java b/common/src/main/java/us/myles/ViaVersion/api/minecraft/chunks/BaseChunk.java index 8fbbebdb8..95c5902d0 100644 --- a/common/src/main/java/us/myles/ViaVersion/api/minecraft/chunks/BaseChunk.java +++ b/common/src/main/java/us/myles/ViaVersion/api/minecraft/chunks/BaseChunk.java @@ -14,7 +14,7 @@ public class BaseChunk implements Chunk { protected boolean ignoreOldLightData; protected BitSet chunkSectionBitSet; protected int bitmask; - protected final ChunkSection[] sections; + protected ChunkSection[] sections; protected int[] biomeData; protected CompoundTag heightMap; protected final List blockEntities; @@ -97,6 +97,11 @@ public class BaseChunk implements Chunk { return sections; } + @Override + public void setSections(ChunkSection[] sections) { + this.sections = sections; + } + @Override @Nullable public int[] getBiomeData() { diff --git a/common/src/main/java/us/myles/ViaVersion/api/minecraft/chunks/Chunk.java b/common/src/main/java/us/myles/ViaVersion/api/minecraft/chunks/Chunk.java index d2ba3a681..adce225f5 100644 --- a/common/src/main/java/us/myles/ViaVersion/api/minecraft/chunks/Chunk.java +++ b/common/src/main/java/us/myles/ViaVersion/api/minecraft/chunks/Chunk.java @@ -50,6 +50,8 @@ public interface Chunk { ChunkSection[] getSections(); + void setSections(ChunkSection[] sections); + @Nullable int[] getBiomeData();