Package net.minecraft.util.registry
Class SimpleRegistry<T>
java.lang.Object
net.minecraft.util.registry.Registry<T>
net.minecraft.util.registry.MutableRegistry<T>
net.minecraft.util.registry.SimpleRegistry<T>
- All Implemented Interfaces:
com.mojang.serialization.Keyable,Iterable<T>,IndexedIterable<T>
- Direct Known Subclasses:
DefaultedRegistry
An implementation of a mutable registry. All vanilla registries use this (or its
subclass,
DefaultedRegistry).- See Also:
- Mappings:
Namespace Name official hdintermediary net/minecraft/class_2370named net/minecraft/util/registry/SimpleRegistry
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate @Nullable List<RegistryEntry.Reference<T>>private final Object2IntMap<T>private static final Loggerprivate booleanprivate final Map<Identifier,RegistryEntry.Reference<T>> private @Nullable Map<T,RegistryEntry.Reference<T>> private final Map<RegistryKey<T>,RegistryEntry.Reference<T>> private com.mojang.serialization.Lifecycleprivate intprivate final ObjectList<RegistryEntry.Reference<T>>private Map<TagKey<T>,RegistryEntryList.Named<T>> private final Map<T,RegistryEntry.Reference<T>> Fields inherited from class net.minecraft.util.registry.Registry
ACTIVITY, ACTIVITY_KEY, ATTRIBUTE, ATTRIBUTE_KEY, BANNER_PATTERN, BANNER_PATTERN_KEY, BIOME_KEY, BIOME_SOURCE, BIOME_SOURCE_KEY, BLOCK, BLOCK_ENTITY_TYPE, BLOCK_ENTITY_TYPE_KEY, BLOCK_KEY, BLOCK_PREDICATE_TYPE, BLOCK_PREDICATE_TYPE_KEY, BLOCK_STATE_PROVIDER_TYPE, BLOCK_STATE_PROVIDER_TYPE_KEY, CARVER, CARVER_KEY, CAT_VARIANT, CAT_VARIANT_KEY, CHUNK_GENERATOR, CHUNK_GENERATOR_KEY, CHUNK_GENERATOR_SETTINGS_KEY, CHUNK_STATUS, CHUNK_STATUS_KEY, COMMAND_ARGUMENT_TYPE, COMMAND_ARGUMENT_TYPE_KEY, CONFIGURED_CARVER_KEY, CONFIGURED_FEATURE_KEY, CUSTOM_STAT, CUSTOM_STAT_KEY, DENSITY_FUNCTION_KEY, DENSITY_FUNCTION_TYPE, DENSITY_FUNCTION_TYPE_KEY, DIMENSION_KEY, DIMENSION_TYPE_KEY, ENCHANTMENT, ENCHANTMENT_KEY, ENTITY_TYPE, ENTITY_TYPE_KEY, FEATURE, FEATURE_KEY, FEATURE_SIZE_TYPE, FEATURE_SIZE_TYPE_KEY, FLAT_LEVEL_GENERATOR_PRESET_KEY, FLOAT_PROVIDER_TYPE, FLOAT_PROVIDER_TYPE_KEY, FLUID, FLUID_KEY, FOLIAGE_PLACER_TYPE, FOLIAGE_PLACER_TYPE_KEY, FROG_VARIANT, FROG_VARIANT_KEY, GAME_EVENT, GAME_EVENT_KEY, HEIGHT_PROVIDER_TYPE, HEIGHT_PROVIDER_TYPE_KEY, INSTRUMENT, INSTRUMENT_KEY, INT_PROVIDER_TYPE, INT_PROVIDER_TYPE_KEY, ITEM, ITEM_KEY, LOOT_CONDITION_TYPE, LOOT_CONDITION_TYPE_KEY, LOOT_FUNCTION_TYPE, LOOT_FUNCTION_TYPE_KEY, LOOT_NBT_PROVIDER_TYPE, LOOT_NBT_PROVIDER_TYPE_KEY, LOOT_NUMBER_PROVIDER_TYPE, LOOT_NUMBER_PROVIDER_TYPE_KEY, LOOT_POOL_ENTRY_TYPE, LOOT_POOL_ENTRY_TYPE_KEY, LOOT_SCORE_PROVIDER_TYPE, LOOT_SCORE_PROVIDER_TYPE_KEY, MATERIAL_CONDITION, MATERIAL_CONDITION_KEY, MATERIAL_RULE, MATERIAL_RULE_KEY, MEMORY_MODULE_TYPE, MEMORY_MODULE_TYPE_KEY, MENU_KEY, MESSAGE_TYPE_KEY, MOB_EFFECT_KEY, NOISE_KEY, PAINTING_VARIANT, PAINTING_VARIANT_KEY, PARTICLE_TYPE, PARTICLE_TYPE_KEY, PLACED_FEATURE_KEY, PLACEMENT_MODIFIER_TYPE, PLACEMENT_MODIFIER_TYPE_KEY, POINT_OF_INTEREST_TYPE, POINT_OF_INTEREST_TYPE_KEY, POS_RULE_TEST, POS_RULE_TEST_KEY, POSITION_SOURCE_TYPE, POSITION_SOURCE_TYPE_KEY, POTION, POTION_KEY, RECIPE_SERIALIZER, RECIPE_SERIALIZER_KEY, RECIPE_TYPE, RECIPE_TYPE_KEY, REGISTRIES, ROOT, ROOT_KEY, ROOT_PLACER_TYPE, ROOT_PLACER_TYPE_KEY, RULE_TEST, RULE_TEST_KEY, SCHEDULE, SCHEDULE_KEY, SCREEN_HANDLER, SENSOR_TYPE, SENSOR_TYPE_KEY, SOUND_EVENT, SOUND_EVENT_KEY, STAT_TYPE, STAT_TYPE_KEY, STATUS_EFFECT, STRUCTURE_KEY, STRUCTURE_PIECE, STRUCTURE_PIECE_KEY, STRUCTURE_PLACEMENT, STRUCTURE_PLACEMENT_KEY, STRUCTURE_POOL_ELEMENT, STRUCTURE_POOL_ELEMENT_KEY, STRUCTURE_POOL_KEY, STRUCTURE_PROCESSOR, STRUCTURE_PROCESSOR_KEY, STRUCTURE_PROCESSOR_LIST_KEY, STRUCTURE_SET_KEY, STRUCTURE_TYPE, STRUCTURE_TYPE_KEY, TREE_DECORATOR_TYPE, TREE_DECORATOR_TYPE_KEY, TRUNK_PLACER_TYPE, TRUNK_PLACER_TYPE_KEY, VILLAGER_PROFESSION, VILLAGER_PROFESSION_KEY, VILLAGER_TYPE, VILLAGER_TYPE_KEY, WORLD_KEY, WORLD_PRESET_KEYFields inherited from interface net.minecraft.util.collection.IndexedIterable
ABSENT_RAW_ID -
Constructor Summary
ConstructorsConstructorDescriptionSimpleRegistry(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 entry, com.mojang.serialization.Lifecycle lifecycle) private voidprivate voidassertNotFrozen(RegistryKey<T> key) voidbooleancontains(RegistryKey<T> key) Returns whetherkeyis registered in this registry.booleancontainsId(Identifier id) Returns whetheridis registered in this registry.booleancontainsTag(TagKey<T> tag) Returns whethertagis known to this registry.createEntry(T value) private RegistryEntryList.Named<T>createNamedEntryList(TagKey<T> tag) freeze()get(int index) get(@Nullable Identifier id) Returns the value that is assignedid, ornullif there is none.get(@Nullable RegistryKey<T> key) Returns the value that is assignedkey, ornullif there is none.private List<RegistryEntry.Reference<T>>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.com.mojang.serialization.LifecyclegetEntryLifecycle(T entry) Gets the lifecycle of a registry entry.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.Entryof the registry keys and values registered in this registry.Returns the ID assigned tovalue, ornullif it is not registered.getIds()Returns the set of all IDs registered in a 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.LifecyclegetOrCreateEntry(RegistryKey<T> key) com.mojang.serialization.DataResult<RegistryEntry.Reference<T>>getOrCreateEntryList(TagKey<T> tag) Returns a random registry entry from this registry, or an empty optional if the registry is empty.intprivate static <T> TgetValue(RegistryEntry.Reference<T> entry) booleanisEmpty()Returns whether the registry is empty.iterator()voidpopulateTags(Map<TagKey<T>, List<RegistryEntry<T>>> tagEntries) set(int rawId, RegistryKey<T> key, T value, com.mojang.serialization.Lifecycle lifecycle) intsize()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>>> Methods inherited from class net.minecraft.util.registry.Registry
createDimensionOptionsKey, createEntryCodec, createWorldKey, entryOf, freezeRegistries, getCodec, getIndexedEntries, getKey, getOrEmpty, getOrEmpty, getOrThrow, iterateEntries, keys, register, register, register, register, stream, toString, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.util.collection.IndexedIterable
getOrThrowMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
field_36635
- Mappings:
Namespace Name Mixin selector official bRLhd;bR:Lorg/slf4j/Logger;intermediary field_36635Lnet/minecraft/class_2370;field_36635:Lorg/slf4j/Logger;named field_36635Lnet/minecraft/util/registry/SimpleRegistry;field_36635:Lorg/slf4j/Logger;
-
rawIdToEntry
- Mappings:
Namespace Name Mixin selector official bSLhd;bS:Lit/unimi/dsi/fastutil/objects/ObjectList;intermediary field_26682Lnet/minecraft/class_2370;field_26682:Lit/unimi/dsi/fastutil/objects/ObjectList;named rawIdToEntryLnet/minecraft/util/registry/SimpleRegistry;rawIdToEntry:Lit/unimi/dsi/fastutil/objects/ObjectList;
-
entryToRawId
- Mappings:
Namespace Name Mixin selector official bTLhd;bT:Lit/unimi/dsi/fastutil/objects/Object2IntMap;intermediary field_26683Lnet/minecraft/class_2370;field_26683:Lit/unimi/dsi/fastutil/objects/Object2IntMap;named entryToRawIdLnet/minecraft/util/registry/SimpleRegistry;entryToRawId:Lit/unimi/dsi/fastutil/objects/Object2IntMap;
-
idToEntry
- Mappings:
Namespace Name Mixin selector official bULhd;bU:Ljava/util/Map;intermediary field_11107Lnet/minecraft/class_2370;field_11107:Ljava/util/Map;named idToEntryLnet/minecraft/util/registry/SimpleRegistry;idToEntry:Ljava/util/Map;
-
keyToEntry
- Mappings:
Namespace Name Mixin selector official bVLhd;bV:Ljava/util/Map;intermediary field_25067Lnet/minecraft/class_2370;field_25067:Ljava/util/Map;named keyToEntryLnet/minecraft/util/registry/SimpleRegistry;keyToEntry:Ljava/util/Map;
-
valueToEntry
- Mappings:
Namespace Name Mixin selector official bWLhd;bW:Ljava/util/Map;intermediary field_36461Lnet/minecraft/class_2370;field_36461:Ljava/util/Map;named valueToEntryLnet/minecraft/util/registry/SimpleRegistry;valueToEntry:Ljava/util/Map;
-
entryToLifecycle
- Mappings:
Namespace Name Mixin selector official bXLhd;bX:Ljava/util/Map;intermediary field_26731Lnet/minecraft/class_2370;field_26731:Ljava/util/Map;named entryToLifecycleLnet/minecraft/util/registry/SimpleRegistry;entryToLifecycle:Ljava/util/Map;
-
lifecycle
private com.mojang.serialization.Lifecycle lifecycle- Mappings:
Namespace Name Mixin selector official bYLhd;bY:Lcom/mojang/serialization/Lifecycle;intermediary field_26732Lnet/minecraft/class_2370;field_26732:Lcom/mojang/serialization/Lifecycle;named lifecycleLnet/minecraft/util/registry/SimpleRegistry;lifecycle:Lcom/mojang/serialization/Lifecycle;
-
tagToEntryList
- Mappings:
Namespace Name Mixin selector official bZLhd;bZ:Ljava/util/Map;intermediary field_36462Lnet/minecraft/class_2370;field_36462:Ljava/util/Map;named tagToEntryListLnet/minecraft/util/registry/SimpleRegistry;tagToEntryList:Ljava/util/Map;
-
frozen
private boolean frozen- Mappings:
Namespace Name Mixin selector official caLhd;ca:Zintermediary field_36463Lnet/minecraft/class_2370;field_36463:Znamed frozenLnet/minecraft/util/registry/SimpleRegistry;frozen:Z
-
intrusiveValueToEntry
- Mappings:
Namespace Name Mixin selector official cbLhd;cb:Ljava/util/Map;intermediary field_40584Lnet/minecraft/class_2370;field_40584:Ljava/util/Map;named intrusiveValueToEntryLnet/minecraft/util/registry/SimpleRegistry;intrusiveValueToEntry:Ljava/util/Map;
-
cachedEntries
- Mappings:
Namespace Name Mixin selector official ccLhd;cc:Ljava/util/List;intermediary field_36634Lnet/minecraft/class_2370;field_36634:Ljava/util/List;named cachedEntriesLnet/minecraft/util/registry/SimpleRegistry;cachedEntries:Ljava/util/List;
-
nextId
private int nextId- Mappings:
Namespace Name Mixin selector official cdLhd;cd:Iintermediary field_11109Lnet/minecraft/class_2370;field_11109:Inamed nextIdLnet/minecraft/util/registry/SimpleRegistry;nextId:I
-
-
Constructor Details
-
SimpleRegistry
public SimpleRegistry(RegistryKey<? extends Registry<T>> key, com.mojang.serialization.Lifecycle lifecycle) - Mappings:
Namespace Name Mixin selector official <init>Lhi;<init>(Labs;Lcom/mojang/serialization/Lifecycle;)Vintermediary <init>Lnet/minecraft/class_2378;<init>(Lnet/minecraft/class_5321;Lcom/mojang/serialization/Lifecycle;)Vnamed <init>Lnet/minecraft/util/registry/Registry;<init>(Lnet/minecraft/util/registry/RegistryKey;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 official <init>Lhd;<init>(Labs;Lcom/mojang/serialization/Lifecycle;Z)Vintermediary <init>Lnet/minecraft/class_2370;<init>(Lnet/minecraft/class_5321;Lcom/mojang/serialization/Lifecycle;Z)Vnamed <init>Lnet/minecraft/util/registry/SimpleRegistry;<init>(Lnet/minecraft/util/registry/RegistryKey;Lcom/mojang/serialization/Lifecycle;Z)V
-
-
Method Details
-
getEntries
- Mappings:
Namespace Name Mixin selector official aLhd;a()Ljava/util/List;intermediary method_40561Lnet/minecraft/class_2370;method_40561()Ljava/util/List;named getEntriesLnet/minecraft/util/registry/SimpleRegistry;getEntries()Ljava/util/List;
-
assertNotFrozen
private void assertNotFrozen()- Mappings:
Namespace Name Mixin selector official sLhd;s()Vintermediary method_45939Lnet/minecraft/class_2370;method_45939()Vnamed assertNotFrozenLnet/minecraft/util/registry/SimpleRegistry;assertNotFrozen()V
-
assertNotFrozen
- Mappings:
Namespace Name Mixin selector official kLhd;k(Labs;)Vintermediary method_40274Lnet/minecraft/class_2370;method_40274(Lnet/minecraft/class_5321;)Vnamed assertNotFrozenLnet/minecraft/util/registry/SimpleRegistry;assertNotFrozen(Lnet/minecraft/util/registry/RegistryKey;)V
-
set
public RegistryEntry<T> set(int rawId, RegistryKey<T> key, T value, com.mojang.serialization.Lifecycle lifecycle) - Specified by:
setin classMutableRegistry<T>- Mappings:
Namespace Name Mixin selector official aLhq;a(ILabs;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Lgx;intermediary method_10273Lnet/minecraft/class_2385;method_10273(ILnet/minecraft/class_5321;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Lnet/minecraft/class_6880;named setLnet/minecraft/util/registry/MutableRegistry;set(ILnet/minecraft/util/registry/RegistryKey;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Lnet/minecraft/util/registry/RegistryEntry;
-
add
public RegistryEntry<T> add(RegistryKey<T> key, T entry, com.mojang.serialization.Lifecycle lifecycle) - Specified by:
addin classMutableRegistry<T>- Mappings:
Namespace Name Mixin selector official aLhq;a(Labs;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Lgx;intermediary method_10272Lnet/minecraft/class_2385;method_10272(Lnet/minecraft/class_5321;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Lnet/minecraft/class_6880;named addLnet/minecraft/util/registry/MutableRegistry;add(Lnet/minecraft/util/registry/RegistryKey;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Lnet/minecraft/util/registry/RegistryEntry;
-
getId
Returns the ID assigned tovalue, ornullif it is not registered.- Specified by:
getIdin classRegistry<T>- Returns:
- the ID assigned to
value, ornullif it is not registered - Mappings:
Namespace Name Mixin selector official bLhi;b(Ljava/lang/Object;)Labt;intermediary method_10221Lnet/minecraft/class_2378;method_10221(Ljava/lang/Object;)Lnet/minecraft/class_2960;named getIdLnet/minecraft/util/registry/Registry;getId(Ljava/lang/Object;)Lnet/minecraft/util/Identifier;
-
getKey
Returns the registry key ofvalue, or an empty optional if it is not registered.- Specified by:
getKeyin classRegistry<T>- Returns:
- the registry key of
value, or an empty optional if it is not registered - Mappings:
Namespace Name Mixin selector official cLhi;c(Ljava/lang/Object;)Ljava/util/Optional;intermediary method_29113Lnet/minecraft/class_2378;method_29113(Ljava/lang/Object;)Ljava/util/Optional;named getKeyLnet/minecraft/util/registry/Registry;getKey(Ljava/lang/Object;)Ljava/util/Optional;
-
getRawId
- Specified by:
getRawIdin interfaceIndexedIterable<T>- Specified by:
getRawIdin classRegistry<T>- Mappings:
Namespace Name Mixin selector official aLha;a(Ljava/lang/Object;)Iintermediary method_10206Lnet/minecraft/class_2359;method_10206(Ljava/lang/Object;)Inamed getRawIdLnet/minecraft/util/collection/IndexedIterable;getRawId(Ljava/lang/Object;)I
-
get
Returns the value that is assignedkey, ornullif there is none.- Specified by:
getin classRegistry<T>- Returns:
- the value that is assigned
key, ornullif there is none - Mappings:
Namespace Name Mixin selector official aLhi;a(Labs;)Ljava/lang/Object;intermediary method_29107Lnet/minecraft/class_2378;method_29107(Lnet/minecraft/class_5321;)Ljava/lang/Object;named getLnet/minecraft/util/registry/Registry;get(Lnet/minecraft/util/registry/RegistryKey;)Ljava/lang/Object;
-
get
- Mappings:
Namespace Name Mixin selector official aLha;a(I)Ljava/lang/Object;intermediary method_10200Lnet/minecraft/class_2359;method_10200(I)Ljava/lang/Object;named getLnet/minecraft/util/collection/IndexedIterable;get(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:
getEntryin classRegistry<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 official cLhi;c(I)Ljava/util/Optional;intermediary method_40265Lnet/minecraft/class_2378;method_40265(I)Ljava/util/Optional;named getEntryLnet/minecraft/util/registry/Registry;getEntry(I)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:
getEntryin classRegistry<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 official bLhi;b(Labs;)Ljava/util/Optional;intermediary method_40264Lnet/minecraft/class_2378;method_40264(Lnet/minecraft/class_5321;)Ljava/util/Optional;named getEntryLnet/minecraft/util/registry/Registry;getEntry(Lnet/minecraft/util/registry/RegistryKey;)Ljava/util/Optional;
-
getOrCreateEntry
- Specified by:
getOrCreateEntryin classRegistry<T>- Mappings:
Namespace Name Mixin selector official cLhi;c(Labs;)Lgx$c;intermediary method_44298Lnet/minecraft/class_2378;method_44298(Lnet/minecraft/class_5321;)Lnet/minecraft/class_6880$class_6883;named getOrCreateEntryLnet/minecraft/util/registry/Registry;getOrCreateEntry(Lnet/minecraft/util/registry/RegistryKey;)Lnet/minecraft/util/registry/RegistryEntry$Reference;
-
getOrCreateEntryDataResult
public com.mojang.serialization.DataResult<RegistryEntry.Reference<T>> getOrCreateEntryDataResult(RegistryKey<T> key) - Specified by:
getOrCreateEntryDataResultin classRegistry<T>- Mappings:
Namespace Name Mixin selector official dLhi;d(Labs;)Lcom/mojang/serialization/DataResult;intermediary method_40268Lnet/minecraft/class_2378;method_40268(Lnet/minecraft/class_5321;)Lcom/mojang/serialization/DataResult;named getOrCreateEntryDataResultLnet/minecraft/util/registry/Registry;getOrCreateEntryDataResult(Lnet/minecraft/util/registry/RegistryKey;)Lcom/mojang/serialization/DataResult;
-
size
public int size()- Mappings:
Namespace Name Mixin selector official bLha;b()Iintermediary method_10204Lnet/minecraft/class_2359;method_10204()Inamed sizeLnet/minecraft/util/collection/IndexedIterable;size()I
-
getEntryLifecycle
Gets the lifecycle of a registry entry.- Specified by:
getEntryLifecyclein classRegistry<T>- Mappings:
Namespace Name Mixin selector official dLhi;d(Ljava/lang/Object;)Lcom/mojang/serialization/Lifecycle;intermediary method_31139Lnet/minecraft/class_2378;method_31139(Ljava/lang/Object;)Lcom/mojang/serialization/Lifecycle;named getEntryLifecycleLnet/minecraft/util/registry/Registry;getEntryLifecycle(Ljava/lang/Object;)Lcom/mojang/serialization/Lifecycle;
-
getLifecycle
public com.mojang.serialization.Lifecycle getLifecycle()- Specified by:
getLifecyclein classRegistry<T>- Mappings:
Namespace Name Mixin selector official cLhi;c()Lcom/mojang/serialization/Lifecycle;intermediary method_31138Lnet/minecraft/class_2378;method_31138()Lcom/mojang/serialization/Lifecycle;named getLifecycleLnet/minecraft/util/registry/Registry;getLifecycle()Lcom/mojang/serialization/Lifecycle;
-
iterator
-
get
Returns the value that is assignedid, ornullif there is none.- Specified by:
getin classRegistry<T>- Returns:
- the value that is assigned
id, ornullif there is none - Mappings:
Namespace Name Mixin selector official aLhi;a(Labt;)Ljava/lang/Object;intermediary method_10223Lnet/minecraft/class_2378;method_10223(Lnet/minecraft/class_2960;)Ljava/lang/Object;named getLnet/minecraft/util/registry/Registry;get(Lnet/minecraft/util/Identifier;)Ljava/lang/Object;
-
getValue
- Mappings:
Namespace Name Mixin selector official aLhd;a(Lgx$c;)Ljava/lang/Object;intermediary method_40253Lnet/minecraft/class_2370;method_40253(Lnet/minecraft/class_6880$class_6883;)Ljava/lang/Object;named getValueLnet/minecraft/util/registry/SimpleRegistry;getValue(Lnet/minecraft/util/registry/RegistryEntry$Reference;)Ljava/lang/Object;
-
getIds
Returns the set of all IDs registered in a registry.- Specified by:
getIdsin classRegistry<T>- Returns:
- the set of all IDs registered in a registry
- Mappings:
Namespace Name Mixin selector official dLhi;d()Ljava/util/Set;intermediary method_10235Lnet/minecraft/class_2378;method_10235()Ljava/util/Set;named getIdsLnet/minecraft/util/registry/Registry;getIds()Ljava/util/Set;
-
getKeys
Returns the set of all registry keys registered in a registry.- Specified by:
getKeysin classRegistry<T>- Returns:
- the set of all registry keys registered in a registry
- Mappings:
Namespace Name Mixin selector official eLhi;e()Ljava/util/Set;intermediary method_42021Lnet/minecraft/class_2378;method_42021()Ljava/util/Set;named getKeysLnet/minecraft/util/registry/Registry;getKeys()Ljava/util/Set;
-
getEntrySet
Returns the set containingMap.Entryof the registry keys and values registered in this registry.- Specified by:
getEntrySetin classRegistry<T>- Returns:
- the set containing
Map.Entryof the registry keys and values registered in this registry - Mappings:
Namespace Name Mixin selector official fLhi;f()Ljava/util/Set;intermediary method_29722Lnet/minecraft/class_2378;method_29722()Ljava/util/Set;named getEntrySetLnet/minecraft/util/registry/Registry;getEntrySet()Ljava/util/Set;
-
streamEntries
Returns a stream of reference registry entries of this registry.- Specified by:
streamEntriesin classRegistry<T>- Returns:
- a stream of reference registry entries of this registry
- Mappings:
Namespace Name Mixin selector official gLhi;g()Ljava/util/stream/Stream;intermediary method_40270Lnet/minecraft/class_2378;method_40270()Ljava/util/stream/Stream;named streamEntriesLnet/minecraft/util/registry/Registry;streamEntries()Ljava/util/stream/Stream;
-
containsTag
Returns whethertagis known to this registry.- Specified by:
containsTagin classRegistry<T>- Returns:
- whether
tagis known to this registry - Mappings:
Namespace Name Mixin selector official aLhi;a(Lame;)Zintermediary method_40252Lnet/minecraft/class_2378;method_40252(Lnet/minecraft/class_6862;)Znamed containsTagLnet/minecraft/util/registry/Registry;containsTag(Lnet/minecraft/tag/TagKey;)Z
-
streamTagsAndEntries
public Stream<com.mojang.datafixers.util.Pair<TagKey<T>,RegistryEntryList.Named<T>>> streamTagsAndEntries()- Specified by:
streamTagsAndEntriesin classRegistry<T>- Mappings:
Namespace Name Mixin selector official hLhi;h()Ljava/util/stream/Stream;intermediary method_40272Lnet/minecraft/class_2378;method_40272()Ljava/util/stream/Stream;named streamTagsAndEntriesLnet/minecraft/util/registry/Registry;streamTagsAndEntries()Ljava/util/stream/Stream;
-
getOrCreateEntryList
- Specified by:
getOrCreateEntryListin classRegistry<T>- Mappings:
Namespace Name Mixin selector official bLhi;b(Lame;)Lgz$c;intermediary method_40260Lnet/minecraft/class_2378;method_40260(Lnet/minecraft/class_6862;)Lnet/minecraft/class_6885$class_6888;named getOrCreateEntryListLnet/minecraft/util/registry/Registry;getOrCreateEntryList(Lnet/minecraft/tag/TagKey;)Lnet/minecraft/util/registry/RegistryEntryList$Named;
-
createNamedEntryList
- Mappings:
Namespace Name Mixin selector official eLhd;e(Lame;)Lgz$c;intermediary method_40562Lnet/minecraft/class_2370;method_40562(Lnet/minecraft/class_6862;)Lnet/minecraft/class_6885$class_6888;named createNamedEntryListLnet/minecraft/util/registry/SimpleRegistry;createNamedEntryList(Lnet/minecraft/tag/TagKey;)Lnet/minecraft/util/registry/RegistryEntryList$Named;
-
streamTags
Returns a stream of all tag keys known to this registry.- Specified by:
streamTagsin classRegistry<T>- Returns:
- a stream of all tag keys known to this registry
- Mappings:
Namespace Name Mixin selector official iLhi;i()Ljava/util/stream/Stream;intermediary method_40273Lnet/minecraft/class_2378;method_40273()Ljava/util/stream/Stream;named streamTagsLnet/minecraft/util/registry/Registry;streamTags()Ljava/util/stream/Stream;
-
isEmpty
public boolean isEmpty()Returns whether the registry is empty.- Specified by:
isEmptyin classMutableRegistry<T>- Returns:
- whether the registry is empty
- Mappings:
Namespace Name Mixin selector official jLhq;j()Zintermediary method_35863Lnet/minecraft/class_2385;method_35863()Znamed isEmptyLnet/minecraft/util/registry/MutableRegistry;isEmpty()Z
-
getRandom
Returns a random registry entry from this registry, or an empty optional if the registry is empty.- Specified by:
getRandomin classRegistry<T>- Returns:
- a random registry entry from this registry, or an empty optional if the registry is empty
- Mappings:
Namespace Name Mixin selector official aLhi;a(Lans;)Ljava/util/Optional;intermediary method_10240Lnet/minecraft/class_2378;method_10240(Lnet/minecraft/class_5819;)Ljava/util/Optional;named getRandomLnet/minecraft/util/registry/Registry;getRandom(Lnet/minecraft/util/math/random/Random;)Ljava/util/Optional;
-
containsId
Returns whetheridis registered in this registry.- Specified by:
containsIdin classRegistry<T>- Returns:
- whether
idis registered in this registry - Mappings:
Namespace Name Mixin selector official cLhi;c(Labt;)Zintermediary method_10250Lnet/minecraft/class_2378;method_10250(Lnet/minecraft/class_2960;)Znamed containsIdLnet/minecraft/util/registry/Registry;containsId(Lnet/minecraft/util/Identifier;)Z
-
contains
Returns whetherkeyis registered in this registry.- Specified by:
containsin classRegistry<T>- Returns:
- whether
keyis registered in this registry - Mappings:
Namespace Name Mixin selector official eLhi;e(Labs;)Zintermediary method_35842Lnet/minecraft/class_2378;method_35842(Lnet/minecraft/class_5321;)Znamed containsLnet/minecraft/util/registry/Registry;contains(Lnet/minecraft/util/registry/RegistryKey;)Z
-
freeze
-
createEntry
- Specified by:
createEntryin classRegistry<T>- Mappings:
Namespace Name Mixin selector official eLhi;e(Ljava/lang/Object;)Lgx$c;intermediary method_40269Lnet/minecraft/class_2378;method_40269(Ljava/lang/Object;)Lnet/minecraft/class_6880$class_6883;named createEntryLnet/minecraft/util/registry/Registry;createEntry(Ljava/lang/Object;)Lnet/minecraft/util/registry/RegistryEntry$Reference;
-
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:
getEntryListin classRegistry<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 official cLhi;c(Lame;)Ljava/util/Optional;intermediary method_40266Lnet/minecraft/class_2378;method_40266(Lnet/minecraft/class_6862;)Ljava/util/Optional;named getEntryListLnet/minecraft/util/registry/Registry;getEntryList(Lnet/minecraft/tag/TagKey;)Ljava/util/Optional;
-
populateTags
- Specified by:
populateTagsin classRegistry<T>- Mappings:
Namespace Name Mixin selector official aLhi;a(Ljava/util/Map;)Vintermediary method_40257Lnet/minecraft/class_2378;method_40257(Ljava/util/Map;)Vnamed populateTagsLnet/minecraft/util/registry/Registry;populateTags(Ljava/util/Map;)V
-
clearTags
public void clearTags()
-