From 4f2674275d1286a1b5193f2ab07666089213cc0b Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Sat, 17 Oct 2026 00:34:14 +0200 Subject: [PATCH] horizon-prepare: keep the registry and command reports with the prepared files A dedicated server reads registries.json and commands.json (the data generator's reports) next to the prepared resources, and otherwise only finds them in the .local/datagen folder of a development checkout. A prepared folder copied or mounted on its own, as the Docker image expects, stopped the server at start with "registries.json not found next to the resources". The prepare step now copies both reports into the folder (again whenever the server jar changes). Co-Authored-By: Claude Opus 5.5 --- crates/horizon-prepare/src/lib.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/crates/horizon-prepare/src/lib.rs b/crates/horizon-prepare/src/lib.rs index f997be326..ac1e97af8 100644 --- a/crates/horizon-prepare/src/lib.rs +++ b/crates/horizon-prepare/src/lib.rs @@ -802,6 +802,17 @@ fn steps( } } + // The registry and command reports, which the game reads next to these + // files when it serves players (a dedicated server, a LAN world): kept + // here too, so this folder works when it is copied or mounted alone. + let reports = run.local.join("datagen").join("out").join("reports"); + for name in ["registries.json", "commands.json"] { + let (from, to) = (reports.join(name), root.join(name)); + if from.is_file() && (!to.exists() || !run.same("server_sha256")) { + copy(&from, &to)?; + } + } + // Biome parameter tables come from the data generator reports above. prepare_worldgen(run)?;