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

pub struct Level {
    pub chunks: ChunkStorage,
    pub entities: EntityStorage,
    // some fields omitted
}
Expand description

Main storage for a level, part of a World. This structure is intentionally not Sync + Send, however each chunk is stored in a RwLock in order to make them shared across threads if you want.

Fields

chunks: ChunkStorage

Chunk storage.

entities: EntityStorage

Entities storage.

Implementations

Return the unique ID (unique in the owning world).

Return the level environment used by this level.

Return the minimum and maximum chunks position allowed in this world. The limits can -128 to 127, it is more than enough.

Request internal level source to load the given chunk.

Poll loaded chunks from internal level source, all successfully loaded chunks are added to the underlying LevelStorage. The callback is called for each loaded chunks or loading error.

Poll loaded chunks from internal level source, all successfully loaded chunks are added to the underlying LevelStorage.

Returns the number of chunks being loaded or queued for loading (use load_chunks or load_chunks_with_callback to load actually them.

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.