Type Alias veloren_common::terrain::TerrainChunk

source ·
pub type TerrainChunk = Chonk<Block, TerrainChunkSize, TerrainChunkMeta>;

Aliased Type§

struct TerrainChunk {
    z_offset: i32,
    sub_chunks: Vec<Chunk<Block, SubChunkSize<TerrainChunkSize>, TerrainChunkMeta>>,
    below: Block,
    above: Block,
    meta: TerrainChunkMeta,
    phantom: PhantomData<TerrainChunkSize>,
}

Fields§

§z_offset: i32§sub_chunks: Vec<Chunk<Block, SubChunkSize<TerrainChunkSize>, TerrainChunkMeta>>§below: Block§above: Block§meta: TerrainChunkMeta§phantom: PhantomData<TerrainChunkSize>

Implementations§

source§

impl TerrainChunk

source

pub fn water(sea_level: i32) -> TerrainChunk

Generate an all-water chunk at a specific sea level.

source

pub fn find_accessible_pos( &self, spawn_wpos: Vec2<i32>, ascending: bool, ) -> Vec3<f32>

Find the highest or lowest accessible position within the chunk