pub trait BlockSource {
// Required methods
fn get_block(&self, pos: BlockPosition) -> Option<&InputBlock>;
fn iter_blocks(
&self,
) -> Box<dyn Iterator<Item = (BlockPosition, &InputBlock)> + '_>;
fn bounds(&self) -> BoundingBox;
}Expand description
Trait for block data sources (allows integration with Nucleation).
Required Methods§
Sourcefn get_block(&self, pos: BlockPosition) -> Option<&InputBlock>
fn get_block(&self, pos: BlockPosition) -> Option<&InputBlock>
Get the block at a position.
Sourcefn iter_blocks(
&self,
) -> Box<dyn Iterator<Item = (BlockPosition, &InputBlock)> + '_>
fn iter_blocks( &self, ) -> Box<dyn Iterator<Item = (BlockPosition, &InputBlock)> + '_>
Iterate over all non-air blocks.
Sourcefn bounds(&self) -> BoundingBox
fn bounds(&self) -> BoundingBox
Get the bounding box of all blocks.