From ad37c65d25002090c55fd47496f91b1e0d8400a2 Mon Sep 17 00:00:00 2001 From: mworzala Date: Fri, 26 Jul 2024 01:15:50 -0400 Subject: [PATCH] fix: save light without requiring LightingChunk (for AnvilPolar to save correctly) --- .../java/net/hollowcube/polar/PolarLoader.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/net/hollowcube/polar/PolarLoader.java b/src/main/java/net/hollowcube/polar/PolarLoader.java index 000bcb3..d059e19 100644 --- a/src/main/java/net/hollowcube/polar/PolarLoader.java +++ b/src/main/java/net/hollowcube/polar/PolarLoader.java @@ -7,7 +7,10 @@ import net.minestom.server.command.builder.arguments.minecraft.ArgumentBlockState; import net.minestom.server.command.builder.exception.ArgumentSyntaxException; import net.minestom.server.exception.ExceptionManager; -import net.minestom.server.instance.*; +import net.minestom.server.instance.Chunk; +import net.minestom.server.instance.IChunkLoader; +import net.minestom.server.instance.Instance; +import net.minestom.server.instance.Section; import net.minestom.server.instance.block.Block; import net.minestom.server.instance.block.BlockManager; import net.minestom.server.instance.light.LightCompute; @@ -365,12 +368,9 @@ private void updateChunkData(@NotNull Short2ObjectMap blockCache, @NotNu biomeData[x + z * 4 + y * 4 * 4] = paletteId; }); - byte[] blockLight = null, skyLight = null; - if (chunk instanceof LightingChunk) { - blockLight = section.blockLight().array(); - skyLight = section.skyLight().array(); - } - + byte[] blockLight = section.blockLight().array(); + byte[] skyLight = section.skyLight().array(); + sections[i] = new PolarSection( blockPalette.toArray(new String[0]), blockData, biomePalette.toArray(new String[0]), biomeData,