pub struct FireBlock {
block: BlockRef,
}Expand description
Behavior for fire blocks.
Fields§
§block: BlockRefImplementations§
Source§impl FireBlock
impl FireBlock
Sourcepub(crate) fn in_portal_world(world: &World) -> bool
pub(crate) fn in_portal_world(world: &World) -> bool
Returns true if the world supports nether portal creation.
Vanilla expresses this in terms of dimensions; Steel checks the loaded world’s vanilla dimension type.
Sourcepub(crate) fn can_be_placed_at(
world: &Arc<World>,
pos: BlockPos,
forward_dir: Direction,
) -> bool
pub(crate) fn can_be_placed_at( world: &Arc<World>, pos: BlockPos, forward_dir: Direction, ) -> bool
Checks if fire can be placed at pos, matching vanilla’s BaseFireBlock.canBePlacedAt.
Position must be air AND (fire can survive there OR it’s a valid portal location).
Sourcepub(crate) fn get_state(world: &dyn LevelReader, pos: BlockPos) -> BlockStateId
pub(crate) fn get_state(world: &dyn LevelReader, pos: BlockPos) -> BlockStateId
Steel equivalent of vanilla’s BaseFireBlock.getState for selecting
between soul fire and regular fire.
fn selected_fire_can_survive_at(world: &dyn LevelReader, pos: BlockPos) -> bool
Sourcefn can_survive_at(world: &dyn LevelReader, pos: BlockPos) -> bool
fn can_survive_at(world: &dyn LevelReader, pos: BlockPos) -> bool
Matches vanilla’s FireBlock.canSurvive: block below has a sturdy top face,
or an adjacent block is flammable.
Sourcefn is_portal(world: &Arc<World>, pos: BlockPos, forward_dir: Direction) -> bool
fn is_portal(world: &Arc<World>, pos: BlockPos, forward_dir: Direction) -> bool
Matches vanilla’s BaseFireBlock.isPortal: checks if placing fire here could form a portal.
Requires a portal-capable world, adjacent obsidian, and a valid empty portal shape.
fn queue_entity_contact_effects( effect_collector: &mut InsideBlockEffectCollector, fire_damage: f32, )
Trait Implementations§
Source§impl BlockBehavior for FireBlock
impl BlockBehavior for FireBlock
Source§fn update_shape(
&self,
state: BlockStateId,
world: &dyn ScheduledTickAccess,
pos: BlockPos,
direction: Direction,
_neighbor_pos: BlockPos,
_neighbor_state: BlockStateId,
) -> BlockStateId
fn update_shape( &self, state: BlockStateId, world: &dyn ScheduledTickAccess, pos: BlockPos, direction: Direction, _neighbor_pos: BlockPos, _neighbor_state: BlockStateId, ) -> BlockStateId
Removes fire when its supporting block no longer allows it to survive
Source§fn get_state_for_placement(
&self,
context: &BlockPlaceContext<'_>,
) -> Option<BlockStateId>
fn get_state_for_placement( &self, context: &BlockPlaceContext<'_>, ) -> Option<BlockStateId>
Source§fn can_survive(
&self,
_state: BlockStateId,
world: &dyn LevelReader,
pos: BlockPos,
) -> bool
fn can_survive( &self, _state: BlockStateId, world: &dyn LevelReader, pos: BlockPos, ) -> bool
Source§fn entity_inside(
&self,
_state: BlockStateId,
_world: &Arc<World>,
_pos: BlockPos,
_entity: &dyn Entity,
effect_collector: &mut InsideBlockEffectCollector,
_is_precise: bool,
)
fn entity_inside( &self, _state: BlockStateId, _world: &Arc<World>, _pos: BlockPos, _entity: &dyn Entity, effect_collector: &mut InsideBlockEffectCollector, _is_precise: bool, )
Source§fn on_place(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
old_state: BlockStateId,
_moved_by_piston: bool,
)
fn on_place( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, old_state: BlockStateId, _moved_by_piston: bool, )
Source§fn player_will_destroy(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
_player: &Player,
) -> BlockStateId
fn player_will_destroy( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, _player: &Player, ) -> BlockStateId
Source§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
Source§fn pickup_block(
&self,
world: &Arc<World>,
pos: BlockPos,
state: BlockStateId,
player: Option<&Player>,
) -> Option<PickupResult>
fn pickup_block( &self, world: &Arc<World>, pos: BlockPos, state: BlockStateId, player: Option<&Player>, ) -> Option<PickupResult>
Source§fn update_indirect_neighbour_shapes(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
flags: UpdateFlags,
update_limit: i32,
)
fn update_indirect_neighbour_shapes( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, flags: UpdateFlags, update_limit: i32, )
Source§fn is_possible_to_respawn_in_this(&self, state: BlockStateId) -> bool
fn is_possible_to_respawn_in_this(&self, state: BlockStateId) -> bool
Source§fn can_be_replaced(
&self,
state: BlockStateId,
context: &BlockPlaceContext<'_>,
) -> bool
fn can_be_replaced( &self, state: BlockStateId, context: &BlockPlaceContext<'_>, ) -> bool
Source§fn set_placed_by(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
source: &PlacementSource<'_>,
)
fn set_placed_by( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, source: &PlacementSource<'_>, )
Source§fn attack(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
player: &Player,
)
fn attack( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, player: &Player, )
Source§fn player_destroy(
&self,
world: &Arc<World>,
player: &Player,
pos: BlockPos,
state: BlockStateId,
block_entity: Option<&SharedBlockEntity>,
tool: &ItemStack,
)
fn player_destroy( &self, world: &Arc<World>, player: &Player, pos: BlockPos, state: BlockStateId, block_entity: Option<&SharedBlockEntity>, tool: &ItemStack, )
Source§fn destroy(&self, state: BlockStateId, world: &Arc<World>, pos: BlockPos)
fn destroy(&self, state: BlockStateId, world: &Arc<World>, pos: BlockPos)
Source§fn get_drops(
&self,
state: BlockStateId,
context: &BlockLootContext<'_>,
) -> Option<Vec<ItemStack>>
fn get_drops( &self, state: BlockStateId, context: &BlockLootContext<'_>, ) -> Option<Vec<ItemStack>>
Source§fn spawn_after_break(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
tool: &ItemStack,
drop_experience: bool,
)
fn spawn_after_break( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, tool: &ItemStack, drop_experience: bool, )
Source§fn affect_neighbors_after_removal(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
moved_by_piston: bool,
)
fn affect_neighbors_after_removal( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, moved_by_piston: bool, )
Source§fn use_item_on(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
player: &Player,
hand: InteractionHand,
hit_result: &BlockHitResult,
inv: &mut InventoryAccess,
) -> InteractionResult
fn use_item_on( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, player: &Player, hand: InteractionHand, hit_result: &BlockHitResult, inv: &mut InventoryAccess, ) -> InteractionResult
Source§fn use_without_item(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
player: &Player,
hit_result: &BlockHitResult,
inv: &mut InventoryAccess,
) -> InteractionResult
fn use_without_item( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, player: &Player, hit_result: &BlockHitResult, inv: &mut InventoryAccess, ) -> InteractionResult
use_item_on returns TryEmptyHandInteraction). Read moreSource§fn handle_neighbor_changed(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
source_block: BlockRef,
moved_by_piston: bool,
)
fn handle_neighbor_changed( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, source_block: BlockRef, moved_by_piston: bool, )
Source§fn is_signal_source(
&self,
_state: BlockStateId,
_context: SignalQueryContext,
) -> bool
fn is_signal_source( &self, _state: BlockStateId, _context: SignalQueryContext, ) -> bool
Source§fn is_trapdoor(&self) -> bool
fn is_trapdoor(&self) -> bool
TrapDoorBlock semantics. Read moreSource§fn is_rail(&self) -> bool
fn is_rail(&self) -> bool
BaseRailBlock semantics.Source§fn is_piston_base(&self) -> bool
fn is_piston_base(&self) -> bool
PistonBaseBlock semantics.Source§fn get_own_signal(
&self,
_state: BlockStateId,
_world: &dyn LevelReader,
_pos: BlockPos,
_context: SignalQueryContext,
) -> i32
fn get_own_signal( &self, _state: BlockStateId, _world: &dyn LevelReader, _pos: BlockPos, _context: SignalQueryContext, ) -> i32
Source§fn get_signal(
&self,
state: BlockStateId,
world: &dyn LevelReader,
pos: BlockPos,
_direction: Direction,
context: SignalQueryContext,
) -> i32
fn get_signal( &self, state: BlockStateId, world: &dyn LevelReader, pos: BlockPos, _direction: Direction, context: SignalQueryContext, ) -> i32
direction.Source§fn get_direct_signal(
&self,
_state: BlockStateId,
_world: &dyn LevelReader,
_pos: BlockPos,
_direction: Direction,
_context: SignalQueryContext,
) -> i32
fn get_direct_signal( &self, _state: BlockStateId, _world: &dyn LevelReader, _pos: BlockPos, _direction: Direction, _context: SignalQueryContext, ) -> i32
direction.Source§fn is_redstone_conductor(
&self,
state: BlockStateId,
_world: &dyn LevelReader,
_pos: BlockPos,
) -> bool
fn is_redstone_conductor( &self, state: BlockStateId, _world: &dyn LevelReader, _pos: BlockPos, ) -> bool
Source§fn trigger_event(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
param_a: i32,
param_b: i32,
) -> bool
fn trigger_event( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, param_a: i32, param_b: i32, ) -> bool
Source§fn get_clone_item_stack(
&self,
block: BlockRef,
state: BlockStateId,
include_data: bool,
) -> Option<ItemStack>
fn get_clone_item_stack( &self, block: BlockRef, state: BlockStateId, include_data: bool, ) -> Option<ItemStack>
Source§fn is_pathfindable(
&self,
state: BlockStateId,
computation_type: PathComputationType,
) -> bool
fn is_pathfindable( &self, state: BlockStateId, computation_type: PathComputationType, ) -> bool
Source§fn is_liquid_block(&self) -> bool
fn is_liquid_block(&self) -> bool
LiquidBlock.Source§fn is_wooden_door(&self, state: BlockStateId) -> bool
fn is_wooden_door(&self, state: BlockStateId) -> bool
DoorBlock.isWoodenDoor. Read moreSource§fn set_door_open(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
source_entity: Option<&dyn Entity>,
open: bool,
) -> bool
fn set_door_open( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, source_entity: Option<&dyn Entity>, open: bool, ) -> bool
DoorBlock.setOpen for AI door goals.Source§fn default_get_collision_shape(
&self,
state: BlockStateId,
world: &dyn LevelReader,
pos: BlockPos,
context: BlockCollisionContext,
) -> VoxelShape
fn default_get_collision_shape( &self, state: BlockStateId, world: &dyn LevelReader, pos: BlockPos, context: BlockCollisionContext, ) -> VoxelShape
Source§fn get_collision_shape(
&self,
state: BlockStateId,
world: &dyn LevelReader,
pos: BlockPos,
context: BlockCollisionContext,
) -> VoxelShape
fn get_collision_shape( &self, state: BlockStateId, world: &dyn LevelReader, pos: BlockPos, context: BlockCollisionContext, ) -> VoxelShape
Source§fn get_collision_shape_offset(
&self,
state: BlockStateId,
world: &dyn LevelReader,
pos: BlockPos,
context: BlockCollisionContext,
) -> DVec3
fn get_collision_shape_offset( &self, state: BlockStateId, world: &dyn LevelReader, pos: BlockPos, context: BlockCollisionContext, ) -> DVec3
Source§fn get_collision_boxes(
&self,
state: BlockStateId,
world: &dyn LevelReader,
pos: BlockPos,
context: BlockCollisionContext,
) -> BlockCollisionBoxes
fn get_collision_boxes( &self, state: BlockStateId, world: &dyn LevelReader, pos: BlockPos, context: BlockCollisionContext, ) -> BlockCollisionBoxes
Source§fn get_block_support_boxes(
&self,
state: BlockStateId,
world: &dyn LevelReader,
pos: BlockPos,
) -> BlockCollisionBoxes
fn get_block_support_boxes( &self, state: BlockStateId, world: &dyn LevelReader, pos: BlockPos, ) -> BlockCollisionBoxes
BlockState.getBlockSupportShape to owned block-local boxes. Read moreSource§fn is_face_sturdy(
&self,
state: BlockStateId,
world: &dyn LevelReader,
pos: BlockPos,
direction: Direction,
support_type: SupportType,
) -> bool
fn is_face_sturdy( &self, state: BlockStateId, world: &dyn LevelReader, pos: BlockPos, direction: Direction, support_type: SupportType, ) -> bool
BlockState.isFaceSturdy(level, pos, direction, supportType). Read moreSource§fn default_get_entity_inside_collision_shape(
&self,
state: BlockStateId,
world: &dyn LevelReader,
pos: BlockPos,
entity: &dyn Entity,
) -> VoxelShape
fn default_get_entity_inside_collision_shape( &self, state: BlockStateId, world: &dyn LevelReader, pos: BlockPos, entity: &dyn Entity, ) -> VoxelShape
Source§fn get_entity_inside_collision_shape(
&self,
state: BlockStateId,
world: &dyn LevelReader,
pos: BlockPos,
entity: &dyn Entity,
) -> VoxelShape
fn get_entity_inside_collision_shape( &self, state: BlockStateId, world: &dyn LevelReader, pos: BlockPos, entity: &dyn Entity, ) -> VoxelShape
Source§fn random_tick(&self, state: BlockStateId, world: &Arc<World>, pos: BlockPos)
fn random_tick(&self, state: BlockStateId, world: &Arc<World>, pos: BlockPos)
Source§fn tick(&self, state: BlockStateId, world: &Arc<World>, pos: BlockPos)
fn tick(&self, state: BlockStateId, world: &Arc<World>, pos: BlockPos)
Source§fn on_projectile_hit(
&self,
_state: BlockStateId,
_world: &Arc<World>,
_hit: &ClipHitResult,
_projectile: &dyn Projectile,
)
fn on_projectile_hit( &self, _state: BlockStateId, _world: &Arc<World>, _hit: &ClipHitResult, _projectile: &dyn Projectile, )
Source§fn default_entity_inside(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
entity: &dyn Entity,
effect_collector: &mut InsideBlockEffectCollector,
is_precise: bool,
)
fn default_entity_inside( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, entity: &dyn Entity, effect_collector: &mut InsideBlockEffectCollector, is_precise: bool, )
Source§fn default_fall_on(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
context: EntityFallOnContext<'_>,
) -> Option<EntityFallDamage>
fn default_fall_on( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, context: EntityFallOnContext<'_>, ) -> Option<EntityFallDamage>
Source§fn fall_on(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
context: EntityFallOnContext<'_>,
) -> Option<EntityFallDamage>
fn fall_on( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, context: EntityFallOnContext<'_>, ) -> Option<EntityFallDamage>
Source§fn after_fall_on_damage(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
entity: &dyn Entity,
fall_damage: &EntityFallDamage,
damage_applied: bool,
)
fn after_fall_on_damage( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, entity: &dyn Entity, fall_damage: &EntityFallDamage, damage_applied: bool, )
BlockBehavior::fall_on is applied. Read moreSource§fn default_update_entity_movement_after_fall_on(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
context: EntityLandingContext,
) -> DVec3
fn default_update_entity_movement_after_fall_on( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, context: EntityLandingContext, ) -> DVec3
Source§fn update_entity_movement_after_fall_on(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
context: EntityLandingContext,
) -> DVec3
fn update_entity_movement_after_fall_on( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, context: EntityLandingContext, ) -> DVec3
Source§fn default_step_on(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
entity: &dyn Entity,
)
fn default_step_on( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, entity: &dyn Entity, )
Source§fn step_on(
&self,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
entity: &dyn Entity,
)
fn step_on( &self, state: BlockStateId, world: &Arc<World>, pos: BlockPos, entity: &dyn Entity, )
Source§fn new_block_entity(
&self,
level: Weak<World>,
pos: BlockPos,
state: BlockStateId,
) -> BlockEntityCreation
fn new_block_entity( &self, level: Weak<World>, pos: BlockPos, state: BlockStateId, ) -> BlockEntityCreation
Source§fn beacon_beam_color(&self, _state: BlockStateId) -> Option<DyeColor>
fn beacon_beam_color(&self, _state: BlockStateId) -> Option<DyeColor>
Source§fn get_block_entity_ticker(
&self,
world: &Arc<World>,
state: BlockStateId,
block_entity_type: BlockEntityTypeRef,
) -> Option<BlockEntityTicker>
fn get_block_entity_ticker( &self, world: &Arc<World>, state: BlockStateId, block_entity_type: BlockEntityTypeRef, ) -> Option<BlockEntityTicker>
Source§fn get_game_event_listener(
&self,
world: &Arc<World>,
block_entity: &dyn BlockEntity,
) -> Option<SharedGameEventListener>
fn get_game_event_listener( &self, world: &Arc<World>, block_entity: &dyn BlockEntity, ) -> Option<SharedGameEventListener>
Source§fn should_keep_block_entity(
&self,
old_state: BlockStateId,
new_state: BlockStateId,
) -> bool
fn should_keep_block_entity( &self, old_state: BlockStateId, new_state: BlockStateId, ) -> bool
Source§fn brushable_data(&self, _state: BlockStateId) -> Option<BrushableData>
fn brushable_data(&self, _state: BlockStateId) -> Option<BrushableData>
Source§fn has_analog_output_signal(&self, state: BlockStateId) -> bool
fn has_analog_output_signal(&self, state: BlockStateId) -> bool
Source§fn get_analog_output_signal(
&self,
state: BlockStateId,
world: &dyn LevelReader,
pos: BlockPos,
direction: Direction,
) -> i32
fn get_analog_output_signal( &self, state: BlockStateId, world: &dyn LevelReader, pos: BlockPos, direction: Direction, ) -> i32
Source§fn is_liquid_container(&self, state: BlockStateId) -> bool
fn is_liquid_container(&self, state: BlockStateId) -> bool
LiquidBlockContainer. Read moreSource§fn can_place_liquid(&self, state: BlockStateId, fluid: FluidRef) -> bool
fn can_place_liquid(&self, state: BlockStateId, fluid: FluidRef) -> bool
LiquidBlockContainer.canPlaceLiquid(). Read moreSource§fn can_place_liquid_with_player(
&self,
state: BlockStateId,
fluid: FluidRef,
_player: Option<&Player>,
) -> bool
fn can_place_liquid_with_player( &self, state: BlockStateId, fluid: FluidRef, _player: Option<&Player>, ) -> bool
LiquidBlockContainer.canPlaceLiquid() with a user. Read moreSource§fn can_be_replaced_by_fluid(
&self,
state: BlockStateId,
_fluid_block: BlockRef,
) -> bool
fn can_be_replaced_by_fluid( &self, state: BlockStateId, _fluid_block: BlockRef, ) -> bool
BlockBehaviour.BlockStateBase.canBeReplaced(Fluid). Read moreSource§fn place_liquid(
&self,
level: &dyn LevelAccessor,
pos: BlockPos,
state: BlockStateId,
fluid_state: FluidState,
) -> bool
fn place_liquid( &self, level: &dyn LevelAccessor, pos: BlockPos, state: BlockStateId, fluid_state: FluidState, ) -> bool
LiquidBlockContainer.placeLiquid(). Read moreSource§fn as_bonemealable(&self) -> Option<&dyn Bonemealable>
fn as_bonemealable(&self) -> Option<&dyn Bonemealable>
Source§fn as_growing_plant_head(&self) -> Option<&dyn GrowingPlantHeadBehavior>
fn as_growing_plant_head(&self) -> Option<&dyn GrowingPlantHeadBehavior>
GrowingPlantHeadBlock capability.Source§fn as_fallable(&self) -> Option<&dyn Fallable>
fn as_fallable(&self) -> Option<&dyn Fallable>
Fallable capability implemented by this block.Source§fn as_rail(&self) -> Option<&dyn RailBehavior>
fn as_rail(&self) -> Option<&dyn RailBehavior>
Source§fn fits_inside_container_items(&self) -> bool
fn fits_inside_container_items(&self) -> bool
Auto Trait Implementations§
impl !RefUnwindSafe for FireBlock
impl !UnwindSafe for FireBlock
impl Freeze for FireBlock
impl Send for FireBlock
impl Sync for FireBlock
impl Unpin for FireBlock
impl UnsafeUnpin for FireBlock
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreArc<SyncMutex<>>