Module chunk_storage

Module chunk_storage 

Source

Structs§

Chunk
A single chunk in a world (16*?*16 blocks).
ChunkStorage
A storage for chunks where they’re only stored weakly, so if they’re not actively being used somewhere else they’ll be forgotten.
PartialChunkStorage
An efficient storage of chunks for a client that has a limited render distance.
Section
A section of a chunk, i.e. a 161616 block area.

Functions§

calculate_chunk_storage_range
Get the actual stored view distance for the selected view distance.
get_block_state_from_sections
Get the block state at the given position from a list of sections. Returns None if the position is out of bounds.
in_range_for_view_center_and_radius
section_index
Get the index of where a section is in a chunk based on its y coordinate and the minimum y coordinate of the world.