pub struct BlockConfig {Show 19 fields
pub has_collision: bool,
pub can_occlude: bool,
pub explosion_resistance: f32,
pub is_randomly_ticking: bool,
pub force_solid_off: bool,
pub force_solid_on: bool,
pub push_reaction: PushReaction,
pub friction: f32,
pub speed_factor: f32,
pub jump_factor: f32,
pub dynamic_shape: bool,
pub destroy_time: f32,
pub ignited_by_lava: bool,
pub liquid: bool,
pub is_air: bool,
pub requires_correct_tool_for_drops: bool,
pub instrument: NoteBlockInstrument,
pub replaceable: bool,
pub sound_type: SoundType,
}Expand description
Static configuration for a block type.
This contains constant properties that don’t change based on game state.
Dynamic behavior is handled by BlockBehavior in steel-core.
Fields§
§has_collision: bool§can_occlude: bool§explosion_resistance: f32§is_randomly_ticking: bool§force_solid_off: bool§force_solid_on: bool§push_reaction: PushReaction§friction: f32§speed_factor: f32§jump_factor: f32§dynamic_shape: bool§destroy_time: f32§ignited_by_lava: bool§liquid: bool§is_air: bool§requires_correct_tool_for_drops: bool§instrument: NoteBlockInstrument§replaceable: bool§sound_type: SoundTypeImplementations§
Source§impl BlockConfig
impl BlockConfig
pub const fn has_collision(self, has_collision: bool) -> Self
pub const fn can_occlude(self, can_occlude: bool) -> Self
pub const fn explosion_resistance(self, resistance: f32) -> Self
pub const fn set_is_randomly_ticking(self, ticking: bool) -> Self
pub const fn force_solid_off(self, force: bool) -> Self
pub const fn force_solid_on(self, force: bool) -> Self
pub const fn push_reaction(self, reaction: PushReaction) -> Self
pub const fn friction(self, friction: f32) -> Self
pub const fn speed_factor(self, factor: f32) -> Self
pub const fn jump_factor(self, factor: f32) -> Self
pub const fn dynamic_shape(self, dynamic: bool) -> Self
pub const fn destroy_time(self, time: f32) -> Self
pub const fn ignited_by_lava(self, ignited: bool) -> Self
pub const fn liquid(self, liquid: bool) -> Self
pub const fn set_is_air(self, is_air: bool) -> Self
pub const fn requires_correct_tool_for_drops(self, requires: bool) -> Self
pub const fn instrument(self, instrument: NoteBlockInstrument) -> Self
pub const fn replaceable(self, replaceable: bool) -> Self
pub const fn sound_type(self, sound_type: SoundType) -> Self
Trait Implementations§
Source§impl Debug for BlockConfig
impl Debug for BlockConfig
Auto Trait Implementations§
impl Freeze for BlockConfig
impl RefUnwindSafe for BlockConfig
impl Send for BlockConfig
impl Sync for BlockConfig
impl Unpin for BlockConfig
impl UnsafeUnpin for BlockConfig
impl UnwindSafe for BlockConfig
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
Mutably borrows from an owned value. Read more