Record Class SuspiciousStewEffects.Effect
java.lang.Object
java.lang.Record
net.minestom.server.item.component.SuspiciousStewEffects.Effect
- Enclosing class:
SuspiciousStewEffects
public static record SuspiciousStewEffects.Effect(PotionEffect id, int durationTicks)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<SuspiciousStewEffects.Effect> static final NetworkBuffer.Type<SuspiciousStewEffects.Effect> -
Constructor Summary
ConstructorsConstructorDescriptionEffect(PotionEffect id) Effect(PotionEffect id, int durationTicks) Creates an instance of aEffectrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thedurationTicksrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
NETWORK_TYPE
-
CODEC
-
-
Constructor Details
-
Effect
-
Effect
Creates an instance of aEffectrecord class.- Parameters:
id- the value for theidrecord componentdurationTicks- the value for thedurationTicksrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
durationTicks
public int durationTicks()Returns the value of thedurationTicksrecord component.- Returns:
- the value of the
durationTicksrecord component
-