Record Class LevelBasedValue.LevelsSquared
java.lang.Object
java.lang.Record
net.minestom.server.item.enchant.LevelBasedValue.LevelsSquared
- All Implemented Interfaces:
LevelBasedValue
- Enclosing interface:
LevelBasedValue
public static record LevelBasedValue.LevelsSquared(float added)
extends Record
implements LevelBasedValue
-
Nested Class Summary
Nested classes/interfaces inherited from interface LevelBasedValue
LevelBasedValue.Clamped, LevelBasedValue.Constant, LevelBasedValue.Fraction, LevelBasedValue.LevelsSquared, LevelBasedValue.Linear, LevelBasedValue.Lookup -
Field Summary
FieldsFields inherited from interface LevelBasedValue
TAGGED_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionLevelsSquared(float added) Creates an instance of aLevelsSquaredrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatadded()Returns the value of theaddedrecord component.floatcalc(int level) codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
LevelsSquared
public LevelsSquared(float added) Creates an instance of aLevelsSquaredrecord class.- Parameters:
added- the value for theaddedrecord component
-
-
Method Details
-
calc
public float calc(int level) - Specified by:
calcin interfaceLevelBasedValue
-
codec
- Specified by:
codecin interfaceLevelBasedValue
-
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
added
public float added()Returns the value of theaddedrecord component.- Returns:
- the value of the
addedrecord component
-