Class PotionEffectData
The potion effect data holds additional information about an active PotionEffect.
public sealed record PotionEffectData : INetworkSerializable<PotionEffectData>, IEquatable<PotionEffectData>
- Inheritance
-
PotionEffectData
- Implements
- Inherited Members
Constructors
PotionEffectData()
public PotionEffectData()
Properties
Ambient
Produces more translucent particle effects if true.
public bool Ambient { get; init; }
Property Value
Amplifier
The amplifier of the potion effect.
public required int Amplifier { get; init; }
Property Value
Duration
The duration of the potion effect when it was added.
public required int Duration { get; init; }
Property Value
HiddenEffect
Used to store the state of the previous potion effect when a stronger one is applied. This guarantees that the weaker one will persist, in case it lasts longer.
public PotionEffectData? HiddenEffect { get; init; }
Property Value
Id
public required int Id { get; init; }
Property Value
ShowIcon
Shows the potion icon in the inventory screen if true.
public bool ShowIcon { get; init; }
Property Value
ShowParticles
Completely hides effect particles if false.
public bool ShowParticles { get; init; }
Property Value
Methods
Equals(PotionEffectData?)
public bool Equals(PotionEffectData? other)
Parameters
other
PotionEffectData
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(PotionEffectData?, PotionEffectData?)
public static bool operator ==(PotionEffectData? left, PotionEffectData? right)
Parameters
left
PotionEffectDataright
PotionEffectData
Returns
operator !=(PotionEffectData?, PotionEffectData?)
public static bool operator !=(PotionEffectData? left, PotionEffectData? right)
Parameters
left
PotionEffectDataright
PotionEffectData
Returns
Explicit Interface Implementations
Read(INetStreamReader)
static PotionEffectData Read(INetStreamReader reader)
Parameters
reader
INetStreamReader
Returns
Write(PotionEffectData, INetStreamWriter)
static void Write(PotionEffectData value, INetStreamWriter writer)
Parameters
value
PotionEffectDatawriter
INetStreamWriter