Skip to main content

Instance

Type Alias Instance 

Source
pub type Instance = World;
👎Deprecated: renamed to World.

Aliased Type§

pub struct Instance {
    pub chunks: ChunkStorage,
    pub entities_by_chunk: HashMap<ChunkPos, HashSet<Entity>>,
    pub entity_by_id: HashMap<MinecraftEntityId, Entity, BuildHasherDefault<NoHashHasher<MinecraftEntityId>>>,
    pub registries: RegistryHolder,
}

Fields§

§chunks: ChunkStorage§entities_by_chunk: HashMap<ChunkPos, HashSet<Entity>>

An index of all the entities we know are in the chunks of the world

§entity_by_id: HashMap<MinecraftEntityId, Entity, BuildHasherDefault<NoHashHasher<MinecraftEntityId>>>

An index of Minecraft entity IDs to Azalea ECS entities.

You should avoid using this (particularly if you’re using swarms) and instead use azalea_entity::EntityIdIndex, since some servers may give different entity IDs for the same entities to different players.

§registries: RegistryHolder