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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user