Keep unsimulated entities' UUIDs across saves and save player equipment as vanilla
save_entities forgot the UUID and compound of entities Horizon keeps but does not simulate, so the save on quit gave them new UUIDs. The player's equipment is written as LivingEntity does: omitted when empty, where PlayerEquipment.isEmpty also counts the selected hotbar item. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -815,6 +815,7 @@ impl Game<'_> {
|
||||
.chain(self.armor_stands.iter().map(|e| e.id))
|
||||
.chain(self.item_frames.iter().map(|e| e.id))
|
||||
.chain(self.paintings.iter().map(|e| e.id))
|
||||
.chain(self.others.iter().map(|e| e.id))
|
||||
.collect();
|
||||
self.persist.uuids.retain(|id, _| alive.contains(id));
|
||||
self.persist.raw.retain(|id, _| alive.contains(id));
|
||||
|
||||
Reference in New Issue
Block a user