Record Class EntityTypePredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.criterion.EntityTypePredicate
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<EntityTypePredicate> private final HolderSet<EntityType<?>> The field for thetypesrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionEntityTypePredicate(HolderSet<EntityType<?>> types) Creates an instance of aEntityTypePredicaterecord 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(Holder<EntityType<?>> type) static EntityTypePredicateof(HolderGetter<EntityType<?>> lookup, TagKey<EntityType<?>> type) static EntityTypePredicateof(HolderGetter<EntityType<?>> lookup, EntityType<?> type) final StringtoString()Returns a string representation of this record class.HolderSet<EntityType<?>> types()Returns the value of thetypesrecord component.
-
Field Details
-
types
The field for thetypesrecord component. -
CODEC
-
-
Constructor Details
-
EntityTypePredicate
Creates an instance of aEntityTypePredicaterecord class.- Parameters:
types- the value for thetypesrecord component
-
-
Method Details
-
of
-
of
public static EntityTypePredicate of(HolderGetter<EntityType<?>> lookup, TagKey<EntityType<?>> type) -
matches
-
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). -
types
Returns the value of thetypesrecord component.- Returns:
- the value of the
typesrecord component
-