Record Class BlocksAttacks.ItemDamageFunction
java.lang.Object
java.lang.Record
net.minestom.server.item.component.BlocksAttacks.ItemDamageFunction
- Enclosing class:
BlocksAttacks
public static record BlocksAttacks.ItemDamageFunction(float threshold, float base, float factor)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec
<BlocksAttacks.ItemDamageFunction> static final BlocksAttacks.ItemDamageFunction
static final NetworkBuffer.Type
<BlocksAttacks.ItemDamageFunction> -
Constructor Summary
ConstructorsConstructorDescriptionItemDamageFunction
(float threshold, float base, float factor) Creates an instance of aItemDamageFunction
record class. -
Method Summary
Modifier and TypeMethodDescriptionfloat
base()
Returns the value of thebase
record component.final boolean
Indicates whether some other object is "equal to" this one.float
factor()
Returns the value of thefactor
record component.final int
hashCode()
Returns a hash code value for this object.float
Returns the value of thethreshold
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
DEFAULT
-
NETWORK_TYPE
-
CODEC
-
-
Constructor Details
-
ItemDamageFunction
public ItemDamageFunction(float threshold, float base, float factor) Creates an instance of aItemDamageFunction
record class.- Parameters:
threshold
- the value for thethreshold
record componentbase
- the value for thebase
record componentfactor
- the value for thefactor
record 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. All components in this record class are compared with thecompare
method from their corresponding wrapper classes. -
threshold
public float threshold()Returns the value of thethreshold
record component.- Returns:
- the value of the
threshold
record component
-
base
public float base()Returns the value of thebase
record component.- Returns:
- the value of the
base
record component
-
factor
public float factor()Returns the value of thefactor
record component.- Returns:
- the value of the
factor
record component
-