Record Class EntityTypePredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.EntityTypePredicate
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<EntityTypePredicate>private final HolderSet<EntityType<?>>The field for thetypesrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionEntityTypePredicate(HolderSet<EntityType<?>> types) Creates an instance of aEntityTypePredicaterecord 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(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- 
typesThe field for thetypesrecord component.
- 
CODEC
 
- 
- 
Constructor Details- 
EntityTypePredicateCreates an instance of aEntityTypePredicaterecord class.- Parameters:
- types- the value for the- typesrecord component
 
 
- 
- 
Method Details- 
of
- 
of
- 
matches
- 
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).
- 
typesReturns the value of thetypesrecord component.- Returns:
- the value of the typesrecord component
 
 
-