enum SelectedDamageCalculator<'a> {
Default,
Entity(SharedEntity),
Custom(&'a dyn ExplosionDamageCalculator),
}Variants§
Implementations§
Source§impl SelectedDamageCalculator<'_>
impl SelectedDamageCalculator<'_>
Sourceconst fn has_builtin_entity_effects(&self) -> bool
const fn has_builtin_entity_effects(&self) -> bool
Returns whether entity-effect hooks use Steel’s side-effect-free Vanilla defaults.
Trait Implementations§
Source§impl ExplosionDamageCalculator for SelectedDamageCalculator<'_>
impl ExplosionDamageCalculator for SelectedDamageCalculator<'_>
Source§fn block_explosion_resistance(
&self,
explosion: &dyn Explosion,
world: &World,
pos: BlockPos,
state: BlockStateId,
fluid: FluidState,
) -> Option<f32>
fn block_explosion_resistance( &self, explosion: &dyn Explosion, world: &World, pos: BlockPos, state: BlockStateId, fluid: FluidState, ) -> Option<f32>
Returns the effective resistance at an affected block position.
Source§fn should_block_explode(
&self,
explosion: &dyn Explosion,
world: &World,
pos: BlockPos,
state: BlockStateId,
power: f32,
) -> bool
fn should_block_explode( &self, explosion: &dyn Explosion, world: &World, pos: BlockPos, state: BlockStateId, power: f32, ) -> bool
Returns whether the current ray may affect this block position.
Source§fn should_damage_entity(
&self,
explosion: &dyn Explosion,
entity: &dyn Entity,
) -> bool
fn should_damage_entity( &self, explosion: &dyn Explosion, entity: &dyn Entity, ) -> bool
Returns whether the explosion damages this entity.
Source§fn knockback_multiplier(&self, entity: &dyn Entity) -> f32
fn knockback_multiplier(&self, entity: &dyn Entity) -> f32
Returns the multiplier applied to this entity’s explosion knockback.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for SelectedDamageCalculator<'a>
impl<'a> !UnwindSafe for SelectedDamageCalculator<'a>
impl<'a> Freeze for SelectedDamageCalculator<'a>
impl<'a> Send for SelectedDamageCalculator<'a>
impl<'a> Sync for SelectedDamageCalculator<'a>
impl<'a> Unpin for SelectedDamageCalculator<'a>
impl<'a> UnsafeUnpin for SelectedDamageCalculator<'a>
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
§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> ⓘ
Converts
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> ⓘ
Converts
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 moreWraps this value in an
Arc<SyncMutex<>>