From 85242053e2da8773a0809bdaa9cf26ba512ce4c3 Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 13 Oct 2026 03:59:11 +0200 Subject: [PATCH] save_roundtrip: accept the promotion of vanilla's border proto chunks Co-Authored-By: Claude Opus 5.5 --- tools/test_save_roundtrip_parity.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/test_save_roundtrip_parity.py b/tools/test_save_roundtrip_parity.py index 11dfdae56..ec28c90f8 100644 --- a/tools/test_save_roundtrip_parity.py +++ b/tools/test_save_roundtrip_parity.py @@ -52,6 +52,12 @@ IGNORED = { r'^chunk\.LastUpdate$': 'game time of the save (Horizon saves at its own time)', r'^chunk\.InhabitedTime$': 'ticks the chunk was loaded; differs by the time Horizon ran', r'^chunk\.isLightOn$': 'light is recomputed by vanilla when absent', + # Vanilla's server (view distance 4) leaves a border of proto chunks; Horizon's + # render distance 6 may finish some, as vanilla does when it loads the world at + # that distance. Their blocks are still compared; only what a full chunk saves + # differently (no worldgen heightmaps, entities in entities/) is accepted. + r'^chunk\.promoted\.(Status|Heightmaps\.(OCEAN_FLOOR_WG|WORLD_SURFACE_WG)|entities)$': + 'a proto chunk vanilla left at its view distance, finished by Horizon', # Horizon keeps simulating between loading and saving (it needs a few seconds of # chunk generation first), so counters and positions of live things move on. r'^chunk\.block_entities\.\(2, -60, 5\)\.(cooking_time_spent|lit_time_remaining|Items\[\]\.count)$': @@ -445,6 +451,8 @@ def compare_chunks(vanilla, horizon, report): ha, hs = normalize_chunk(horizon[key]) out = [] diff(va, ha, 'chunk', out) + if va.get('Status') != 'minecraft:full' and ha.get('Status') == 'minecraft:full': + out = [(path.replace('chunk.', 'chunk.promoted.', 1), p, q) for path, p, q in out] for y in sorted(set(vs) | set(hs)): empty = {'blocks': ['minecraft:air'] * 4096, 'biomes': None, 'BlockLight': None, 'SkyLight': None} a, b = vs.get(y, empty), hs.get(y, empty)