Struct mc_core::world::level::EntityStorage[][src]

pub struct EntityStorage {
    pub ecs: EcsWorld,
    // some fields omitted
}

Fields

ecs: EcsWorld

The ECS storing all entities in the level.

Implementations

Spawn an entity in the level owning this storage, you must give its type and position, its handle is returned. If the given entity type is not supported by the level’s environment, None is returned.

Safety:

This method is made for internal use because the entity type must be supported checked to be supported by level’s environment. The returned entity handle must also be added in the the associated chunk if existing.

See:

Use Level::spawn_entity instead of this method if you want to avoid safety issues.

Add a raw entity from a builder, this method is unsafe because the caller must ensure that the builder contains a BaseEntity component with an entity

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.