Record Class MovementPredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.MovementPredicate
public record MovementPredicate(MinMaxBounds.Doubles x, MinMaxBounds.Doubles y, MinMaxBounds.Doubles z, MinMaxBounds.Doubles speed, MinMaxBounds.Doubles horizontalSpeed, MinMaxBounds.Doubles verticalSpeed, MinMaxBounds.Doubles fallDistance)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<MovementPredicate> private final MinMaxBounds.DoublesThe field for thefallDistancerecord component.private final MinMaxBounds.DoublesThe field for thehorizontalSpeedrecord component.private final MinMaxBounds.DoublesThe field for thespeedrecord component.private final MinMaxBounds.DoublesThe field for theverticalSpeedrecord component.private final MinMaxBounds.DoublesThe field for thexrecord component.private final MinMaxBounds.DoublesThe field for theyrecord component.private final MinMaxBounds.DoublesThe field for thezrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionMovementPredicate(MinMaxBounds.Doubles x, MinMaxBounds.Doubles y, MinMaxBounds.Doubles z, MinMaxBounds.Doubles speed, MinMaxBounds.Doubles horizontalSpeed, MinMaxBounds.Doubles verticalSpeed, MinMaxBounds.Doubles fallDistance) Creates an instance of aMovementPredicaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefallDistancerecord component.static MovementPredicatefallDistance(MinMaxBounds.Doubles p_344473_) final inthashCode()Returns a hash code value for this object.Returns the value of thehorizontalSpeedrecord component.static MovementPredicatehorizontalSpeed(MinMaxBounds.Doubles p_343918_) booleanmatches(double p_342615_, double p_343015_, double p_344849_, double p_344583_) speed()Returns the value of thespeedrecord component.static MovementPredicatespeed(MinMaxBounds.Doubles p_344237_) final StringtoString()Returns a string representation of this record class.Returns the value of theverticalSpeedrecord component.static MovementPredicateverticalSpeed(MinMaxBounds.Doubles p_342210_) x()Returns the value of thexrecord component.y()Returns the value of theyrecord component.z()Returns the value of thezrecord component.
-
Field Details
-
x
The field for thexrecord component. -
y
The field for theyrecord component. -
z
The field for thezrecord component. -
speed
The field for thespeedrecord component. -
horizontalSpeed
The field for thehorizontalSpeedrecord component. -
verticalSpeed
The field for theverticalSpeedrecord component. -
fallDistance
The field for thefallDistancerecord component. -
CODEC
-
-
Constructor Details
-
MovementPredicate
public MovementPredicate(MinMaxBounds.Doubles x, MinMaxBounds.Doubles y, MinMaxBounds.Doubles z, MinMaxBounds.Doubles speed, MinMaxBounds.Doubles horizontalSpeed, MinMaxBounds.Doubles verticalSpeed, MinMaxBounds.Doubles fallDistance) Creates an instance of aMovementPredicaterecord class.- Parameters:
x- the value for thexrecord componenty- the value for theyrecord componentz- the value for thezrecord componentspeed- the value for thespeedrecord componenthorizontalSpeed- the value for thehorizontalSpeedrecord componentverticalSpeed- the value for theverticalSpeedrecord componentfallDistance- the value for thefallDistancerecord component
-
-
Method Details
-
speed
-
horizontalSpeed
-
verticalSpeed
-
fallDistance
-
matches
public boolean matches(double p_342615_, double p_343015_, double p_344849_, double p_344583_) -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 withObjects::equals(Object,Object). -
x
Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
z
Returns the value of thezrecord component.- Returns:
- the value of the
zrecord component
-
speed
Returns the value of thespeedrecord component.- Returns:
- the value of the
speedrecord component
-
horizontalSpeed
Returns the value of thehorizontalSpeedrecord component.- Returns:
- the value of the
horizontalSpeedrecord component
-
verticalSpeed
Returns the value of theverticalSpeedrecord component.- Returns:
- the value of the
verticalSpeedrecord component
-
fallDistance
Returns the value of thefallDistancerecord component.- Returns:
- the value of the
fallDistancerecord component
-