Struct base::gen::world::WorldGenerator
[−]
[src]
pub struct WorldGenerator { // some fields omitted }
Main type to generate the game world. Implements the ChunkProvider
trait
(TODO, see #8).
Methods
impl WorldGenerator
[src]
fn with_seed(seed: u64) -> Self
Creates the generator with the given seed.
fn seed(&self) -> u64
Returns the seed of this world generator.
Trait Implementations
impl ChunkProvider for WorldGenerator
[src]
fn load_chunk(&self, index: ChunkIndex) -> Option<Chunk>
Attempt to load a chunk from the world. This may fail (e.g. when loading from a file and the chunk is not yet saved in the file). Read more
fn get_plant_list(&self) -> Vec<Plant>
Returns a Vector of all specific plants to be rendered in the world.
fn is_chunk_loadable(&self, _: ChunkIndex) -> bool
Determines whether or not the chunk at the given position can be loaded. This function is expected to return quickly. Read more