pub struct PotionEffect {
pub id: RegistryId,
pub amplifier: VarInt,
pub duration: VarInt,
pub ambient: bool,
pub show_particles: bool,
pub show_icon: bool,
}Expand description
A standard Potion Effect.
Fields§
§id: RegistryIdThe ID of the effect (Speed, Jump Boost, etc.).
amplifier: VarIntThe level of the effect (0 = Level 1, 1 = Level 2).
duration: VarIntDuration in ticks. -1 indicates infinite duration.
ambient: boolIf true, particles are translucent (like Beacon effects).
show_particles: boolIf false, no particles are shown.
show_icon: boolIf true, the effect icon is displayed in the top-right of theinventory.
Trait Implementations§
Source§impl Clone for PotionEffect
impl Clone for PotionEffect
Source§fn clone(&self) -> PotionEffect
fn clone(&self) -> PotionEffect
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PotionEffect
impl Debug for PotionEffect
Source§impl<'a> Decode<'a> for PotionEffect
impl<'a> Decode<'a> for PotionEffect
Source§impl Encode for PotionEffect
impl Encode for PotionEffect
Source§impl PartialEq for PotionEffect
impl PartialEq for PotionEffect
impl StructuralPartialEq for PotionEffect
Auto Trait Implementations§
impl Freeze for PotionEffect
impl RefUnwindSafe for PotionEffect
impl Send for PotionEffect
impl Sync for PotionEffect
impl Unpin for PotionEffect
impl UnwindSafe for PotionEffect
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