Package net.minecraft.predicate.entity
Record Class DistancePredicate
java.lang.Object
java.lang.Record
net.minecraft.predicate.entity.DistancePredicate
- Record Components:
x-y-z-horizontal-absolute-
public record DistancePredicate(NumberRange.DoubleRange x, NumberRange.DoubleRange y, NumberRange.DoubleRange z, NumberRange.DoubleRange horizontal, NumberRange.DoubleRange absolute)
extends Record
- Mappings:
Namespace Name official bgintermediary net/minecraft/class_2025named net/minecraft/predicate/entity/DistancePredicateofficial bintermediary comp_1743named xofficial cintermediary comp_1744named yofficial dintermediary comp_1745named zofficial eintermediary comp_1746named horizontalofficial fintermediary comp_1747named absolute
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final NumberRange.DoubleRangeThe field for theabsoluterecord component.static final com.mojang.serialization.Codec<DistancePredicate>private final NumberRange.DoubleRangeThe field for thehorizontalrecord component.private final NumberRange.DoubleRangeThe field for thexrecord component.private final NumberRange.DoubleRangeThe field for theyrecord component.private final NumberRange.DoubleRangeThe field for thezrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionDistancePredicate(NumberRange.DoubleRange x, NumberRange.DoubleRange y, NumberRange.DoubleRange z, NumberRange.DoubleRange horizontal, NumberRange.DoubleRange absolute) Creates an instance of aDistancePredicaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionabsolute()Returns the value of theabsoluterecord component.static DistancePredicateabsolute(NumberRange.DoubleRange absolute) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thehorizontalrecord component.static DistancePredicatehorizontal(NumberRange.DoubleRange horizontal) booleantest(double x0, double y0, double z0, double x1, double y1, double z1) final StringtoString()Returns a string representation of this record class.x()Returns the value of thexrecord component.y()Returns the value of theyrecord component.static DistancePredicatez()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. -
horizontal
The field for thehorizontalrecord component. -
absolute
The field for theabsoluterecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector official aLbg;a:Lcom/mojang/serialization/Codec;intermediary field_45728Lnet/minecraft/class_2025;field_45728:Lcom/mojang/serialization/Codec;named CODECLnet/minecraft/predicate/entity/DistancePredicate;CODEC:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
DistancePredicate
public DistancePredicate(NumberRange.DoubleRange x, NumberRange.DoubleRange y, NumberRange.DoubleRange z, NumberRange.DoubleRange horizontal, NumberRange.DoubleRange absolute) Creates an instance of aDistancePredicaterecord class.- Parameters:
x- the value for thexrecord componenty- the value for theyrecord componentz- the value for thezrecord componenthorizontal- the value for thehorizontalrecord componentabsolute- the value for theabsoluterecord component
-
-
Method Details
-
horizontal
- Mappings:
Namespace Name Mixin selector official aLbg;a(Lck$c;)Lbg;intermediary method_8860Lnet/minecraft/class_2025;method_8860(Lnet/minecraft/class_2096$class_2099;)Lnet/minecraft/class_2025;named horizontalLnet/minecraft/predicate/entity/DistancePredicate;horizontal(Lnet/minecraft/predicate/NumberRange$DoubleRange;)Lnet/minecraft/predicate/entity/DistancePredicate;
-
y
- Mappings:
Namespace Name Mixin selector official bLbg;b(Lck$c;)Lbg;intermediary method_8856Lnet/minecraft/class_2025;method_8856(Lnet/minecraft/class_2096$class_2099;)Lnet/minecraft/class_2025;named yLnet/minecraft/predicate/entity/DistancePredicate;y(Lnet/minecraft/predicate/NumberRange$DoubleRange;)Lnet/minecraft/predicate/entity/DistancePredicate;
-
absolute
- Mappings:
Namespace Name Mixin selector official cLbg;c(Lck$c;)Lbg;intermediary method_37223Lnet/minecraft/class_2025;method_37223(Lnet/minecraft/class_2096$class_2099;)Lnet/minecraft/class_2025;named absoluteLnet/minecraft/predicate/entity/DistancePredicate;absolute(Lnet/minecraft/predicate/NumberRange$DoubleRange;)Lnet/minecraft/predicate/entity/DistancePredicate;
-
test
public boolean test(double x0, double y0, double z0, double x1, double y1, double z1) - Mappings:
Namespace Name Mixin selector official aLbg;a(DDDDDD)Zintermediary method_8859Lnet/minecraft/class_2025;method_8859(DDDDDD)Znamed testLnet/minecraft/predicate/entity/DistancePredicate;test(DDDDDD)Z
-
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
-
horizontal
Returns the value of thehorizontalrecord component.- Returns:
- the value of the
horizontalrecord component
-
absolute
Returns the value of theabsoluterecord component.- Returns:
- the value of the
absoluterecord component
-