Package net.minecraft.util.registry
Class DefaultedRegistry<T>
java.lang.Object
net.minecraft.util.registry.Registry<T>
net.minecraft.util.registry.MutableRegistry<T>
net.minecraft.util.registry.SimpleRegistry<T>
net.minecraft.util.registry.DefaultedRegistry<T>
- All Implemented Interfaces:
com.mojang.serialization.Keyable
,Iterable<T>
,IndexedIterable<T>
- Mappings:
Namespace Name official gx
intermediary net/minecraft/class_2348
named net/minecraft/util/registry/DefaultedRegistry
-
Field Summary
FieldsFields 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_KEY
Fields inherited from interface net.minecraft.util.collection.IndexedIterable
ABSENT_RAW_ID
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultedRegistry
(String defaultId, RegistryKey<? extends Registry<T>> key, com.mojang.serialization.Lifecycle lifecycle, @Nullable Function<T, RegistryEntry.Reference<T>> valueToEntryFunction) -
Method Summary
Modifier and TypeMethodDescriptionget
(int index) get
(@Nullable Identifier id) int
set
(int rawId, RegistryKey<T> key, T value, com.mojang.serialization.Lifecycle lifecycle) Methods inherited from class net.minecraft.util.registry.SimpleRegistry
add, clearTags, contains, containsId, containsTag, createEntry, freeze, get, getEntry, getEntry, getEntryLifecycle, getEntryList, getEntrySet, getIds, getKey, getKeys, getLifecycle, getOrCreateEntry, getOrCreateEntryDataResult, getOrCreateEntryList, isEmpty, iterator, populateTags, replace, size, streamEntries, streamTags, streamTagsAndEntries
Methods inherited from class net.minecraft.util.registry.Registry
createEntryCodec, entryOf, freezeRegistries, getCodec, getIndexedEntries, getKey, getOrEmpty, getOrThrow, iterateEntries, keys, method_39198, register, register, register, register, stream, toString, validate
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
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
defaultId
- Mappings:
Namespace Name Mixin selector official bR
Lgx;bR:Labb;
intermediary field_11014
Lnet/minecraft/class_2348;field_11014:Lnet/minecraft/class_2960;
named defaultId
Lnet/minecraft/util/registry/DefaultedRegistry;defaultId:Lnet/minecraft/util/Identifier;
-
defaultEntry
- Mappings:
Namespace Name Mixin selector official bS
Lgx;bS:Lhc;
intermediary field_11015
Lnet/minecraft/class_2348;field_11015:Lnet/minecraft/class_6880;
named defaultEntry
Lnet/minecraft/util/registry/DefaultedRegistry;defaultEntry:Lnet/minecraft/util/registry/RegistryEntry;
-
-
Constructor Details
-
DefaultedRegistry
public DefaultedRegistry(String defaultId, RegistryKey<? extends Registry<T>> key, com.mojang.serialization.Lifecycle lifecycle, @Nullable @Nullable Function<T, RegistryEntry.Reference<T>> valueToEntryFunction) - Mappings:
Namespace Name Mixin selector official <init>
Lgx;<init>(Ljava/lang/String;Laba;Lcom/mojang/serialization/Lifecycle;Ljava/util/function/Function;)V
intermediary <init>
Lnet/minecraft/class_2348;<init>(Ljava/lang/String;Lnet/minecraft/class_5321;Lcom/mojang/serialization/Lifecycle;Ljava/util/function/Function;)V
named <init>
Lnet/minecraft/util/registry/DefaultedRegistry;<init>(Ljava/lang/String;Lnet/minecraft/util/registry/RegistryKey;Lcom/mojang/serialization/Lifecycle;Ljava/util/function/Function;)V
-
-
Method Details
-
set
public RegistryEntry<T> set(int rawId, RegistryKey<T> key, T value, com.mojang.serialization.Lifecycle lifecycle) - Overrides:
set
in classSimpleRegistry<T>
- Mappings:
Namespace Name Mixin selector official a
Lht;a(ILaba;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Lhc;
intermediary method_10273
Lnet/minecraft/class_2385;method_10273(ILnet/minecraft/class_5321;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Lnet/minecraft/class_6880;
named set
Lnet/minecraft/util/registry/MutableRegistry;set(ILnet/minecraft/util/registry/RegistryKey;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Lnet/minecraft/util/registry/RegistryEntry;
-
getRawId
- Specified by:
getRawId
in interfaceIndexedIterable<T>
- Overrides:
getRawId
in classSimpleRegistry<T>
- Mappings:
Namespace Name Mixin selector official a
Lhf;a(Ljava/lang/Object;)I
intermediary method_10206
Lnet/minecraft/class_2359;method_10206(Ljava/lang/Object;)I
named getRawId
Lnet/minecraft/util/collection/IndexedIterable;getRawId(Ljava/lang/Object;)I
-
getId
- Overrides:
getId
in classSimpleRegistry<T>
- Mappings:
Namespace Name Mixin selector official b
Lhm;b(Ljava/lang/Object;)Labb;
intermediary method_10221
Lnet/minecraft/class_2378;method_10221(Ljava/lang/Object;)Lnet/minecraft/class_2960;
named getId
Lnet/minecraft/util/registry/Registry;getId(Ljava/lang/Object;)Lnet/minecraft/util/Identifier;
-
get
- Overrides:
get
in classSimpleRegistry<T>
- Mappings:
Namespace Name Mixin selector official a
Lhm;a(Labb;)Ljava/lang/Object;
intermediary method_10223
Lnet/minecraft/class_2378;method_10223(Lnet/minecraft/class_2960;)Ljava/lang/Object;
named get
Lnet/minecraft/util/registry/Registry;get(Lnet/minecraft/util/Identifier;)Ljava/lang/Object;
-
getOrEmpty
- Overrides:
getOrEmpty
in classRegistry<T>
- Mappings:
Namespace Name Mixin selector official b
Lhm;b(Labb;)Ljava/util/Optional;
intermediary method_17966
Lnet/minecraft/class_2378;method_17966(Lnet/minecraft/class_2960;)Ljava/util/Optional;
named getOrEmpty
Lnet/minecraft/util/registry/Registry;getOrEmpty(Lnet/minecraft/util/Identifier;)Ljava/util/Optional;
-
get
- Specified by:
get
in interfaceIndexedIterable<T>
- Overrides:
get
in classSimpleRegistry<T>
- Mappings:
Namespace Name Mixin selector official a
Lhf;a(I)Ljava/lang/Object;
intermediary method_10200
Lnet/minecraft/class_2359;method_10200(I)Ljava/lang/Object;
named get
Lnet/minecraft/util/collection/IndexedIterable;get(I)Ljava/lang/Object;
-
getRandom
- Overrides:
getRandom
in classSimpleRegistry<T>
- Mappings:
Namespace Name Mixin selector official a
Lhm;a(Lamn;)Ljava/util/Optional;
intermediary method_10240
Lnet/minecraft/class_2378;method_10240(Lnet/minecraft/class_5819;)Ljava/util/Optional;
named getRandom
Lnet/minecraft/util/registry/Registry;getRandom(Lnet/minecraft/util/math/random/Random;)Ljava/util/Optional;
-
getDefaultId
- Mappings:
Namespace Name Mixin selector official a
Lgx;a()Labb;
intermediary method_10137
Lnet/minecraft/class_2348;method_10137()Lnet/minecraft/class_2960;
named getDefaultId
Lnet/minecraft/util/registry/DefaultedRegistry;getDefaultId()Lnet/minecraft/util/Identifier;
-