Record Class EntityTypePredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.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(EntityType<?> p_37642_) static EntityTypePredicateof(TagKey<EntityType<?>> p_204082_) static EntityTypePredicateof(EntityType<?> p_37648_) 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
-
matches
-
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). -
types
Returns the value of thetypesrecord component.- Returns:
- the value of the
typesrecord component
-