Package net.minecraft.predicate.entity
Record Class VariantPredicates.Predicate<V>
java.lang.Object
java.lang.Record
net.minecraft.predicate.entity.VariantPredicates.Predicate<V>
- Record Components:
type
-getter
-variant
-
- All Implemented Interfaces:
TypeSpecificPredicate
- Enclosing class:
VariantPredicates<V>
public static record VariantPredicates.Predicate<V>(TypeSpecificPredicate.Type type, Function<Entity,Optional<V>> getter, V variant)
extends Record
implements TypeSpecificPredicate
- Mappings:
Namespace Name official bt$a
intermediary net/minecraft/class_7380$class_8746
named net/minecraft/predicate/entity/VariantPredicates$Predicate
official b
intermediary comp_1776
named type
official c
intermediary comp_1777
named getter
official d
intermediary comp_1778
named variant
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.predicate.entity.TypeSpecificPredicate
TypeSpecificPredicate.Deserializers, TypeSpecificPredicate.Type
-
Field Summary
Modifier and TypeFieldDescriptionThe field for thegetter
record component.private final TypeSpecificPredicate.Type
The field for thetype
record component.private final V
The field for thevariant
record component.Fields inherited from interface net.minecraft.predicate.entity.TypeSpecificPredicate
CODEC
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.getter()
Returns the value of thegetter
record component.final int
hashCode()
Returns a hash code value for this object.boolean
test
(Entity entity, ServerWorld world, @Nullable Vec3d pos) final String
toString()
Returns a string representation of this record class.type()
variant()
Returns the value of thevariant
record component.
-
Field Details
-
Constructor Details
-
Predicate
-
-
Method Details
-
test
- Specified by:
test
in interfaceTypeSpecificPredicate
- Mappings:
Namespace Name Mixin selector official a
Lbr;a(Lbiq;Lakq;Lehn;)Z
intermediary method_22497
Lnet/minecraft/class_7376;method_22497(Lnet/minecraft/class_1297;Lnet/minecraft/class_3218;Lnet/minecraft/class_243;)Z
named test
Lnet/minecraft/predicate/entity/TypeSpecificPredicate;test(Lnet/minecraft/entity/Entity;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/Vec3d;)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)
. -
type
- Specified by:
type
in interfaceTypeSpecificPredicate
- Mappings:
Namespace Name Mixin selector official a
Lbr;a()Lbr$a;
intermediary comp_1776
Lnet/minecraft/class_7376;comp_1776()Lnet/minecraft/class_7376$class_8745;
named type
Lnet/minecraft/predicate/entity/TypeSpecificPredicate;type()Lnet/minecraft/predicate/entity/TypeSpecificPredicate$Type;
-
getter
Returns the value of thegetter
record component.- Returns:
- the value of the
getter
record component
-
variant
Returns the value of thevariant
record component.- Returns:
- the value of the
variant
record component
-