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 official db
intermediary net/minecraft/class_8129
named net/minecraft/predicate/TagPredicate
official a
intermediary comp_1836
named tag
official b
intermediary comp_1837
named expected
-
Field Summary
-
Constructor Summary
ConstructorDescriptionTagPredicate
(TagKey<T> tag, boolean expected) Creates an instance of aTagPredicate
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> com.mojang.serialization.Codec<TagPredicate<T>>
createCodec
(RegistryKey<? extends Registry<T>> registryRef) final boolean
Indicates whether some other object is "equal to" this one.boolean
expected()
Returns the value of theexpected
record component.static <T> TagPredicate<T>
final int
hashCode()
Returns a hash code value for this object.tag()
Returns the value of thetag
record component.boolean
test
(RegistryEntry<T> registryEntry) final String
toString()
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 official a
Ldb;a(Lahf;)Lcom/mojang/serialization/Codec;
intermediary method_53245
Lnet/minecraft/class_8129;method_53245(Lnet/minecraft/class_5321;)Lcom/mojang/serialization/Codec;
named createCodec
Lnet/minecraft/predicate/TagPredicate;createCodec(Lnet/minecraft/registry/RegistryKey;)Lcom/mojang/serialization/Codec;
-
expected
- Mappings:
Namespace Name Mixin selector official a
Ldb;a(Lasw;)Ldb;
intermediary method_48965
Lnet/minecraft/class_8129;method_48965(Lnet/minecraft/class_6862;)Lnet/minecraft/class_8129;
named expected
Lnet/minecraft/predicate/TagPredicate;expected(Lnet/minecraft/registry/tag/TagKey;)Lnet/minecraft/predicate/TagPredicate;
-
unexpected
- Mappings:
Namespace Name Mixin selector official b
Ldb;b(Lasw;)Ldb;
intermediary method_48968
Lnet/minecraft/class_8129;method_48968(Lnet/minecraft/class_6862;)Lnet/minecraft/class_8129;
named unexpected
Lnet/minecraft/predicate/TagPredicate;unexpected(Lnet/minecraft/registry/tag/TagKey;)Lnet/minecraft/predicate/TagPredicate;
-
test
- Mappings:
Namespace Name Mixin selector official a
Ldb;a(Lih;)Z
intermediary method_48967
Lnet/minecraft/class_8129;method_48967(Lnet/minecraft/class_6880;)Z
named test
Lnet/minecraft/predicate/TagPredicate;test(Lnet/minecraft/registry/entry/RegistryEntry;)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 thetag
record component.- Returns:
- the value of the
tag
record component
-
expected
public boolean expected()Returns the value of theexpected
record component.- Returns:
- the value of the
expected
record component
-