Phase 4: regenerating ore veins, each tier in one zone

Regenerating Ore Veins 1.4.0 (CurseForge only, MIT). tools/zone_ores.py
writes its config from world/zones.json: surface zones as boxes from the
zone grid, cave tiers by cave biome, 21 tiers including Cobblemon's
evolution stones (their natural ores are off). The world report now
allows ore only in tracked veins inside their tier's zone. Self-tests:
a mined vein regrows after its chunk unloads and after a restart (new
after_restart pass in selftest.py and quick_check.py). make_world places
showcase veins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
claudeandClaude Opus 5.5 committed 2026-10-30 02:30:34 +01:00
1 parent 82f540aa51
commit 5d275e4e14
19 files changed
+10843 -37

No files matched your search

+23 -3
View File
@@ -12,9 +12,13 @@
square of structure_radius around each, plus spawn_radius around spawn.
5. Force-load the chunks around the sampled village for a few seconds, as a
nearby player would, so Lootr converts its loot chests.
6. Stop, scan the server log, and run tools/world_report.py --sample on the
sampled world: no ore, no vanilla mobs or mob sources, only listed biomes,
gamerules as in the recipe, and no vanilla loot chest left near the village.
6. Stop, scan the server log, boot the same world again and run the second
halves of the self-tests that span a restart (`selftest run after_restart`,
e.g. a mined ore vein regrows), stop and scan that log too.
7. Run tools/world_report.py --sample on the sampled world: ore only in
regenerating veins inside their tier's zone, no vanilla mobs or mob sources,
only listed biomes, gamerules as in the recipe, and no vanilla loot chest
left near the village.
The border, strongholds-inside-border and the map need the whole island:
tools/make_world.py checks those when the template is rebuilt.
@@ -93,6 +97,7 @@ def main():
failures.append(f"{type(e).__name__}: {e}")
failures += [f"log: {line}" for line in scan_log(server.log)]
failures += restart_selftest(args_file, props)
report = subprocess.run([sys.executable, "-I", str(ROOT / "tools/world_report.py"), str(SERVER / LEVEL),
"--sample", "--json", str(ROOT / "build/quick-check-report.json")])
if report.returncode:
@@ -114,5 +119,20 @@ def main():
print("QUICK CHECK PASSED")
def restart_selftest(args_file, props):
"""Boot the quick-check world again and run the self-tests' after-restart halves; returns the failures."""
failures = []
with Server(args_file, props, heap="8G", stdout_name="quick-check-restart-stdout.log",
jvm_args=SELFTEST_JVM_ARGS) as server:
try:
print(f"server restarted in {server.wait_ready():.0f}s")
failures += server.run_selftest(after_restart=True)
server.command("save-all flush")
server.stop()
except Exception as e: # report; the context manager still kills the process
failures.append(f"{type(e).__name__}: {e}")
return failures + [f"log after restart: {line}" for line in scan_log(server.log)]
if __name__ == "__main__":
main()