Record Class LocationPredicate.PositionPredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.LocationPredicate.PositionPredicate
- Enclosing class:
- LocationPredicate
static record LocationPredicate.PositionPredicate(MinMaxBounds.Doubles x, MinMaxBounds.Doubles y, MinMaxBounds.Doubles z)
extends Record
- 
Field SummaryFieldsModifier 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 SummaryConstructorsConstructorDescriptionCreates an instance of aPositionPredicaterecord class.
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanmatches(double p_298782_, double p_299123_, double p_298955_) (package private) static Optional<LocationPredicate.PositionPredicate>of(MinMaxBounds.Doubles p_298771_, MinMaxBounds.Doubles p_298418_, MinMaxBounds.Doubles p_299133_) 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- 
xThe field for thexrecord component.
- 
yThe field for theyrecord component.
- 
zThe field for thezrecord component.
- 
CODEC
 
- 
- 
Constructor Details- 
PositionPredicatePositionPredicate(MinMaxBounds.Doubles x, MinMaxBounds.Doubles y, MinMaxBounds.Doubles z) Creates an instance of aPositionPredicaterecord class.- Parameters:
- x- the value for the- xrecord component
- y- the value for the- yrecord component
- z- the value for the- zrecord component
 
 
- 
- 
Method Details- 
ofstatic Optional<LocationPredicate.PositionPredicate> of(MinMaxBounds.Doubles p_298771_, MinMaxBounds.Doubles p_298418_, MinMaxBounds.Doubles p_299133_) 
- 
matchespublic boolean matches(double p_298782_, double p_299123_, double p_298955_) 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
xReturns the value of thexrecord component.- Returns:
- the value of the xrecord component
 
- 
yReturns the value of theyrecord component.- Returns:
- the value of the yrecord component
 
- 
zReturns the value of thezrecord component.- Returns:
- the value of the zrecord component
 
 
-