Skip to main content

remove_despawned_entities_from_indexes

Function remove_despawned_entities_from_indexes 

Source
pub fn remove_despawned_entities_from_indexes(
    commands: Commands<'_, '_>,
    entity_uuid_index: ResMut<'_, EntityUuidIndex>,
    worlds: Res<'_, Worlds>,
    query: Query<'_, '_, (Entity, &EntityUuid, &MinecraftEntityId, &Position, &WorldName, &LoadedBy), (Changed<LoadedBy>, Without<LocalEntity>)>,
    entity_id_index_query: Query<'_, '_, &mut EntityIdIndex>,
)
Expand description

Despawn entities that aren’t being loaded by anything.