Package net.minecraft.registry
Class SimpleRegistry<T>
java.lang.Object
net.minecraft.registry.SimpleRegistry<T>
- All Implemented Interfaces:
com.mojang.serialization.Keyable
,Iterable<T>
,MutableRegistry<T>
,Registry<T>
,IndexedIterable<T>
- Direct Known Subclasses:
SimpleDefaultedRegistry
An implementation of a mutable registry. All vanilla registries use this (or its
subclass,
DefaultedRegistry
).- See Also:
- Mappings:
Namespace Name named net/minecraft/registry/SimpleRegistry
intermediary net/minecraft/class_2370
official ju
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Reference2IntMap
<T> private boolean
private final Map
<Identifier, RegistryEntry.Reference<T>> private @Nullable Map
<T, RegistryEntry.Reference<T>> (package private) final RegistryKey
<? extends Registry<T>> private final Map
<RegistryKey<T>, RegistryEntry.Reference<T>> private final Map
<RegistryKey<T>, RegistryEntryInfo> private com.mojang.serialization.Lifecycle
private static final Logger
private final ObjectList
<RegistryEntry.Reference<T>> private final Object
private Map
<TagKey<T>, RegistryEntryList.Named<T>> private final Map
<T, RegistryEntry.Reference<T>> private final RegistryWrapper.Impl
<T> Fields inherited from interface net.minecraft.util.collection.IndexedIterable
ABSENT_RAW_ID
-
Constructor Summary
ConstructorDescriptionSimpleRegistry
(RegistryKey<? extends Registry<T>> key, com.mojang.serialization.Lifecycle lifecycle) SimpleRegistry
(RegistryKey<? extends Registry<T>> key, com.mojang.serialization.Lifecycle lifecycle, boolean intrusive) -
Method Summary
Modifier and TypeMethodDescriptionadd
(RegistryKey<T> key, T value, RegistryEntryInfo info) private void
private void
assertNotFrozen
(RegistryKey<T> key) void
boolean
contains
(RegistryKey<T> key) Returns whetherkey
is registered in this registry.boolean
containsId
(Identifier id) Returns whetherid
is registered in this registry.createEntry
(T value) private RegistryEntryList.Named
<T> createNamedEntryList
(TagKey<T> tag) freeze()
get
(int index) get
(@Nullable RegistryKey<T> key) Returns the value that is assignedkey
, ornull
if there is none.get
(@Nullable Identifier id) Returns the value that is assignedid
, ornull
if there is none.getEntry
(int rawId) Returns the reference registry entry for the value assignedrawId
, or an empty optional if there is no such value.getEntry
(RegistryKey<T> key) Returns the reference registry entry for the value assignedkey
, or an empty optional if there is no such value.getEntry
(Identifier id) getEntryInfo
(RegistryKey<T> key) getEntryList
(TagKey<T> tag) Returns the registry entry list of values that are assignedtag
, or an empty optional if the tag is not known to the registry.Set
<Map.Entry<RegistryKey<T>, T>> Returns the set containingMap.Entry
of the registry keys and values registered in this registry.Returns the ID assigned tovalue
, ornull
if it is not registered.getIds()
Returns the set of all IDs registered in a registry.RegistryKey
<? extends Registry<T>> getKey()
Returns the registry key that identifies this registry.Returns the registry key ofvalue
, or an empty optional if it is not registered.Set
<RegistryKey<T>> getKeys()
Returns the set of all registry keys registered in a registry.com.mojang.serialization.Lifecycle
(package private) RegistryEntry.Reference
<T> getOrCreateEntry
(RegistryKey<T> key) getOrCreateEntryList
(TagKey<T> tag) Returns a random registry entry from this registry, or an empty optional if the registry is empty.int
Returns a registry wrapper that does not mutate the backing registry under any circumstances.private static <T> T
getValue
(RegistryEntry.Reference<T> entry) boolean
isEmpty()
Returns whether the registry is empty.iterator()
void
populateTags
(Map<TagKey<T>, List<RegistryEntry<T>>> tagEntries) int
size()
Returns a stream of reference registry entries of this registry.Returns a stream of all tag keys known to this registry.Stream
<com.mojang.datafixers.util.Pair<TagKey<T>, RegistryEntryList.Named<T>>> toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.util.collection.IndexedIterable
getOrThrow, getRawIdOrThrow
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface net.minecraft.registry.Registry
entryOf, getCodec, getEntryCodec, getIndexedEntries, getOrEmpty, getOrEmpty, getOrThrow, getRandomEntry, getTagCreatingWrapper, iterateEntries, keys, stream
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector named LOGGER
Lnet/minecraft/registry/SimpleRegistry;LOGGER:Lorg/slf4j/Logger;
intermediary field_36635
Lnet/minecraft/class_2370;field_36635:Lorg/slf4j/Logger;
official b
Lju;b:Lorg/slf4j/Logger;
-
key
- Mappings:
Namespace Name Mixin selector named key
Lnet/minecraft/registry/SimpleRegistry;key:Lnet/minecraft/registry/RegistryKey;
intermediary field_41126
Lnet/minecraft/class_2370;field_41126:Lnet/minecraft/class_5321;
official c
Lju;c:Lakp;
-
rawIdToEntry
- Mappings:
Namespace Name Mixin selector named rawIdToEntry
Lnet/minecraft/registry/SimpleRegistry;rawIdToEntry:Lit/unimi/dsi/fastutil/objects/ObjectList;
intermediary field_26682
Lnet/minecraft/class_2370;field_26682:Lit/unimi/dsi/fastutil/objects/ObjectList;
official d
Lju;d:Lit/unimi/dsi/fastutil/objects/ObjectList;
-
entryToRawId
- Mappings:
Namespace Name Mixin selector named entryToRawId
Lnet/minecraft/registry/SimpleRegistry;entryToRawId:Lit/unimi/dsi/fastutil/objects/Reference2IntMap;
intermediary field_26683
Lnet/minecraft/class_2370;field_26683:Lit/unimi/dsi/fastutil/objects/Reference2IntMap;
official e
Lju;e:Lit/unimi/dsi/fastutil/objects/Reference2IntMap;
-
idToEntry
- Mappings:
Namespace Name Mixin selector named idToEntry
Lnet/minecraft/registry/SimpleRegistry;idToEntry:Ljava/util/Map;
intermediary field_11107
Lnet/minecraft/class_2370;field_11107:Ljava/util/Map;
official f
Lju;f:Ljava/util/Map;
-
keyToEntry
- Mappings:
Namespace Name Mixin selector named keyToEntry
Lnet/minecraft/registry/SimpleRegistry;keyToEntry:Ljava/util/Map;
intermediary field_25067
Lnet/minecraft/class_2370;field_25067:Ljava/util/Map;
official g
Lju;g:Ljava/util/Map;
-
valueToEntry
- Mappings:
Namespace Name Mixin selector named valueToEntry
Lnet/minecraft/registry/SimpleRegistry;valueToEntry:Ljava/util/Map;
intermediary field_36461
Lnet/minecraft/class_2370;field_36461:Ljava/util/Map;
official h
Lju;h:Ljava/util/Map;
-
keyToEntryInfo
- Mappings:
Namespace Name Mixin selector named keyToEntryInfo
Lnet/minecraft/registry/SimpleRegistry;keyToEntryInfo:Ljava/util/Map;
intermediary field_49135
Lnet/minecraft/class_2370;field_49135:Ljava/util/Map;
official i
Lju;i:Ljava/util/Map;
-
lifecycle
private com.mojang.serialization.Lifecycle lifecycle- Mappings:
Namespace Name Mixin selector named lifecycle
Lnet/minecraft/registry/SimpleRegistry;lifecycle:Lcom/mojang/serialization/Lifecycle;
intermediary field_26732
Lnet/minecraft/class_2370;field_26732:Lcom/mojang/serialization/Lifecycle;
official j
Lju;j:Lcom/mojang/serialization/Lifecycle;
-
tagToEntryList
- Mappings:
Namespace Name Mixin selector named tagToEntryList
Lnet/minecraft/registry/SimpleRegistry;tagToEntryList:Ljava/util/Map;
intermediary field_36462
Lnet/minecraft/class_2370;field_36462:Ljava/util/Map;
official k
Lju;k:Ljava/util/Map;
-
frozen
private boolean frozen- Mappings:
Namespace Name Mixin selector named frozen
Lnet/minecraft/registry/SimpleRegistry;frozen:Z
intermediary field_36463
Lnet/minecraft/class_2370;field_36463:Z
official l
Lju;l:Z
-
intrusiveValueToEntry
- Mappings:
Namespace Name Mixin selector named intrusiveValueToEntry
Lnet/minecraft/registry/SimpleRegistry;intrusiveValueToEntry:Ljava/util/Map;
intermediary field_40584
Lnet/minecraft/class_2370;field_40584:Ljava/util/Map;
official m
Lju;m:Ljava/util/Map;
-
wrapper
- Mappings:
Namespace Name Mixin selector named wrapper
Lnet/minecraft/registry/SimpleRegistry;wrapper:Lnet/minecraft/registry/RegistryWrapper$Impl;
intermediary field_41127
Lnet/minecraft/class_2370;field_41127:Lnet/minecraft/class_7225$class_7226;
official n
Lju;n:Ljo$b;
-
tagLock
- Mappings:
Namespace Name Mixin selector named tagLock
Lnet/minecraft/registry/SimpleRegistry;tagLock:Ljava/lang/Object;
intermediary field_51521
Lnet/minecraft/class_2370;field_51521:Ljava/lang/Object;
official o
Lju;o:Ljava/lang/Object;
-
-
Constructor Details
-
SimpleRegistry
public SimpleRegistry(RegistryKey<? extends Registry<T>> key, com.mojang.serialization.Lifecycle lifecycle) - Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/registry/SimpleRegistry;<init>(Lnet/minecraft/registry/RegistryKey;Lcom/mojang/serialization/Lifecycle;)V
intermediary <init>
Lnet/minecraft/class_2370;<init>(Lnet/minecraft/class_5321;Lcom/mojang/serialization/Lifecycle;)V
official <init>
Lju;<init>(Lakp;Lcom/mojang/serialization/Lifecycle;)V
-
SimpleRegistry
public SimpleRegistry(RegistryKey<? extends Registry<T>> key, com.mojang.serialization.Lifecycle lifecycle, boolean intrusive) - Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/registry/SimpleRegistry;<init>(Lnet/minecraft/registry/RegistryKey;Lcom/mojang/serialization/Lifecycle;Z)V
intermediary <init>
Lnet/minecraft/class_2370;<init>(Lnet/minecraft/class_5321;Lcom/mojang/serialization/Lifecycle;Z)V
official <init>
Lju;<init>(Lakp;Lcom/mojang/serialization/Lifecycle;Z)V
-
-
Method Details
-
getKey
Returns the registry key that identifies this registry.- Specified by:
getKey
in interfaceRegistry<T>
- Returns:
- the registry key that identifies this registry
- Mappings:
Namespace Name Mixin selector named getKey
Lnet/minecraft/registry/Registry;getKey()Lnet/minecraft/registry/RegistryKey;
intermediary method_30517
Lnet/minecraft/class_2378;method_30517()Lnet/minecraft/class_5321;
official d
Ljz;d()Lakp;
-
toString
-
assertNotFrozen
private void assertNotFrozen()- Mappings:
Namespace Name Mixin selector named assertNotFrozen
Lnet/minecraft/registry/SimpleRegistry;assertNotFrozen()V
intermediary method_45939
Lnet/minecraft/class_2370;method_45939()V
official b
Lju;b()V
-
assertNotFrozen
- Mappings:
Namespace Name Mixin selector named assertNotFrozen
Lnet/minecraft/registry/SimpleRegistry;assertNotFrozen(Lnet/minecraft/registry/RegistryKey;)V
intermediary method_40274
Lnet/minecraft/class_2370;method_40274(Lnet/minecraft/class_5321;)V
official h
Lju;h(Lakp;)V
-
add
- Specified by:
add
in interfaceMutableRegistry<T>
- Mappings:
Namespace Name Mixin selector named add
Lnet/minecraft/registry/MutableRegistry;add(Lnet/minecraft/registry/RegistryKey;Ljava/lang/Object;Lnet/minecraft/registry/entry/RegistryEntryInfo;)Lnet/minecraft/registry/entry/RegistryEntry$Reference;
intermediary method_10272
Lnet/minecraft/class_2385;method_10272(Lnet/minecraft/class_5321;Ljava/lang/Object;Lnet/minecraft/class_9248;)Lnet/minecraft/class_6880$class_6883;
official a
Lki;a(Lakp;Ljava/lang/Object;Ljy;)Ljm$c;
-
getId
Returns the ID assigned tovalue
, ornull
if it is not registered.- Specified by:
getId
in interfaceRegistry<T>
- Returns:
- the ID assigned to
value
, ornull
if it is not registered - Mappings:
Namespace Name Mixin selector named getId
Lnet/minecraft/registry/Registry;getId(Ljava/lang/Object;)Lnet/minecraft/util/Identifier;
intermediary method_10221
Lnet/minecraft/class_2378;method_10221(Ljava/lang/Object;)Lnet/minecraft/class_2960;
official b
Ljz;b(Ljava/lang/Object;)Lakq;
-
getKey
Returns the registry key ofvalue
, or an empty optional if it is not registered.- Specified by:
getKey
in interfaceRegistry<T>
- Returns:
- the registry key of
value
, or an empty optional if it is not registered - Mappings:
Namespace Name Mixin selector named getKey
Lnet/minecraft/registry/Registry;getKey(Ljava/lang/Object;)Ljava/util/Optional;
intermediary method_29113
Lnet/minecraft/class_2378;method_29113(Ljava/lang/Object;)Ljava/util/Optional;
official d
Ljz;d(Ljava/lang/Object;)Ljava/util/Optional;
-
getRawId
- Specified by:
getRawId
in interfaceIndexedIterable<T>
- Specified by:
getRawId
in interfaceRegistry<T>
- Mappings:
Namespace Name Mixin selector named getRawId
Lnet/minecraft/util/collection/IndexedIterable;getRawId(Ljava/lang/Object;)I
intermediary method_10206
Lnet/minecraft/class_2359;method_10206(Ljava/lang/Object;)I
official a
Ljr;a(Ljava/lang/Object;)I
-
get
Returns the value that is assignedkey
, ornull
if there is none.- Specified by:
get
in interfaceRegistry<T>
- Returns:
- the value that is assigned
key
, ornull
if there is none - Mappings:
Namespace Name Mixin selector named get
Lnet/minecraft/registry/Registry;get(Lnet/minecraft/registry/RegistryKey;)Ljava/lang/Object;
intermediary method_29107
Lnet/minecraft/class_2378;method_29107(Lnet/minecraft/class_5321;)Ljava/lang/Object;
official a
Ljz;a(Lakp;)Ljava/lang/Object;
-
get
- Specified by:
get
in interfaceIndexedIterable<T>
- Mappings:
Namespace Name Mixin selector named get
Lnet/minecraft/util/collection/IndexedIterable;get(I)Ljava/lang/Object;
intermediary method_10200
Lnet/minecraft/class_2359;method_10200(I)Ljava/lang/Object;
official a
Ljr;a(I)Ljava/lang/Object;
-
getEntry
Returns the reference registry entry for the value assignedrawId
, or an empty optional if there is no such value.- Specified by:
getEntry
in interfaceRegistry<T>
- Returns:
- the reference registry entry for the value assigned
rawId
, or an empty optional if there is no such value - Mappings:
Namespace Name Mixin selector named getEntry
Lnet/minecraft/registry/Registry;getEntry(I)Ljava/util/Optional;
intermediary method_40265
Lnet/minecraft/class_2378;method_40265(I)Ljava/util/Optional;
official c
Ljz;c(I)Ljava/util/Optional;
-
getEntry
- Specified by:
getEntry
in interfaceRegistry<T>
- Mappings:
Namespace Name Mixin selector named getEntry
Lnet/minecraft/registry/Registry;getEntry(Lnet/minecraft/util/Identifier;)Ljava/util/Optional;
intermediary method_55841
Lnet/minecraft/class_2378;method_55841(Lnet/minecraft/class_2960;)Ljava/util/Optional;
official c
Ljz;c(Lakq;)Ljava/util/Optional;
-
getEntry
Returns the reference registry entry for the value assignedkey
, or an empty optional if there is no such value.- Specified by:
getEntry
in interfaceRegistry<T>
- Returns:
- the reference registry entry for the value assigned
key
, or an empty optional if there is no such value - See Also:
- Mappings:
Namespace Name Mixin selector named getEntry
Lnet/minecraft/registry/Registry;getEntry(Lnet/minecraft/registry/RegistryKey;)Ljava/util/Optional;
intermediary method_40264
Lnet/minecraft/class_2378;method_40264(Lnet/minecraft/class_5321;)Ljava/util/Optional;
official b
Ljz;b(Lakp;)Ljava/util/Optional;
-
getDefaultEntry
- Specified by:
getDefaultEntry
in interfaceRegistry<T>
- Mappings:
Namespace Name Mixin selector named getDefaultEntry
Lnet/minecraft/registry/Registry;getDefaultEntry()Ljava/util/Optional;
intermediary method_60385
Lnet/minecraft/class_2378;method_60385()Ljava/util/Optional;
official a
Ljz;a()Ljava/util/Optional;
-
getEntry
- Specified by:
getEntry
in interfaceRegistry<T>
- Mappings:
Namespace Name Mixin selector named getEntry
Lnet/minecraft/registry/Registry;getEntry(Ljava/lang/Object;)Lnet/minecraft/registry/entry/RegistryEntry;
intermediary method_47983
Lnet/minecraft/class_2378;method_47983(Ljava/lang/Object;)Lnet/minecraft/class_6880;
official e
Ljz;e(Ljava/lang/Object;)Ljm;
-
getOrCreateEntry
- Mappings:
Namespace Name Mixin selector named getOrCreateEntry
Lnet/minecraft/registry/SimpleRegistry;getOrCreateEntry(Lnet/minecraft/registry/RegistryKey;)Lnet/minecraft/registry/entry/RegistryEntry$Reference;
intermediary method_44298
Lnet/minecraft/class_2370;method_44298(Lnet/minecraft/class_5321;)Lnet/minecraft/class_6880$class_6883;
official i
Lju;i(Lakp;)Ljm$c;
-
size
public int size()- Specified by:
size
in interfaceIndexedIterable<T>
- Mappings:
Namespace Name Mixin selector named size
Lnet/minecraft/util/collection/IndexedIterable;size()I
intermediary method_10204
Lnet/minecraft/class_2359;method_10204()I
official c
Ljr;c()I
-
getEntryInfo
- Specified by:
getEntryInfo
in interfaceRegistry<T>
- Mappings:
Namespace Name Mixin selector named getEntryInfo
Lnet/minecraft/registry/Registry;getEntryInfo(Lnet/minecraft/registry/RegistryKey;)Ljava/util/Optional;
intermediary method_57058
Lnet/minecraft/class_2378;method_57058(Lnet/minecraft/class_5321;)Ljava/util/Optional;
official c
Ljz;c(Lakp;)Ljava/util/Optional;
-
getLifecycle
public com.mojang.serialization.Lifecycle getLifecycle()- Specified by:
getLifecycle
in interfaceRegistry<T>
- Mappings:
Namespace Name Mixin selector named getLifecycle
Lnet/minecraft/registry/Registry;getLifecycle()Lcom/mojang/serialization/Lifecycle;
intermediary method_31138
Lnet/minecraft/class_2378;method_31138()Lcom/mojang/serialization/Lifecycle;
official e
Ljz;e()Lcom/mojang/serialization/Lifecycle;
-
iterator
-
get
Returns the value that is assignedid
, ornull
if there is none.- Specified by:
get
in interfaceRegistry<T>
- Returns:
- the value that is assigned
id
, ornull
if there is none - Mappings:
Namespace Name Mixin selector named get
Lnet/minecraft/registry/Registry;get(Lnet/minecraft/util/Identifier;)Ljava/lang/Object;
intermediary method_10223
Lnet/minecraft/class_2378;method_10223(Lnet/minecraft/class_2960;)Ljava/lang/Object;
official a
Ljz;a(Lakq;)Ljava/lang/Object;
-
getValue
- Mappings:
Namespace Name Mixin selector named getValue
Lnet/minecraft/registry/SimpleRegistry;getValue(Lnet/minecraft/registry/entry/RegistryEntry$Reference;)Ljava/lang/Object;
intermediary method_40253
Lnet/minecraft/class_2370;method_40253(Lnet/minecraft/class_6880$class_6883;)Ljava/lang/Object;
official a
Lju;a(Ljm$c;)Ljava/lang/Object;
-
getIds
Returns the set of all IDs registered in a registry.- Specified by:
getIds
in interfaceRegistry<T>
- Returns:
- the set of all IDs registered in a registry
- Mappings:
Namespace Name Mixin selector named getIds
Lnet/minecraft/registry/Registry;getIds()Ljava/util/Set;
intermediary method_10235
Lnet/minecraft/class_2378;method_10235()Ljava/util/Set;
official f
Ljz;f()Ljava/util/Set;
-
getKeys
Returns the set of all registry keys registered in a registry.- Specified by:
getKeys
in interfaceRegistry<T>
- Returns:
- the set of all registry keys registered in a registry
- Mappings:
Namespace Name Mixin selector named getKeys
Lnet/minecraft/registry/Registry;getKeys()Ljava/util/Set;
intermediary method_42021
Lnet/minecraft/class_2378;method_42021()Ljava/util/Set;
official g
Ljz;g()Ljava/util/Set;
-
getEntrySet
Returns the set containingMap.Entry
of the registry keys and values registered in this registry.- Specified by:
getEntrySet
in interfaceRegistry<T>
- Returns:
- the set containing
Map.Entry
of the registry keys and values registered in this registry - Mappings:
Namespace Name Mixin selector named getEntrySet
Lnet/minecraft/registry/Registry;getEntrySet()Ljava/util/Set;
intermediary method_29722
Lnet/minecraft/class_2378;method_29722()Ljava/util/Set;
official h
Ljz;h()Ljava/util/Set;
-
streamEntries
Returns a stream of reference registry entries of this registry.- Specified by:
streamEntries
in interfaceRegistry<T>
- Returns:
- a stream of reference registry entries of this registry
- Mappings:
Namespace Name Mixin selector named streamEntries
Lnet/minecraft/registry/Registry;streamEntries()Ljava/util/stream/Stream;
intermediary method_40270
Lnet/minecraft/class_2378;method_40270()Ljava/util/stream/Stream;
official i
Ljz;i()Ljava/util/stream/Stream;
-
streamTagsAndEntries
public Stream<com.mojang.datafixers.util.Pair<TagKey<T>,RegistryEntryList.Named<T>>> streamTagsAndEntries()- Specified by:
streamTagsAndEntries
in interfaceRegistry<T>
- Mappings:
Namespace Name Mixin selector named streamTagsAndEntries
Lnet/minecraft/registry/Registry;streamTagsAndEntries()Ljava/util/stream/Stream;
intermediary method_40272
Lnet/minecraft/class_2378;method_40272()Ljava/util/stream/Stream;
official j
Ljz;j()Ljava/util/stream/Stream;
-
getOrCreateEntryList
- Specified by:
getOrCreateEntryList
in interfaceRegistry<T>
- Mappings:
Namespace Name Mixin selector named getOrCreateEntryList
Lnet/minecraft/registry/Registry;getOrCreateEntryList(Lnet/minecraft/registry/tag/TagKey;)Lnet/minecraft/registry/entry/RegistryEntryList$Named;
intermediary method_40260
Lnet/minecraft/class_2378;method_40260(Lnet/minecraft/class_6862;)Lnet/minecraft/class_6885$class_6888;
official a
Ljz;a(Lawt;)Ljq$c;
-
createNamedEntryList
- Mappings:
Namespace Name Mixin selector named createNamedEntryList
Lnet/minecraft/registry/SimpleRegistry;createNamedEntryList(Lnet/minecraft/registry/tag/TagKey;)Lnet/minecraft/registry/entry/RegistryEntryList$Named;
intermediary method_40562
Lnet/minecraft/class_2370;method_40562(Lnet/minecraft/class_6862;)Lnet/minecraft/class_6885$class_6888;
official d
Lju;d(Lawt;)Ljq$c;
-
streamTags
Returns a stream of all tag keys known to this registry.- Specified by:
streamTags
in interfaceRegistry<T>
- Returns:
- a stream of all tag keys known to this registry
- Mappings:
Namespace Name Mixin selector named streamTags
Lnet/minecraft/registry/Registry;streamTags()Ljava/util/stream/Stream;
intermediary method_40273
Lnet/minecraft/class_2378;method_40273()Ljava/util/stream/Stream;
official k
Ljz;k()Ljava/util/stream/Stream;
-
isEmpty
public boolean isEmpty()Returns whether the registry is empty.- Specified by:
isEmpty
in interfaceMutableRegistry<T>
- Returns:
- whether the registry is empty
- Mappings:
Namespace Name Mixin selector named isEmpty
Lnet/minecraft/registry/MutableRegistry;isEmpty()Z
intermediary method_35863
Lnet/minecraft/class_2385;method_35863()Z
official l
Lki;l()Z
-
getRandom
Returns a random registry entry from this registry, or an empty optional if the registry is empty.- Specified by:
getRandom
in interfaceRegistry<T>
- Returns:
- a random registry entry from this registry, or an empty optional if the registry is empty
- Mappings:
Namespace Name Mixin selector named getRandom
Lnet/minecraft/registry/Registry;getRandom(Lnet/minecraft/util/math/random/Random;)Ljava/util/Optional;
intermediary method_10240
Lnet/minecraft/class_2378;method_10240(Lnet/minecraft/class_5819;)Ljava/util/Optional;
official a
Ljz;a(Layv;)Ljava/util/Optional;
-
containsId
Returns whetherid
is registered in this registry.- Specified by:
containsId
in interfaceRegistry<T>
- Returns:
- whether
id
is registered in this registry - Mappings:
Namespace Name Mixin selector named containsId
Lnet/minecraft/registry/Registry;containsId(Lnet/minecraft/util/Identifier;)Z
intermediary method_10250
Lnet/minecraft/class_2378;method_10250(Lnet/minecraft/class_2960;)Z
official d
Ljz;d(Lakq;)Z
-
contains
Returns whetherkey
is registered in this registry.- Specified by:
contains
in interfaceRegistry<T>
- Returns:
- whether
key
is registered in this registry - Mappings:
Namespace Name Mixin selector named contains
Lnet/minecraft/registry/Registry;contains(Lnet/minecraft/registry/RegistryKey;)Z
intermediary method_35842
Lnet/minecraft/class_2378;method_35842(Lnet/minecraft/class_5321;)Z
official d
Ljz;d(Lakp;)Z
-
freeze
-
createEntry
- Specified by:
createEntry
in interfaceRegistry<T>
- Mappings:
Namespace Name Mixin selector named createEntry
Lnet/minecraft/registry/Registry;createEntry(Ljava/lang/Object;)Lnet/minecraft/registry/entry/RegistryEntry$Reference;
intermediary method_40269
Lnet/minecraft/class_2378;method_40269(Ljava/lang/Object;)Lnet/minecraft/class_6880$class_6883;
official f
Ljz;f(Ljava/lang/Object;)Ljm$c;
-
getEntryList
Returns the registry entry list of values that are assignedtag
, or an empty optional if the tag is not known to the registry.- Specified by:
getEntryList
in interfaceRegistry<T>
- Returns:
- the registry entry list of values that are assigned
tag
, or an empty optional if the tag is not known to the registry - Mappings:
Namespace Name Mixin selector named getEntryList
Lnet/minecraft/registry/Registry;getEntryList(Lnet/minecraft/registry/tag/TagKey;)Ljava/util/Optional;
intermediary method_40266
Lnet/minecraft/class_2378;method_40266(Lnet/minecraft/class_6862;)Ljava/util/Optional;
official b
Ljz;b(Lawt;)Ljava/util/Optional;
-
populateTags
- Specified by:
populateTags
in interfaceRegistry<T>
- Mappings:
Namespace Name Mixin selector named populateTags
Lnet/minecraft/registry/Registry;populateTags(Ljava/util/Map;)V
intermediary method_40257
Lnet/minecraft/class_2378;method_40257(Ljava/util/Map;)V
official a
Ljz;a(Ljava/util/Map;)V
-
clearTags
public void clearTags() -
createMutableEntryLookup
- Specified by:
createMutableEntryLookup
in interfaceMutableRegistry<T>
- Mappings:
Namespace Name Mixin selector named createMutableEntryLookup
Lnet/minecraft/registry/MutableRegistry;createMutableEntryLookup()Lnet/minecraft/registry/RegistryEntryLookup;
intermediary method_46769
Lnet/minecraft/class_2385;method_46769()Lnet/minecraft/class_7871;
official o
Lki;o()Ljn;
-
getEntryOwner
- Specified by:
getEntryOwner
in interfaceRegistry<T>
- Mappings:
Namespace Name Mixin selector named getEntryOwner
Lnet/minecraft/registry/Registry;getEntryOwner()Lnet/minecraft/registry/entry/RegistryEntryOwner;
intermediary method_46770
Lnet/minecraft/class_2378;method_46770()Lnet/minecraft/class_7876;
official p
Ljz;p()Ljp;
-
getReadOnlyWrapper
Returns a registry wrapper that does not mutate the backing registry under any circumstances.- Specified by:
getReadOnlyWrapper
in interfaceRegistry<T>
- Returns:
- a registry wrapper that does not mutate the backing registry under any circumstances
- Mappings:
Namespace Name Mixin selector named getReadOnlyWrapper
Lnet/minecraft/registry/Registry;getReadOnlyWrapper()Lnet/minecraft/registry/RegistryWrapper$Impl;
intermediary method_46771
Lnet/minecraft/class_2378;method_46771()Lnet/minecraft/class_7225$class_7226;
official q
Ljz;q()Ljo$b;
-