pub enum EnchantmentValueEffect {
Add {
value: &'static LevelBasedValue,
},
Set {
value: &'static LevelBasedValue,
},
Multiply {
factor: &'static LevelBasedValue,
},
RemoveBinomial {
chance: &'static LevelBasedValue,
},
}Expand description
Vanilla EnchantmentValueEffect.
Variants§
Add
Fields
§
value: &'static LevelBasedValueSet
Fields
§
value: &'static LevelBasedValueMultiply
Fields
§
factor: &'static LevelBasedValueRemoveBinomial
Fields
§
chance: &'static LevelBasedValueImplementations§
Source§impl EnchantmentValueEffect
impl EnchantmentValueEffect
Sourcepub fn process_without_random(&self, level: i32, input: f32) -> Option<f32>
pub fn process_without_random(&self, level: i32, input: f32) -> Option<f32>
Applies effects that do not require a random source.
remove_binomial is excluded because it requires a random source; use
Self::process_with_random when the component permits random effects.
Trait Implementations§
Source§impl Debug for EnchantmentValueEffect
impl Debug for EnchantmentValueEffect
Source§impl PartialEq for EnchantmentValueEffect
impl PartialEq for EnchantmentValueEffect
impl StructuralPartialEq for EnchantmentValueEffect
Auto Trait Implementations§
impl Freeze for EnchantmentValueEffect
impl RefUnwindSafe for EnchantmentValueEffect
impl Send for EnchantmentValueEffect
impl Sync for EnchantmentValueEffect
impl Unpin for EnchantmentValueEffect
impl UnsafeUnpin for EnchantmentValueEffect
impl UnwindSafe for EnchantmentValueEffect
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<>>