Package net.minecraft.predicate
Record Class TagPredicate<T>
java.lang.Object
java.lang.Record
net.minecraft.predicate.TagPredicate<T>
- Record Components:
tag-expected-
- Mappings:
Namespace Name named net/minecraft/predicate/TagPredicateintermediary net/minecraft/class_8129official ednamed tagintermediary comp_1836official anamed expectedintermediary comp_1837official b
-
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>> createCodec(RegistryKey<? extends Registry<T>> registryRef) final booleanIndicates whether some other object is "equal to" this one.booleanexpected()Returns the value of theexpectedrecord component.static <T> TagPredicate<T> final inthashCode()Returns a hash code value for this object.tag()Returns the value of thetagrecord component.booleantest(RegistryEntry<T> registryEntry) final StringtoString()Returns a string representation of this record class.static <T> TagPredicate<T> unexpected(TagKey<T> tag)
-
Field Details
-
Constructor Details
-
Method Details
-
createCodec
public static <T> com.mojang.serialization.Codec<TagPredicate<T>> createCodec(RegistryKey<? extends Registry<T>> registryRef) - Mappings:
Namespace Name Mixin selector named createCodecLnet/minecraft/predicate/TagPredicate;createCodec(Lnet/minecraft/registry/RegistryKey;)Lcom/mojang/serialization/Codec;intermediary method_53245Lnet/minecraft/class_8129;method_53245(Lnet/minecraft/class_5321;)Lcom/mojang/serialization/Codec;official aLed;a(Lakq;)Lcom/mojang/serialization/Codec;
-
expected
- Mappings:
Namespace Name Mixin selector named expectedLnet/minecraft/predicate/TagPredicate;expected(Lnet/minecraft/registry/tag/TagKey;)Lnet/minecraft/predicate/TagPredicate;intermediary method_48965Lnet/minecraft/class_8129;method_48965(Lnet/minecraft/class_6862;)Lnet/minecraft/class_8129;official aLed;a(Lawu;)Led;
-
unexpected
- Mappings:
Namespace Name Mixin selector named unexpectedLnet/minecraft/predicate/TagPredicate;unexpected(Lnet/minecraft/registry/tag/TagKey;)Lnet/minecraft/predicate/TagPredicate;intermediary method_48968Lnet/minecraft/class_8129;method_48968(Lnet/minecraft/class_6862;)Lnet/minecraft/class_8129;official bLed;b(Lawu;)Led;
-
test
- Mappings:
Namespace Name Mixin selector named testLnet/minecraft/predicate/TagPredicate;test(Lnet/minecraft/registry/entry/RegistryEntry;)Zintermediary method_48967Lnet/minecraft/class_8129;method_48967(Lnet/minecraft/class_6880;)Zofficial aLed;a(Ljm;)Z
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
tag
Returns the value of thetagrecord component.- Returns:
- the value of the
tagrecord component
-
expected
public boolean expected()Returns the value of theexpectedrecord component.- Returns:
- the value of the
expectedrecord component
-