Record Class LocationPredicate.PositionPredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.criterion.LocationPredicate.PositionPredicate
- Enclosing class:
LocationPredicate
private static record LocationPredicate.PositionPredicate(MinMaxBounds.Doubles x, MinMaxBounds.Doubles y, MinMaxBounds.Doubles z)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<LocationPredicate.PositionPredicate> 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
ConstructorsModifierConstructorDescriptionprivateCreates an instance of aPositionPredicaterecord 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.booleanmatches(double x, double y, double z) private static Optional<LocationPredicate.PositionPredicate> final StringtoString()Returns a string representation of this record class.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. -
CODEC
-
-
Constructor Details
-
PositionPredicate
Creates an instance of aPositionPredicaterecord class.- Parameters:
x- the value for thexrecord componenty- the value for theyrecord componentz- the value for thezrecord component
-
-
Method Details
-
of
private static Optional<LocationPredicate.PositionPredicate> of(MinMaxBounds.Doubles x, MinMaxBounds.Doubles y, MinMaxBounds.Doubles z) -
matches
public boolean matches(double x, double y, double z) -
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 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
-