struct NetherPortalPreservingExplosionDamageCalculator;Trait Implementations§
Source§impl ExplosionDamageCalculator for NetherPortalPreservingExplosionDamageCalculator
impl ExplosionDamageCalculator for NetherPortalPreservingExplosionDamageCalculator
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.
Source§impl ImmutableExplosionBlockCalculator for NetherPortalPreservingExplosionDamageCalculator
impl ImmutableExplosionBlockCalculator for NetherPortalPreservingExplosionDamageCalculator
Source§fn bounded_block_read_radius(&self) -> Option<u32>
fn bounded_block_read_radius(&self) -> Option<u32>
Returns the greatest per-axis block offset (Chebyshev radius) this calculator reads from
each ray position. Implementations opting in must never increase ray power through a
returned resistance. Read more
Source§fn can_cache_explosion_resistance(&self) -> bool
fn can_cache_explosion_resistance(&self) -> bool
Whether repeated resistance queries for an unchanged position may reuse one result. Read more
Source§fn explosion_resistance(
&self,
reader: &dyn ExplosionBlockReader,
pos: BlockPos,
state: BlockStateId,
fluid: FluidState,
) -> Option<f32>
fn explosion_resistance( &self, reader: &dyn ExplosionBlockReader, pos: BlockPos, state: BlockStateId, fluid: FluidState, ) -> Option<f32>
Returns the effective resistance at a ray position.
fn should_explode( &self, reader: &dyn ExplosionBlockReader, pos: BlockPos, state: BlockStateId, power: f32, ) -> bool
Source§fn always_allows_block_explosion(&self) -> bool
fn always_allows_block_explosion(&self) -> bool
Auto Trait Implementations§
impl Freeze for NetherPortalPreservingExplosionDamageCalculator
impl RefUnwindSafe for NetherPortalPreservingExplosionDamageCalculator
impl Send for NetherPortalPreservingExplosionDamageCalculator
impl Sync for NetherPortalPreservingExplosionDamageCalculator
impl Unpin for NetherPortalPreservingExplosionDamageCalculator
impl UnsafeUnpin for NetherPortalPreservingExplosionDamageCalculator
impl UnwindSafe for NetherPortalPreservingExplosionDamageCalculator
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<>>