Package net.minecraft.util.registry
Class MutableRegistry<T>
java.lang.Object
net.minecraft.util.registry.Registry<T>
net.minecraft.util.registry.MutableRegistry<T>
- All Implemented Interfaces:
com.mojang.serialization.Keyable
,Iterable<T>
,IndexedIterable<T>
- Direct Known Subclasses:
SimpleRegistry
- Mappings:
Namespace Name official hi
intermediary net/minecraft/class_2385
named net/minecraft/util/registry/MutableRegistry
-
Field Summary
Fields inherited from class net.minecraft.util.registry.Registry
ACTIVITY, ACTIVITY_KEY, ATTRIBUTE, ATTRIBUTE_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, CHUNK_GENERATOR, CHUNK_GENERATOR_KEY, CHUNK_GENERATOR_SETTINGS_KEY, CHUNK_STATUS, CHUNK_STATUS_KEY, CONFIGURED_CARVER_KEY, CONFIGURED_FEATURE_KEY, CONFIGURED_STRUCTURE_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, FLOAT_PROVIDER_TYPE, FLOAT_PROVIDER_TYPE_KEY, FLUID, FLUID_KEY, FOLIAGE_PLACER_TYPE, FOLIAGE_PLACER_TYPE_KEY, GAME_EVENT, GAME_EVENT_KEY, HEIGHT_PROVIDER_TYPE, HEIGHT_PROVIDER_TYPE_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, MOB_EFFECT_KEY, MOTIVE_KEY, NOISE_WORLDGEN, PAINTING_MOTIVE, 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, 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_FEATURE, STRUCTURE_FEATURE_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, 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
Fields inherited from interface net.minecraft.util.collection.IndexedIterable
ABSENT_RAW_ID
-
Constructor Summary
ConstructorDescriptionMutableRegistry
(RegistryKey<? extends Registry<T>> key, com.mojang.serialization.Lifecycle lifecycle) -
Method Summary
Modifier and TypeMethodDescriptionabstract RegistryEntry<T>
add
(RegistryKey<T> key, T entry, com.mojang.serialization.Lifecycle lifecycle) abstract boolean
isEmpty()
abstract RegistryEntry<T>
replace
(OptionalInt rawId, RegistryKey<T> key, T newEntry, com.mojang.serialization.Lifecycle lifecycle) If the given key is already present in the registry, replaces the entry associated with the given key with the new entry.abstract RegistryEntry<T>
set
(int rawId, RegistryKey<T> key, T value, com.mojang.serialization.Lifecycle lifecycle) Methods inherited from class net.minecraft.util.registry.Registry
clearTags, contains, containsId, containsTag, createEntry, createEntryCodec, entryOf, freeze, freezeRegistries, get, get, getCodec, getEntry, getEntry, getEntryLifecycle, getEntryList, getEntrySet, getId, getIds, getIndexedEntries, getKey, getKey, getLifecycle, getOrCreateEntry, getOrCreateEntryList, getOrEmpty, getOrEmpty, getOrThrow, getRandom, getRawId, iterateEntries, keys, method_39198, populateTags, register, register, register, register, stream, streamEntries, streamTags, streamTagsAndEntries, 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
get, getOrThrow, size
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Constructor Details
-
MutableRegistry
public MutableRegistry(RegistryKey<? extends Registry<T>> key, com.mojang.serialization.Lifecycle lifecycle) - Mappings:
Namespace Name Mixin selector official <init>
Lhb;<init>(Lys;Lcom/mojang/serialization/Lifecycle;)V
intermediary <init>
Lnet/minecraft/class_2378;<init>(Lnet/minecraft/class_5321;Lcom/mojang/serialization/Lifecycle;)V
named <init>
Lnet/minecraft/util/registry/Registry;<init>(Lnet/minecraft/util/registry/RegistryKey;Lcom/mojang/serialization/Lifecycle;)V
-
-
Method Details
-
set
public abstract RegistryEntry<T> set(int rawId, RegistryKey<T> key, T value, com.mojang.serialization.Lifecycle lifecycle) - Mappings:
Namespace Name Mixin selector official a
Lhi;a(ILys;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Lgs;
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;
-
add
public abstract RegistryEntry<T> add(RegistryKey<T> key, T entry, com.mojang.serialization.Lifecycle lifecycle) - Mappings:
Namespace Name Mixin selector official a
Lhi;a(Lys;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Lgs;
intermediary method_10272
Lnet/minecraft/class_2385;method_10272(Lnet/minecraft/class_5321;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Lnet/minecraft/class_6880;
named add
Lnet/minecraft/util/registry/MutableRegistry;add(Lnet/minecraft/util/registry/RegistryKey;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Lnet/minecraft/util/registry/RegistryEntry;
-
replace
public abstract RegistryEntry<T> replace(OptionalInt rawId, RegistryKey<T> key, T newEntry, com.mojang.serialization.Lifecycle lifecycle) If the given key is already present in the registry, replaces the entry associated with the given key with the new entry. This method asserts that the raw ID is equal to the value already in the registry. The raw ID not being present may lead to buggy behavior.If the given key is not already present in the registry, adds the entry to the registry. If
rawId
is present, then this method gives the entry this raw ID. Otherwise, uses the next available ID.- Mappings:
Namespace Name Mixin selector official a
Lhi;a(Ljava/util/OptionalInt;Lys;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Lgs;
intermediary method_31062
Lnet/minecraft/class_2385;method_31062(Ljava/util/OptionalInt;Lnet/minecraft/class_5321;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Lnet/minecraft/class_6880;
named replace
Lnet/minecraft/util/registry/MutableRegistry;replace(Ljava/util/OptionalInt;Lnet/minecraft/util/registry/RegistryKey;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Lnet/minecraft/util/registry/RegistryEntry;
-
isEmpty
public abstract boolean isEmpty()- Mappings:
Namespace Name Mixin selector official i
Lhi;i()Z
intermediary method_35863
Lnet/minecraft/class_2385;method_35863()Z
named isEmpty
Lnet/minecraft/util/registry/MutableRegistry;isEmpty()Z
-