Record Class StatusEffect
java.lang.Object
java.lang.Record
net.lynxclient.api.game.StatusEffect
- Record Components:
name- translated name in Minecraft's language ("Speed", "Schnelligkeit")amplifier- 0 = level IdurationTicks- remaining ticks (20 per second)infinite- effects without end (beacons on 26.x, some server effects)
-
Constructor Summary
ConstructorsConstructorDescriptionStatusEffect(String name, int amplifier, int durationTicks, boolean infinite) Creates an instance of aStatusEffectrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theamplifierrecord component.intReturns 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.booleaninfinite()Returns the value of theinfiniterecord component.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
StatusEffect
Creates an instance of aStatusEffectrecord class.- Parameters:
name- the value for thenamerecord componentamplifier- the value for theamplifierrecord componentdurationTicks- the value for thedurationTicksrecord componentinfinite- the value for theinfiniterecord 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. -
name
-
amplifier
-
durationTicks
public int durationTicks()Returns the value of thedurationTicksrecord component.- Returns:
- the value of the
durationTicksrecord component
-
infinite
-