Skip to main content

GrowingPlantHeadBehavior

Trait GrowingPlantHeadBehavior 

Source
pub trait GrowingPlantHeadBehavior: Send + Sync {
    // Required methods
    fn is_max_age(&self, state: BlockStateId) -> bool;
    fn get_max_age_state(&self, state: BlockStateId) -> BlockStateId;
}
Expand description

Shared behavior exposed by blocks in vanilla’s GrowingPlantHeadBlock hierarchy.

Required Methods§

Source

fn is_max_age(&self, state: BlockStateId) -> bool

Returns whether the block is at maximum growth age.

Source

fn get_max_age_state(&self, state: BlockStateId) -> BlockStateId

Returns the block state at maximum age.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§