Incorrect entity data for spawned entity
rj00a opened this issue · 1 comments
rj00a commented
Valence Version
What You Did
From discord:
commands.spawn(VillagerEntityBundle {
location: Location(inst_ent),
position: Position::new([0.5, 104.0, 0.5]),
..Default::default()
});
commands.spawn(VillagerEntityBundle {
location: Location(inst_ent),
position: Position::new([0.5, 104.0, 3.0]),
villager_villager_data: VillagerData({
valence::entity::VillagerData {
kind: valence::entity::VillagerKind::Jungle,
profession: VillagerProfession::Armorer,
level: 5,
}
}),
..Default::default()
});
What Went Wrong
One of those villagers is on fire(!)
Additional Information
Something with TrackedData
or one of the systems that initializes the tracked data is probably bugged.
There is a separate issue where tracked data is initialized with incorrect default values from other entities, but this looks like a different problem.
pepperoni21 commented
commands.spawn(VillagerEntityBundle {
location: Location(inst_ent),
position: Position::new([0.5, 104.0, 3.0]),
villager_villager_data: VillagerData({
valence::entity::VillagerData {
kind: valence::entity::VillagerKind::Jungle,
profession: VillagerProfession::Armorer,
level: 5,
}
}),
..Default::default()
});
This one spawns an on fire villager, by not specifying the villager_villager_data
, the villager is not on fire.
Edit: For some reason, the villager is on fire only if its level is even (0-2-4-6-8...)