Package net.minecraft.command.argument
Record Class RegistryPredicateArgumentType.RegistryKeyBased<T>
java.lang.Object
java.lang.Record
net.minecraft.command.argument.RegistryPredicateArgumentType.RegistryKeyBased<T>
- Record Components:
key-
- All Implemented Interfaces:
Predicate<RegistryEntry<T>>,RegistryPredicateArgumentType.RegistryPredicate<T>
- Enclosing class:
RegistryPredicateArgumentType<T>
private static record RegistryPredicateArgumentType.RegistryKeyBased<T>(RegistryKey<T> key)
extends Record
implements RegistryPredicateArgumentType.RegistryPredicate<T>
- Mappings:
Namespace Name official es$bintermediary net/minecraft/class_7066$class_7067named net/minecraft/command/argument/RegistryPredicateArgumentType$RegistryKeyBasedofficial aintermediary comp_522named key
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RegistryKey<T>The field for thekeyrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasString()final booleanIndicates whether some other object is "equal to" this one.com.mojang.datafixers.util.Either<RegistryKey<T>,TagKey<T>> getKey()final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.booleantest(RegistryEntry<T> registryEntry) final StringtoString()Returns a string representation of this record class.tryCast(RegistryKey<? extends Registry<E>> registryRef)
-
Field Details
-
key
The field for thekeyrecord component.
-
-
Constructor Details
-
RegistryKeyBased
RegistryKeyBased(RegistryKey<T> registryKey)
-
-
Method Details
-
getKey
- Specified by:
getKeyin interfaceRegistryPredicateArgumentType.RegistryPredicate<T>- Mappings:
Namespace Name Mixin selector official aLes$c;a()Lcom/mojang/datafixers/util/Either;intermediary method_41173Lnet/minecraft/class_7066$class_7068;method_41173()Lcom/mojang/datafixers/util/Either;named getKeyLnet/minecraft/command/argument/RegistryPredicateArgumentType$RegistryPredicate;getKey()Lcom/mojang/datafixers/util/Either;
-
tryCast
public <E> Optional<RegistryPredicateArgumentType.RegistryPredicate<E>> tryCast(RegistryKey<? extends Registry<E>> registryRef) - Specified by:
tryCastin interfaceRegistryPredicateArgumentType.RegistryPredicate<T>- Mappings:
Namespace Name Mixin selector official aLes$c;a(Lacp;)Ljava/util/Optional;intermediary method_41175Lnet/minecraft/class_7066$class_7068;method_41175(Lnet/minecraft/class_5321;)Ljava/util/Optional;named tryCastLnet/minecraft/command/argument/RegistryPredicateArgumentType$RegistryPredicate;tryCast(Lnet/minecraft/registry/RegistryKey;)Ljava/util/Optional;
-
test
- Specified by:
testin interfacePredicate<T>- Mappings:
Namespace Name Mixin selector official aLes$b;a(Lhe;)Zintermediary method_41174Lnet/minecraft/class_7066$class_7067;method_41174(Lnet/minecraft/class_6880;)Znamed testLnet/minecraft/command/argument/RegistryPredicateArgumentType$RegistryKeyBased;test(Lnet/minecraft/registry/entry/RegistryEntry;)Z
-
asString
- Specified by:
asStringin interfaceRegistryPredicateArgumentType.RegistryPredicate<T>- Mappings:
Namespace Name Mixin selector official bLes$c;b()Ljava/lang/String;intermediary method_41176Lnet/minecraft/class_7066$class_7068;method_41176()Ljava/lang/String;named asStringLnet/minecraft/command/argument/RegistryPredicateArgumentType$RegistryPredicate;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). -
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-