Harness names differing chunks; spawner update tags without keepPacked

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-13 01:02:14 +02:00
parent 5f5b6119d2
commit 6f84b9ae94
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -356,7 +356,7 @@ fn saved_update_tag(chunk: &Chunk, pos: (i32, i32, i32)) -> Option<Tag> {
let Tag::Compound(mut c) = crate::block_entity_nbt::canonical(tag)? else {
return None;
};
for key in ["id", "x", "y", "z", "SpawnPotentials", "components"] {
for key in ["id", "x", "y", "z", "keepPacked", "SpawnPotentials", "components"] {
c.remove(&key.into());
}
Some(Tag::Compound(c))
+7
View File
@@ -313,6 +313,13 @@ def main():
import difflib
for line in difflib.unified_diff(vanilla, horizon, 'vanilla', 'horizon', n=0, lineterm=''):
differences.append(line[:400])
# Name the chunks that differ instead of the whole line.
chunk_lines = [dict(re.findall(r'(-?\d+,-?\d+)=(\w+)', next((l for l in side if l.startswith('play-chunks')), '')))
for side in (vanilla, horizon)]
for key in sorted(set(chunk_lines[0]) | set(chunk_lines[1])):
a, b = chunk_lines[0].get(key), chunk_lines[1].get(key)
if a != b:
differences.append(f'chunk {key}: vanilla {a} horizon {b}')
if differences or errors:
raise AssertionError(f'{len([d for d in differences if d[:1] in "+-" and d[:3] not in ("+++", "---")])} differing lines '
f'(see {build}/vanilla.txt and horizon.txt):\n' + '\n'.join(differences[:80]))