pub fn remove_despawned_entities_from_indexes(
commands: Commands<'_, '_>,
entity_uuid_index: ResMut<'_, EntityUuidIndex>,
instance_container: Res<'_, InstanceContainer>,
query: Query<'_, '_, (Entity, &EntityUuid, &MinecraftEntityId, &Position, &InstanceName, &LoadedBy), (Changed<LoadedBy>, Without<LocalEntity>)>,
entity_id_index_query: Query<'_, '_, &mut EntityIdIndex>,
)
Expand description
Despawn entities that aren’t being loaded by anything.