Package net.minecraft.registry
Interface MutableRegistry<T>
- All Superinterfaces:
IndexedIterable<T>,Iterable<T>,com.mojang.serialization.Keyable,Registry<T>
- All Known Implementing Classes:
SimpleDefaultedRegistry,SimpleRegistry
A registry that allows adding or modifying values.
Note that in vanilla, all registries are instances of this.
- See Also:
- Mappings:
Namespace Name official iaintermediary net/minecraft/class_2385named net/minecraft/registry/MutableRegistry
-
Field Summary
Fields inherited from interface net.minecraft.util.collection.IndexedIterable
ABSENT_RAW_ID -
Method Summary
Modifier and TypeMethodDescriptionadd(RegistryKey<T> key, T entry, com.mojang.serialization.Lifecycle lifecycle) booleanisEmpty()Returns whether the registry is empty.set(int rawId, RegistryKey<T> key, T value, com.mojang.serialization.Lifecycle lifecycle) Methods inherited from interface net.minecraft.util.collection.IndexedIterable
get, getOrThrow, sizeMethods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface net.minecraft.registry.Registry
clearTags, contains, containsId, createEntry, createEntryCodec, entryOf, freeze, get, get, getCodec, getEntry, getEntry, getEntry, getEntryLifecycle, getEntryList, getEntryOwner, getEntrySet, getId, getIds, getIndexedEntries, getKey, getKey, getKeys, getLifecycle, getOrCreateEntryList, getOrEmpty, getOrEmpty, getOrThrow, getRandom, getRawId, getReadOnlyWrapper, getTagCreatingWrapper, iterateEntries, keys, populateTags, stream, streamEntries, streamTags, streamTagsAndEntries
-
Method Details
-
set
RegistryEntry<T> set(int rawId, RegistryKey<T> key, T value, com.mojang.serialization.Lifecycle lifecycle) - Mappings:
Namespace Name Mixin selector official bLia;b(ILacp;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Lhe;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/registry/MutableRegistry;set(ILnet/minecraft/registry/RegistryKey;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Lnet/minecraft/registry/entry/RegistryEntry;
-
add
RegistryEntry.Reference<T> add(RegistryKey<T> key, T entry, com.mojang.serialization.Lifecycle lifecycle) - Mappings:
Namespace Name Mixin selector official aLia;a(Lacp;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Lhe$c;intermediary method_10272Lnet/minecraft/class_2385;method_10272(Lnet/minecraft/class_5321;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Lnet/minecraft/class_6880$class_6883;named addLnet/minecraft/registry/MutableRegistry;add(Lnet/minecraft/registry/RegistryKey;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Lnet/minecraft/registry/entry/RegistryEntry$Reference;
-
isEmpty
boolean isEmpty()Returns whether the registry is empty.- Returns:
- whether the registry is empty
- Mappings:
Namespace Name Mixin selector official kLia;k()Zintermediary method_35863Lnet/minecraft/class_2385;method_35863()Znamed isEmptyLnet/minecraft/registry/MutableRegistry;isEmpty()Z
-
createMutableEntryLookup
RegistryEntryLookup<T> createMutableEntryLookup()- Mappings:
Namespace Name Mixin selector official nLia;n()Lhf;intermediary method_46769Lnet/minecraft/class_2385;method_46769()Lnet/minecraft/class_7871;named createMutableEntryLookupLnet/minecraft/registry/MutableRegistry;createMutableEntryLookup()Lnet/minecraft/registry/RegistryEntryLookup;
-