Package net.minecraft.util.registry
Class DynamicRegistries
- java.lang.Object
-
- net.minecraft.util.registry.DynamicRegistries
-
- Direct Known Subclasses:
DynamicRegistries.Impl
public abstract class DynamicRegistries extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
DynamicRegistries.CodecHolder<E>
static class
DynamicRegistries.Impl
-
Field Summary
Fields Modifier and Type Field Description private static DynamicRegistries.Impl
BUILTIN
private static org.apache.logging.log4j.Logger
LOGGER
private static java.util.Map<RegistryKey<? extends Registry<?>>,DynamicRegistries.CodecHolder<?>>
REGISTRIES
-
Constructor Summary
Constructors Constructor Description DynamicRegistries()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private static <E> void
addBuiltinElements(DynamicRegistries.Impl p_243607_0_, WorldSettingsImport.IResourceAccess.RegistryAccess p_243607_1_, DynamicRegistries.CodecHolder<E> p_243607_2_)
static DynamicRegistries.Impl
builtin()
private static <E> void
copy(DynamicRegistries.Impl p_243606_0_, Registry<E> p_243606_1_)
private static <R extends Registry<?>>
voidcopyBuiltin(DynamicRegistries.Impl p_243609_0_, RegistryKey<R> p_243609_1_)
Registry<DimensionType>
dimensionTypes()
static void
load(DynamicRegistries.Impl p_243608_0_, WorldSettingsImport<?> p_243608_1_)
private static <E> void
put(com.google.common.collect.ImmutableMap.Builder<RegistryKey<? extends Registry<?>>,DynamicRegistries.CodecHolder<?>> p_243601_0_, RegistryKey<? extends Registry<E>> p_243601_1_, com.mojang.serialization.Codec<E> p_243601_2_)
private static <E> void
put(com.google.common.collect.ImmutableMap.Builder<RegistryKey<? extends Registry<?>>,DynamicRegistries.CodecHolder<?>> p_243602_0_, RegistryKey<? extends Registry<E>> p_243602_1_, com.mojang.serialization.Codec<E> p_243602_2_, com.mojang.serialization.Codec<E> p_243602_3_)
private static <E> void
readRegistry(WorldSettingsImport<?> p_243610_0_, DynamicRegistries.Impl p_243610_1_, DynamicRegistries.CodecHolder<E> p_243610_2_)
abstract <E> java.util.Optional<MutableRegistry<E>>
registry(RegistryKey<? extends Registry<E>> p_230521_1_)
<E> MutableRegistry<E>
registryOrThrow(RegistryKey<? extends Registry<E>> p_243612_1_)
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
REGISTRIES
private static final java.util.Map<RegistryKey<? extends Registry<?>>,DynamicRegistries.CodecHolder<?>> REGISTRIES
-
BUILTIN
private static final DynamicRegistries.Impl BUILTIN
-
-
Method Detail
-
registry
public abstract <E> java.util.Optional<MutableRegistry<E>> registry(RegistryKey<? extends Registry<E>> p_230521_1_)
-
registryOrThrow
public <E> MutableRegistry<E> registryOrThrow(RegistryKey<? extends Registry<E>> p_243612_1_)
-
dimensionTypes
public Registry<DimensionType> dimensionTypes()
-
put
private static <E> void put(com.google.common.collect.ImmutableMap.Builder<RegistryKey<? extends Registry<?>>,DynamicRegistries.CodecHolder<?>> p_243601_0_, RegistryKey<? extends Registry<E>> p_243601_1_, com.mojang.serialization.Codec<E> p_243601_2_)
-
put
private static <E> void put(com.google.common.collect.ImmutableMap.Builder<RegistryKey<? extends Registry<?>>,DynamicRegistries.CodecHolder<?>> p_243602_0_, RegistryKey<? extends Registry<E>> p_243602_1_, com.mojang.serialization.Codec<E> p_243602_2_, com.mojang.serialization.Codec<E> p_243602_3_)
-
builtin
public static DynamicRegistries.Impl builtin()
-
addBuiltinElements
private static <E> void addBuiltinElements(DynamicRegistries.Impl p_243607_0_, WorldSettingsImport.IResourceAccess.RegistryAccess p_243607_1_, DynamicRegistries.CodecHolder<E> p_243607_2_)
-
copyBuiltin
private static <R extends Registry<?>> void copyBuiltin(DynamicRegistries.Impl p_243609_0_, RegistryKey<R> p_243609_1_)
-
copy
private static <E> void copy(DynamicRegistries.Impl p_243606_0_, Registry<E> p_243606_1_)
-
load
public static void load(DynamicRegistries.Impl p_243608_0_, WorldSettingsImport<?> p_243608_1_)
-
readRegistry
private static <E> void readRegistry(WorldSettingsImport<?> p_243610_0_, DynamicRegistries.Impl p_243610_1_, DynamicRegistries.CodecHolder<E> p_243610_2_)
-
-