pub struct EnchantmentEffects {Show 31 fields
pub damage_protection: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>],
pub damage_immunity: &'static [ConditionalDamageImmunityEffect],
pub damage: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>],
pub smash_damage_per_fallen_block: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>],
pub knockback: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>],
pub armor_effectiveness: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>],
pub post_attack: &'static [TargetedConditionalEnchantmentEffect<EnchantmentEntityEffect>],
pub post_piercing_attack: &'static [ConditionalEnchantmentEffect<EnchantmentEntityEffect>],
pub hit_block: bool,
pub item_damage: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>],
pub equipment_drops: &'static [TargetedConditionalEnchantmentEffect<EnchantmentValueEffect>],
pub location_changed: bool,
pub tick: bool,
pub ammo_use: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>],
pub projectile_piercing: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>],
pub projectile_spawned: &'static [ConditionalEnchantmentEffect<EnchantmentEntityEffect>],
pub projectile_spread: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>],
pub projectile_count: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>],
pub trident_return_acceleration: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>],
pub fishing_time_reduction: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>],
pub fishing_luck_bonus: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>],
pub block_experience: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>],
pub mob_experience: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>],
pub repair_with_xp: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>],
pub attributes: &'static [EnchantmentAttributeEffect],
pub crossbow_charge_time: Option<EnchantmentValueEffect>,
pub crossbow_charging_sounds: &'static [CrossbowChargingSounds],
pub trident_sound: &'static [SoundEventRef],
pub prevent_equipment_drop: bool,
pub prevent_armor_change: bool,
pub trident_spin_attack_strength: Option<EnchantmentValueEffect>,
}Fields§
§damage_protection: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>]§damage_immunity: &'static [ConditionalDamageImmunityEffect]§damage: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>]§smash_damage_per_fallen_block: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>]§knockback: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>]§armor_effectiveness: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>]§post_attack: &'static [TargetedConditionalEnchantmentEffect<EnchantmentEntityEffect>]§post_piercing_attack: &'static [ConditionalEnchantmentEffect<EnchantmentEntityEffect>]§hit_block: bool§item_damage: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>]§equipment_drops: &'static [TargetedConditionalEnchantmentEffect<EnchantmentValueEffect>]§location_changed: bool§tick: bool§ammo_use: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>]§projectile_piercing: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>]§projectile_spawned: &'static [ConditionalEnchantmentEffect<EnchantmentEntityEffect>]§projectile_spread: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>]§projectile_count: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>]§trident_return_acceleration: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>]§fishing_time_reduction: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>]§fishing_luck_bonus: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>]§block_experience: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>]§mob_experience: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>]§repair_with_xp: &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>]§attributes: &'static [EnchantmentAttributeEffect]§crossbow_charge_time: Option<EnchantmentValueEffect>§crossbow_charging_sounds: &'static [CrossbowChargingSounds]§trident_sound: &'static [SoundEventRef]§prevent_equipment_drop: bool§prevent_armor_change: bool§trident_spin_attack_strength: Option<EnchantmentValueEffect>Implementations§
Source§impl EnchantmentEffects
impl EnchantmentEffects
pub const EMPTY: Self
pub const fn has(&self, component: EnchantmentEffectComponent) -> bool
pub const fn value_effects( &self, component: EnchantmentEffectComponent, ) -> &'static [ConditionalEnchantmentEffect<EnchantmentValueEffect>]
pub const fn targeted_value_effects( &self, component: EnchantmentEffectComponent, ) -> &'static [TargetedConditionalEnchantmentEffect<EnchantmentValueEffect>]
pub const fn single_value_effect( &self, component: EnchantmentEffectComponent, ) -> Option<&EnchantmentValueEffect>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EnchantmentEffects
impl RefUnwindSafe for EnchantmentEffects
impl Send for EnchantmentEffects
impl Sync for EnchantmentEffects
impl Unpin for EnchantmentEffects
impl UnsafeUnpin for EnchantmentEffects
impl UnwindSafe for EnchantmentEffects
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<>>