From 34117b70eeea50938a375b3bf27f76524abe583c Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Sat, 10 Oct 2026 08:21:28 +0200 Subject: [PATCH] Make the chunk oracle report no light during features, like an unlit generation chunk Co-Authored-By: Claude Sonnet 5.5 --- .../horizonlab/parity/VanillaChunkGenerationOracle.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaChunkGenerationOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaChunkGenerationOracle.java index 9d474a932..a5e6c1402 100644 --- a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaChunkGenerationOracle.java +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaChunkGenerationOracle.java @@ -291,7 +291,13 @@ public final class VanillaChunkGenerationOracle { public LightChunk getChunkForLighting(int x, int z) { return null; } public BlockGetter getLevel() { return blockGetter; } }; - OracleLevel.light = new net.minecraft.world.level.lighting.LevelLightEngine(lightGetter, true, dimensionType.hasSkyLight()); + // Features run before any light exists in a real server, so every brightness query reads 0 (an empty engine would claim full sky light). + OracleLevel.light = new net.minecraft.world.level.lighting.LevelLightEngine(lightGetter, true, dimensionType.hasSkyLight()) { + @Override + public int getRawBrightness(final net.minecraft.core.BlockPos pos, final int skyDampen) { + return 0; + } + }; var check = new StructureCheck((pos, visitor) -> CompletableFuture.completedFuture(null), access, templates, levelKey, generator, randomState, height, biomeSource, seed, DataFixers.getDataFixer()); var level = (ServerLevel) allocate.invoke(unsafe, OracleLevel.class); OracleLevel.structures = new StructureManager(level, new WorldOptions(seed, true, false), check);