diff --git a/crates/horizon-client/src/entity_nbt.rs b/crates/horizon-client/src/entity_nbt.rs index 4b1fb54b4..11601db78 100644 --- a/crates/horizon-client/src/entity_nbt.rs +++ b/crates/horizon-client/src/entity_nbt.rs @@ -601,7 +601,9 @@ pub fn mob_from_nbt(tag: &Tag, types: &HashMap>, id: u32) - m.extra.main_hand = None; } m.death_time = number(tag.get("DeathTime")).unwrap_or(0) as i32; - m.persistent |= flag(tag, "PersistenceRequired"); + // Mob.readAdditionalSaveData overrides what the constructor set (copper + // golems and elder guardians start persistent). + m.persistent = flag(tag, "PersistenceRequired"); m.extra.pick_up_loot = flag(tag, "CanPickUpLoot"); m.custom_name = custom_name(tag); if m.kind.category == "creature" { diff --git a/crates/horizon-world/src/worldgen/structure/monument.rs b/crates/horizon-world/src/worldgen/structure/monument.rs index 3cc08964d..39959557e 100644 --- a/crates/horizon-world/src/worldgen/structure/monument.rs +++ b/crates/horizon-world/src/worldgen/structure/monument.rs @@ -350,7 +350,8 @@ impl W<'_, '_> { "minecraft:elder_guardian", pos, true, - false, + // The ElderGuardian constructor's setPersistenceRequired. + true, ))?; } Ok(())