Package net.minecraft.resources
Class RegistryDataLoader
java.lang.Object
net.minecraft.resources.RegistryDataLoader
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static final record
(package private) static interface
static final record
-
Field Summary
Modifier and TypeFieldDescriptionstatic final List
<RegistryDataLoader.RegistryData<?>> private static final org.slf4j.Logger
private static final RegistrationInfo
private static final Function
<Optional<KnownPack>, RegistrationInfo> static final List
<RegistryDataLoader.RegistryData<?>> static final List
<RegistryDataLoader.RegistryData<?>> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static RegistryOps.RegistryInfoLookup
createContext
(RegistryAccess p_256568_, List<RegistryDataLoader.Loader<?>> p_255821_) private static <T> RegistryOps.RegistryInfo
<T> createInfoForContextRegistry
(Registry<T> p_256230_) private static <T> RegistryOps.RegistryInfo
<T> createInfoForNewRegistry
(WritableRegistry<T> p_256020_) static Stream
<RegistryDataLoader.RegistryData<?>> static RegistryAccess.Frozen
load
(Map<ResourceKey<? extends Registry<?>>, List<RegistrySynchronization.PackedRegistryEntry>> p_328212_, ResourceProvider p_335625_, RegistryAccess p_334195_, List<RegistryDataLoader.RegistryData<?>> p_329346_) private static RegistryAccess.Frozen
load
(RegistryDataLoader.LoadingFunction p_332256_, RegistryAccess p_331736_, List<RegistryDataLoader.RegistryData<?>> p_333463_) static RegistryAccess.Frozen
load
(ResourceManager p_252046_, RegistryAccess p_249916_, List<RegistryDataLoader.RegistryData<?>> p_250344_) (package private) static <E> void
loadContentsFromManager
(ResourceManager p_335634_, RegistryOps.RegistryInfoLookup p_333035_, WritableRegistry<E> p_331358_, com.mojang.serialization.Decoder<E> p_329404_, Map<ResourceKey<?>, Exception> p_335074_) (package private) static <E> void
loadContentsFromNetwork
(Map<ResourceKey<? extends Registry<?>>, List<RegistrySynchronization.PackedRegistryEntry>> p_331925_, ResourceProvider p_332010_, RegistryOps.RegistryInfoLookup p_329253_, WritableRegistry<E> p_332518_, com.mojang.serialization.Decoder<E> p_328898_, Map<ResourceKey<?>, Exception> p_335768_) private static <E> void
loadElementFromResource
(WritableRegistry<E> p_330991_, com.mojang.serialization.Decoder<Optional<E>> p_333909_, RegistryOps<com.google.gson.JsonElement> p_332135_, ResourceKey<E> p_332850_, Resource p_335244_, RegistrationInfo p_332222_) private static void
logErrors
(Map<ResourceKey<?>, Exception> p_252325_)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
NETWORK_REGISTRATION_INFO
-
REGISTRATION_INFO_CACHE
-
WORLDGEN_REGISTRIES
-
DIMENSION_REGISTRIES
-
SYNCHRONIZED_REGISTRIES
-
-
Constructor Details
-
RegistryDataLoader
public RegistryDataLoader()
-
-
Method Details
-
getWorldGenAndDimensionStream
-
load
public static RegistryAccess.Frozen load(ResourceManager p_252046_, RegistryAccess p_249916_, List<RegistryDataLoader.RegistryData<?>> p_250344_) -
load
public static RegistryAccess.Frozen load(Map<ResourceKey<? extends Registry<?>>, List<RegistrySynchronization.PackedRegistryEntry>> p_328212_, ResourceProvider p_335625_, RegistryAccess p_334195_, List<RegistryDataLoader.RegistryData<?>> p_329346_) -
load
private static RegistryAccess.Frozen load(RegistryDataLoader.LoadingFunction p_332256_, RegistryAccess p_331736_, List<RegistryDataLoader.RegistryData<?>> p_333463_) -
createContext
private static RegistryOps.RegistryInfoLookup createContext(RegistryAccess p_256568_, List<RegistryDataLoader.Loader<?>> p_255821_) -
createInfoForNewRegistry
private static <T> RegistryOps.RegistryInfo<T> createInfoForNewRegistry(WritableRegistry<T> p_256020_) -
createInfoForContextRegistry
-
logErrors
-
loadElementFromResource
private static <E> void loadElementFromResource(WritableRegistry<E> p_330991_, com.mojang.serialization.Decoder<Optional<E>> p_333909_, RegistryOps<com.google.gson.JsonElement> p_332135_, ResourceKey<E> p_332850_, Resource p_335244_, RegistrationInfo p_332222_) throws IOException - Throws:
IOException
-
loadContentsFromManager
static <E> void loadContentsFromManager(ResourceManager p_335634_, RegistryOps.RegistryInfoLookup p_333035_, WritableRegistry<E> p_331358_, com.mojang.serialization.Decoder<E> p_329404_, Map<ResourceKey<?>, Exception> p_335074_) -
loadContentsFromNetwork
static <E> void loadContentsFromNetwork(Map<ResourceKey<? extends Registry<?>>, List<RegistrySynchronization.PackedRegistryEntry>> p_331925_, ResourceProvider p_332010_, RegistryOps.RegistryInfoLookup p_329253_, WritableRegistry<E> p_332518_, com.mojang.serialization.Decoder<E> p_328898_, Map<ResourceKey<?>, Exception> p_335768_)
-