block_from_structure

Function block_from_structure 

Source
pub fn block_from_structure<'a>(
    index: IndexRef<'_>,
    sblock: &'a StructureBlock,
    pos: Vec3<i32>,
    structure_pos: Vec2<i32>,
    structure_seed: u32,
    sample: &ColumnSample<'_>,
    block_for_sprite: impl Fn() -> Block,
    calendar: Option<&Calendar>,
    units: &Vec2<Vec2<i32>>,
) -> Option<(Block, Option<SpriteCfg>, Option<&'a str>)>
Expand description

Determines the kind of block to render based on the structure’s definition. The third string return value is the name of an Entity to spawn, if the StructureBlock dictates one should be returned (such as an EntitySpawner).