Record Class SulfurCubeArchetype.KnockbackModifiers
java.lang.Object
java.lang.Record
net.minecraft.world.entity.SulfurCubeArchetype.KnockbackModifiers
- Enclosing class:
SulfurCubeArchetype
public static record SulfurCubeArchetype.KnockbackModifiers(float horizontalPower, float verticalPower)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<SulfurCubeArchetype.KnockbackModifiers> private final floatThe field for thehorizontalPowerrecord component.private final floatThe field for theverticalPowerrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionKnockbackModifiers(float horizontalPower, float verticalPower) Creates an instance of aKnockbackModifiersrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatReturns the value of thehorizontalPowerrecord component.final StringtoString()Returns a string representation of this record class.floatReturns the value of theverticalPowerrecord component.
-
Field Details
-
horizontalPower
private final float horizontalPowerThe field for thehorizontalPowerrecord component. -
verticalPower
private final float verticalPowerThe field for theverticalPowerrecord component. -
CODEC
-
-
Constructor Details
-
KnockbackModifiers
public KnockbackModifiers(float horizontalPower, float verticalPower) Creates an instance of aKnockbackModifiersrecord class.- Parameters:
horizontalPower- the value for thehorizontalPowerrecord componentverticalPower- the value for theverticalPowerrecord 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 thecomparemethod from their corresponding wrapper classes. -
horizontalPower
public float horizontalPower()Returns the value of thehorizontalPowerrecord component.- Returns:
- the value of the
horizontalPowerrecord component
-
verticalPower
public float verticalPower()Returns the value of theverticalPowerrecord component.- Returns:
- the value of the
verticalPowerrecord component
-