aboutsummaryrefslogtreecommitdiff
path: root/azalea-entity/src
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-06-04 21:53:06 -0600
committermat <git@matdoes.dev>2025-06-04 21:53:06 -0600
commitbe81877137df57de26030bceecbef68b9f05b3e5 (patch)
treea90f448668a012ec563b5dd8da28f551cf8fb87b /azalea-entity/src
parent93a96786a8a46068f5d9d7d3e503645d7fc4b830 (diff)
downloadazalea-drasl-be81877137df57de26030bceecbef68b9f05b3e5.tar.xz
fix panic when receiving add_entity and start_configuration in the same update
Diffstat (limited to 'azalea-entity/src')
-rw-r--r--azalea-entity/src/plugin/mod.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/azalea-entity/src/plugin/mod.rs b/azalea-entity/src/plugin/mod.rs
index 03afe7cd..6a6c9615 100644
--- a/azalea-entity/src/plugin/mod.rs
+++ b/azalea-entity/src/plugin/mod.rs
@@ -46,6 +46,11 @@ impl Plugin for EntityPlugin {
Update,
(
(
+ // remove_despawned_entities_from_indexes is done again here to correctly
+ // handle the case where an entity is spawned and then the world is removed at
+ // the same time (like with ClientboundStartConfiguration).
+ indexing::remove_despawned_entities_from_indexes
+ .in_set(EntityUpdateSet::Deindex),
indexing::update_entity_chunk_positions,
indexing::insert_entity_chunk_position,
)