pub struct ExplosionOptions<'a> {
pub source: Option<SharedEntity>,
pub damage_source: Option<DamageSource>,
pub damage_calculator: Option<&'a dyn ExplosionDamageCalculator>,
pub(crate) immutable_block_calculator: Option<&'a dyn ImmutableExplosionBlockCalculator>,
pub center: DVec3,
pub radius: f32,
pub fire: bool,
pub interaction: ExplosionInteraction,
pub small_explosion_particle: ParticleData,
pub large_explosion_particle: ParticleData,
pub block_particles: ExplosionParticlePalette,
pub explosion_sound: SoundEventHolder,
}Expand description
Full visual and gameplay parameters for one server explosion.
Fields§
§source: Option<SharedEntity>Entity directly creating the explosion.
damage_source: Option<DamageSource>Optional non-default damage source.
damage_calculator: Option<&'a dyn ExplosionDamageCalculator>Optional non-default damage calculator.
immutable_block_calculator: Option<&'a dyn ImmutableExplosionBlockCalculator>Proven-immutable block-ray calculator for Steel-owned explosion sources.
center: DVec3Exact explosion center.
radius: f32Explosion radius.
fire: boolWhether the explosion can create fire.
interaction: ExplosionInteractionHigh-level block interaction category.
small_explosion_particle: ParticleDataParticle used for small or non-block-interacting explosions.
large_explosion_particle: ParticleDataParticle used for large block-interacting explosions.
block_particles: ExplosionParticlePaletteWeighted client-side block debris particle palette.
explosion_sound: SoundEventHolderClient-side explosion sound.
Implementations§
Source§impl ExplosionOptions<'_>
impl ExplosionOptions<'_>
Sourcepub fn new(
center: DVec3,
radius: f32,
interaction: ExplosionInteraction,
) -> Self
pub fn new( center: DVec3, radius: f32, interaction: ExplosionInteraction, ) -> Self
Creates an explosion with Vanilla’s standard visual effects.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ExplosionOptions<'a>
impl<'a> !UnwindSafe for ExplosionOptions<'a>
impl<'a> Freeze for ExplosionOptions<'a>
impl<'a> Send for ExplosionOptions<'a>
impl<'a> Sync for ExplosionOptions<'a>
impl<'a> Unpin for ExplosionOptions<'a>
impl<'a> UnsafeUnpin for ExplosionOptions<'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<>>