pub trait BlockStateBehaviorExt {
// Required methods
fn is_liquid_container(&self) -> bool;
fn can_be_replaced_by_fluid(&self, fluid_block: BlockRef) -> bool;
fn can_be_replaced(&self, context: &BlockPlaceContext<'_>) -> bool;
fn is_pathfindable(&self, computation_type: PathComputationType) -> bool;
fn is_bed(&self) -> bool;
fn is_liquid_block(&self) -> bool;
fn is_possible_to_respawn_in_this(&self) -> bool;
}Expand description
Extension trait for BlockStateId that provides access to behavior-dependent methods.
This is separate from BlockStateExt (in steel-registry) because these methods
require access to the behavior registry which lives in steel-core.
Required Methods§
Sourcefn is_liquid_container(&self) -> bool
fn is_liquid_container(&self) -> bool
Returns whether this block state belongs to a vanilla LiquidBlockContainer.
Sourcefn can_be_replaced_by_fluid(&self, fluid_block: BlockRef) -> bool
fn can_be_replaced_by_fluid(&self, fluid_block: BlockRef) -> bool
Returns whether this block state can be replaced by the given fluid block.
Sourcefn can_be_replaced(&self, context: &BlockPlaceContext<'_>) -> bool
fn can_be_replaced(&self, context: &BlockPlaceContext<'_>) -> bool
Returns whether this block state can be replaced in this placement context.
Sourcefn is_pathfindable(&self, computation_type: PathComputationType) -> bool
fn is_pathfindable(&self, computation_type: PathComputationType) -> bool
Returns whether this block state is pathfindable for the supplied vanilla computation type.
Sourcefn is_liquid_block(&self) -> bool
fn is_liquid_block(&self) -> bool
Returns whether this block state extends LiquidBlock.
Sourcefn is_possible_to_respawn_in_this(&self) -> bool
fn is_possible_to_respawn_in_this(&self) -> bool
Returns whether this block state can be occupied by a forced respawn position
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".