Package net.minecraft.command.argument
Record Class RegistryEntryPredicateArgumentType.TagBased<T>
java.lang.Object
java.lang.Record
net.minecraft.command.argument.RegistryEntryPredicateArgumentType.TagBased<T>
- Record Components:
tag
-
- All Implemented Interfaces:
Predicate<RegistryEntry<T>>
,RegistryEntryPredicateArgumentType.EntryPredicate<T>
- Enclosing class:
RegistryEntryPredicateArgumentType<T>
private static record RegistryEntryPredicateArgumentType.TagBased<T>(RegistryEntryList.Named<T> tag)
extends Record
implements RegistryEntryPredicateArgumentType.EntryPredicate<T>
- Mappings:
Namespace Name official em$d
intermediary net/minecraft/class_7737$class_7742
named net/minecraft/command/argument/RegistryEntryPredicateArgumentType$TagBased
official a
intermediary comp_1024
named tag
-
Field Summary
Modifier and TypeFieldDescriptionprivate final RegistryEntryList.Named<T>
The field for thetag
record component. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionasString()
final boolean
Indicates whether some other object is "equal to" this one.com.mojang.datafixers.util.Either<RegistryEntry.Reference<T>,
RegistryEntryList.Named<T>> getEntry()
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.tryCast
(RegistryKey<? extends Registry<E>> registryRef)
-
Field Details
-
tag
The field for thetag
record component.
-
-
Constructor Details
-
TagBased
TagBased(RegistryEntryList.Named<T> named)
-
-
Method Details
-
getEntry
public com.mojang.datafixers.util.Either<RegistryEntry.Reference<T>,RegistryEntryList.Named<T>> getEntry()- Specified by:
getEntry
in interfaceRegistryEntryPredicateArgumentType.EntryPredicate<T>
- Mappings:
Namespace Name Mixin selector official a
Lem$c;a()Lcom/mojang/datafixers/util/Either;
intermediary method_45647
Lnet/minecraft/class_7737$class_7741;method_45647()Lcom/mojang/datafixers/util/Either;
named getEntry
Lnet/minecraft/command/argument/RegistryEntryPredicateArgumentType$EntryPredicate;getEntry()Lcom/mojang/datafixers/util/Either;
-
tryCast
public <E> Optional<RegistryEntryPredicateArgumentType.EntryPredicate<E>> tryCast(RegistryKey<? extends Registry<E>> registryRef) - Specified by:
tryCast
in interfaceRegistryEntryPredicateArgumentType.EntryPredicate<T>
- Mappings:
Namespace Name Mixin selector official a
Lem$c;a(Lace;)Ljava/util/Optional;
intermediary method_45648
Lnet/minecraft/class_7737$class_7741;method_45648(Lnet/minecraft/class_5321;)Ljava/util/Optional;
named tryCast
Lnet/minecraft/command/argument/RegistryEntryPredicateArgumentType$EntryPredicate;tryCast(Lnet/minecraft/registry/RegistryKey;)Ljava/util/Optional;
-
test
- Specified by:
test
in interfacePredicate<T>
- Mappings:
Namespace Name Mixin selector official a
Lem$d;a(Lgz;)Z
intermediary method_45651
Lnet/minecraft/class_7737$class_7742;method_45651(Lnet/minecraft/class_6880;)Z
named test
Lnet/minecraft/command/argument/RegistryEntryPredicateArgumentType$TagBased;test(Lnet/minecraft/registry/entry/RegistryEntry;)Z
-
asString
- Specified by:
asString
in interfaceRegistryEntryPredicateArgumentType.EntryPredicate<T>
- Mappings:
Namespace Name Mixin selector official b
Lem$c;b()Ljava/lang/String;
intermediary method_45650
Lnet/minecraft/class_7737$class_7741;method_45650()Ljava/lang/String;
named asString
Lnet/minecraft/command/argument/RegistryEntryPredicateArgumentType$EntryPredicate;asString()Ljava/lang/String;
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
tag
Returns the value of thetag
record component.- Returns:
- the value of the
tag
record component
-