Record Class TagPredicate<T>
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.TagPredicate<T>
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionTagPredicate(TagKey<T> tag, boolean expected) Creates an instance of aTagPredicaterecord class.
- 
Method SummaryModifier and TypeMethodDescriptionstatic <T> com.mojang.serialization.Codec<TagPredicate<T>>codec(ResourceKey<? extends Registry<T>> p_301303_) final booleanIndicates whether some other object is "equal to" this one.booleanexpected()Returns the value of theexpectedrecord component.final inthashCode()Returns a hash code value for this object.static <T> TagPredicate<T>static <T> TagPredicate<T>booleantag()Returns the value of thetagrecord component.final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
tagThe field for thetagrecord component.
- 
expectedprivate final boolean expectedThe field for theexpectedrecord component.
 
- 
- 
Constructor Details- 
TagPredicateCreates an instance of aTagPredicaterecord class.- Parameters:
- tag- the value for the- tagrecord component
- expected- the value for the- expectedrecord component
 
 
- 
- 
Method Details- 
codecpublic static <T> com.mojang.serialization.Codec<TagPredicate<T>> codec(ResourceKey<? extends Registry<T>> p_301303_) 
- 
is
- 
isNot
- 
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='.
- 
tagReturns the value of thetagrecord component.- Returns:
- the value of the tagrecord component
 
- 
expectedpublic boolean expected()Returns the value of theexpectedrecord component.- Returns:
- the value of the expectedrecord component
 
 
-