Villagers: report a failed random_sequences write

The merchant's random sequences (the salts that keep its offers stable) were
written with the result dropped, so a failed write rerolled every trade on
the next load with nothing in the log. Log it like the other save paths.

Co-Authored-By: Hermes Agent (Nous Research) <noreply@nousresearch.com>
This commit is contained in:
Alexander
2026-10-28 11:38:23 +03:00
parent b6c936f82b
commit 23d2146066
+3 -1
View File
@@ -137,7 +137,9 @@ impl Game<'_> {
horizon_world::nbt::Tag::Int(horizon_world::DATA_VERSION),
),
]);
let _ = horizon_client::save::write_dat(&self.random_sequences_path(), tag);
if let Err(e) = horizon_client::save::write_dat(&self.random_sequences_path(), tag) {
log::warn!("the villager random sequences were not written: {e}");
}
}
/// `AbstractVillager.addOffersFromTradeSet` with the world's random
/// sequence of the set, at the merchant's position.