Skip to main content

ChunkGenerator

Trait ChunkGenerator 

pub trait ChunkGenerator:
    Send
    + Sync
    + 'static {
    // Required method
    fn build_terrain(&self, chunk: &mut dyn ChunkAccess);
}
Expand description

A mod’s chunk generator: vanilla’s ChunkGenerator, whose code answers for a level stem with "generator": {"type": "modid:void"}. Implemented once, kept by the game; deterministic and stateless.

Required Methods§

fn build_terrain(&self, chunk: &mut dyn ChunkAccess)

ChunkGenerator.buildTerrain: write the terrain of chunk, which starts as air. The same seed and chunk give the same blocks.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§