Structures: save the remaining legacy pieces as vanilla does

Desert and jungle temples, swamp huts, buried treasure, ocean
monuments, mineshafts, fortresses and strongholds save the tag their
StructurePiece subclass writes, with the state placement leaves: the
height a scattered feature settled on, the buried treasure chest,
placed chests, traps and spawners, and the swamp hut's witch and cat.
With these every StructurePieceType is saved.

test_structure_start_nbt_parity gets one site of each of these kinds,
and a badlands mineshaft.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
FusselTV
2026-10-26 00:09:45 +01:00
parent b7b36836af
commit ad50996f7c
8 changed files with 196 additions and 2 deletions
+5 -2
View File
@@ -4,8 +4,8 @@
The oracle (VanillaStructureStartOracle with HORIZON_START_NBT) generates the start of each case's chunk with the
pinned server's own classes and prints its tag; the probe (world_probe structure_start_nbt) prints the tag
Horizon saves for the same chunk. Both print sorted keys and typed numbers, and the lines must be identical.
The cases are the start chunks of one site of every structure kind built from jigsaw pools or templates (seed
12345).
The cases are the start chunks of one site of every structure kind (seed 12345, and a badlands mineshaft of seed
-7777), which between them use every StructurePieceType.
"""
import argparse
import collections
@@ -31,6 +31,9 @@ CASES = [
(12345, 'overworld', 114, -133), (12345, 'overworld', -16, 5), (12345, 'overworld', -109, 91),
(12345, 'overworld', 0, -18), (12345, 'overworld', -150, 51), (12345, 'overworld', 61, 49),
(12345, 'the_nether', 0, -18), (12345, 'the_nether', -22, 6), (12345, 'the_end', -15, -76),
(12345, 'overworld', 38, -115), (12345, 'overworld', -238, -313), (12345, 'overworld', -95, 2),
(12345, 'overworld', -126, -106), (12345, 'overworld', 47, 25), (12345, 'overworld', 110, 23),
(12345, 'overworld', 4, -1), (12345, 'the_nether', -13, -37), (-7777, 'overworld', 75, 84),
]