Interface RegistryEntry<T>
- All Known Implementing Classes:
- RegistryEntry.Direct,- RegistryEntry.Reference
Registry entries do not define equals method. Instead, compare the result
 of getKeyOrValue().
 
Reference registry entries also hold their tags. For more information on type-specific behaviors, including "intrusive" and "stand-alone" reference registry entries, see the respective class documentations.
A registry entry is sometimes referred to as a "holder" in error messages.
- See Also:
- Mappings:
- Namespace - Name - official - he- intermediary - net/minecraft/class_6880- named - net/minecraft/registry/entry/RegistryEntry
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic final recordA direct registry entry holds the value directly.static classA reference registry entry holds the value by reference.static enumThe types of registry entries.
- 
Method SummaryModifier and TypeMethodDescriptiongetKey()Returns the registry key of this entry, or an empty optional if this is a direct entry.com.mojang.datafixers.util.Either<RegistryKey<T>,T> Returns the object that identifies this registry key.getType()Returns the type (direct or reference) of this registry entry.booleanbooleanReturns whether this entry is intag.booleanmatches(Predicate<RegistryKey<T>> predicate) Returns whether this entry's key matchespredicate.booleanmatchesId(Identifier id) Returns whether the ID of this entry isid.booleanmatchesKey(RegistryKey<T> key) Returns whether the registry key of this entry iskey.static <T> RegistryEntry<T>of(T value) Returns a new direct registry entry ofvalue.booleanownerEquals(RegistryEntryOwner<T> owner) Returns a stream of the tags of this entry, or an empty stream if this is a direct entry.value()
- 
Method Details- 
valueT value()- Mappings:
- Namespace - Name - Mixin selector - official - a- Lhe;a()Ljava/lang/Object;- intermediary - comp_349- Lnet/minecraft/class_6880;comp_349()Ljava/lang/Object;- named - value- Lnet/minecraft/registry/entry/RegistryEntry;value()Ljava/lang/Object;
 
- 
hasKeyAndValueboolean hasKeyAndValue()- Mappings:
- Namespace - Name - Mixin selector - official - b- Lhe;b()Z- intermediary - method_40227- Lnet/minecraft/class_6880;method_40227()Z- named - hasKeyAndValue- Lnet/minecraft/registry/entry/RegistryEntry;hasKeyAndValue()Z
 
- 
matchesIdReturns whether the ID of this entry isid.This always returns falsefor direct entries.- Returns:
- whether the ID of this entry is id
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lhe;a(Lacq;)Z- intermediary - method_40226- Lnet/minecraft/class_6880;method_40226(Lnet/minecraft/class_2960;)Z- named - matchesId- Lnet/minecraft/registry/entry/RegistryEntry;matchesId(Lnet/minecraft/util/Identifier;)Z
 
- 
matchesKeyReturns whether the registry key of this entry iskey.This always returns falsefor direct entries.- Returns:
- whether the registry key of this entry is key
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lhe;a(Lacp;)Z- intermediary - method_40225- Lnet/minecraft/class_6880;method_40225(Lnet/minecraft/class_5321;)Z- named - matchesKey- Lnet/minecraft/registry/entry/RegistryEntry;matchesKey(Lnet/minecraft/registry/RegistryKey;)Z
 
- 
matchesReturns whether this entry's key matchespredicate.This always returns falsefor direct entries.- Returns:
- whether this entry's key matches predicate
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lhe;a(Ljava/util/function/Predicate;)Z- intermediary - method_40224- Lnet/minecraft/class_6880;method_40224(Ljava/util/function/Predicate;)Z- named - matches- Lnet/minecraft/registry/entry/RegistryEntry;matches(Ljava/util/function/Predicate;)Z
 
- 
isInReturns whether this entry is intag.This always returns falsefor direct entries, since tags are managed by a registry.- Returns:
- whether this entry is in tag
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lhe;a(Lanl;)Z- intermediary - method_40220- Lnet/minecraft/class_6880;method_40220(Lnet/minecraft/class_6862;)Z- named - isIn- Lnet/minecraft/registry/entry/RegistryEntry;isIn(Lnet/minecraft/registry/tag/TagKey;)Z
 
- 
streamTagsReturns a stream of the tags of this entry, or an empty stream if this is a direct entry.- Returns:
- a stream of the tags of this entry, or an empty stream if this is a direct entry
- Mappings:
- Namespace - Name - Mixin selector - official - c- Lhe;c()Ljava/util/stream/Stream;- intermediary - method_40228- Lnet/minecraft/class_6880;method_40228()Ljava/util/stream/Stream;- named - streamTags- Lnet/minecraft/registry/entry/RegistryEntry;streamTags()Ljava/util/stream/Stream;
 
- 
getKeyOrValuecom.mojang.datafixers.util.Either<RegistryKey<T>,T> getKeyOrValue()Returns the object that identifies this registry key.For direct entries, this is the held value, and for reference entries, this is the key of the entry. - Returns:
- the object that identifies this registry key
- Mappings:
- Namespace - Name - Mixin selector - official - d- Lhe;d()Lcom/mojang/datafixers/util/Either;- intermediary - method_40229- Lnet/minecraft/class_6880;method_40229()Lcom/mojang/datafixers/util/Either;- named - getKeyOrValue- Lnet/minecraft/registry/entry/RegistryEntry;getKeyOrValue()Lcom/mojang/datafixers/util/Either;
 
- 
getKeyOptional<RegistryKey<T>> getKey()Returns the registry key of this entry, or an empty optional if this is a direct entry.- Returns:
- the registry key of this entry, or an empty optional if this is a direct entry
- Mappings:
- Namespace - Name - Mixin selector - official - e- Lhe;e()Ljava/util/Optional;- intermediary - method_40230- Lnet/minecraft/class_6880;method_40230()Ljava/util/Optional;- named - getKey- Lnet/minecraft/registry/entry/RegistryEntry;getKey()Ljava/util/Optional;
 
- 
getTypeRegistryEntry.Type getType()Returns the type (direct or reference) of this registry entry.This is different from the types of reference registry entries, i.e. stand-alone or intrusive. - Returns:
- the type (direct or reference) of this registry entry
- Mappings:
- Namespace - Name - Mixin selector - official - f- Lhe;f()Lhe$b;- intermediary - method_40231- Lnet/minecraft/class_6880;method_40231()Lnet/minecraft/class_6880$class_6882;- named - getType- Lnet/minecraft/registry/entry/RegistryEntry;getType()Lnet/minecraft/registry/entry/RegistryEntry$Type;
 
- 
ownerEquals- Mappings:
- Namespace - Name - Mixin selector - official - a- Lhe;a(Lhh;)Z- intermediary - method_46745- Lnet/minecraft/class_6880;method_46745(Lnet/minecraft/class_7876;)Z- named - ownerEquals- Lnet/minecraft/registry/entry/RegistryEntry;ownerEquals(Lnet/minecraft/registry/entry/RegistryEntryOwner;)Z
 
- 
ofReturns a new direct registry entry ofvalue.- Returns:
- a new direct registry entry of value
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lhe;a(Ljava/lang/Object;)Lhe;- intermediary - method_40223- Lnet/minecraft/class_6880;method_40223(Ljava/lang/Object;)Lnet/minecraft/class_6880;- named - of- Lnet/minecraft/registry/entry/RegistryEntry;of(Ljava/lang/Object;)Lnet/minecraft/registry/entry/RegistryEntry;
 
 
-