pub trait InstantaneousMobEffect: MobEffectBehavior {
// Provided method
fn apply_instantaneous(
&self,
world: &World,
user: &dyn LivingEntity,
amplifier: i32,
direct_entity: Option<i32>,
causing_entity: Option<i32>,
scale: f32,
) { ... }
}Expand description
The instantaneous-only half of a MobEffectBehavior that also extends
vanilla InstantaneousMobEffect.
Provided Methods§
Sourcefn apply_instantaneous(
&self,
world: &World,
user: &dyn LivingEntity,
amplifier: i32,
direct_entity: Option<i32>,
causing_entity: Option<i32>,
scale: f32,
)
fn apply_instantaneous( &self, world: &World, user: &dyn LivingEntity, amplifier: i32, direct_entity: Option<i32>, causing_entity: Option<i32>, scale: f32, )
Mirrors vanilla InstantaneousMobEffect’s override of
applyInstantaneousEffect.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".