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
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<MovementPredicate> private final MinMaxBounds.Doubles
The field for thefallDistance
record component.private final MinMaxBounds.Doubles
The field for thehorizontalSpeed
record component.private final MinMaxBounds.Doubles
The field for thespeed
record component.private final MinMaxBounds.Doubles
The field for theverticalSpeed
record component.private final MinMaxBounds.Doubles
The field for thex
record component.private final MinMaxBounds.Doubles
The field for they
record component.private final MinMaxBounds.Doubles
The field for thez
record component. -
Constructor Summary
ConstructorDescriptionMovementPredicate
(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 aMovementPredicate
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.Returns the value of thefallDistance
record component.static MovementPredicate
fallDistance
(MinMaxBounds.Doubles p_344473_) final int
hashCode()
Returns a hash code value for this object.Returns the value of thehorizontalSpeed
record component.static MovementPredicate
horizontalSpeed
(MinMaxBounds.Doubles p_343918_) boolean
matches
(double p_342615_, double p_343015_, double p_344849_, double p_344583_) speed()
Returns the value of thespeed
record component.static MovementPredicate
speed
(MinMaxBounds.Doubles p_344237_) final String
toString()
Returns a string representation of this record class.Returns the value of theverticalSpeed
record component.static MovementPredicate
verticalSpeed
(MinMaxBounds.Doubles p_342210_) x()
Returns the value of thex
record component.y()
Returns the value of they
record component.z()
Returns the value of thez
record component.
-
Field Details
-
x
The field for thex
record component. -
y
The field for they
record component. -
z
The field for thez
record component. -
speed
The field for thespeed
record component. -
horizontalSpeed
The field for thehorizontalSpeed
record component. -
verticalSpeed
The field for theverticalSpeed
record component. -
fallDistance
The field for thefallDistance
record 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 aMovementPredicate
record class.- Parameters:
x
- the value for thex
record componenty
- the value for they
record componentz
- the value for thez
record componentspeed
- the value for thespeed
record componenthorizontalSpeed
- the value for thehorizontalSpeed
record componentverticalSpeed
- the value for theverticalSpeed
record componentfallDistance
- the value for thefallDistance
record 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 thex
record component.- Returns:
- the value of the
x
record component
-
y
Returns the value of they
record component.- Returns:
- the value of the
y
record component
-
z
Returns the value of thez
record component.- Returns:
- the value of the
z
record component
-
speed
Returns the value of thespeed
record component.- Returns:
- the value of the
speed
record component
-
horizontalSpeed
Returns the value of thehorizontalSpeed
record component.- Returns:
- the value of the
horizontalSpeed
record component
-
verticalSpeed
Returns the value of theverticalSpeed
record component.- Returns:
- the value of the
verticalSpeed
record component
-
fallDistance
Returns the value of thefallDistance
record component.- Returns:
- the value of the
fallDistance
record component
-