Record Class TagPredicate<T>
java.lang.Object
java.lang.Record
net.minecraft.advancements.criterion.TagPredicate<T>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTagPredicate(TagKey<T> tag, boolean expected) Creates an instance of aTagPredicaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> com.mojang.serialization.Codec<TagPredicate<T>> codec(ResourceKey<? extends Registry<T>> registryKey) 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
-
tag
-
expected
private final boolean expectedThe field for theexpectedrecord component.
-
-
Constructor Details
-
TagPredicate
-
-
Method Details
-
codec
public static <T> com.mojang.serialization.Codec<TagPredicate<T>> codec(ResourceKey<? extends Registry<T>> registryKey) -
is
-
isNot
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
tag
-
expected
public boolean expected()Returns the value of theexpectedrecord component.- Returns:
- the value of the
expectedrecord component
-