Module tsukurou::world[][src]

Data structures for handling world data.

Defines the World, the parent structure for all world data; the Chunk, a grouping of blocks for dynamic world loading; and the Block, the base unit of construction in the world. Additionally provides a persistence scheme using WorldLoader.

Modules

block

The Block and its utilities.

chunk

The Chunk and its utilities.

Structs

Block

Encapsulates any possible state that a block in the world can have.

BlockUnit

A marker type for Location that is required because of bug rust-lang/rust#26925 preventing us from using the actual Block structure.

Blocks

A borrowing iterator over the blocks loaded by a world. Created using the World::blocks() method.

BlocksMut

A mutably borrowing iterator over the blocks loaded by a world. Created using the World::blocks_mut() method.

Chunk

A cube of blocks. Worlds use them to organize blocks so that they can be dynamically loaded as needed.

ChunkUnit

A marker type for Location that is required because of bug rust-lang/rust#26925 preventing us from using the actual Chunk structure.

Displacement

A delta between two locations, or a location relative to another.

Location

An absolute location in the world, most commonly used to identify Blocks and Chunks within the World.

World

An ordered collection of blocks that are arranged in 3D space, dynamically loaded as "chunks".

Type Definitions

BlockDisplacement

Alias for displacements measured in blocks.

BlockLocation

Alias for locations for Blocks in units of blocks.

ChunkDisplacement

Alias for displacements measured in chunks.

ChunkLocation

Alias for locations for Chunks in units of chunks.

Chunks

A borrowing iterator over the chunks currently loaded by a world. Created using the World::chunks() method.

ChunksMut

A mutably borrowing iterator over the chunks currently loaded by a world. Created using the World::chunks_mut() method.

UnloadedChunks

An iterator over chunks that were unloaded by a call to World::unload_all().