Package net.minecraft.resources
Class RegistryDataLoader
java.lang.Object
net.minecraft.resources.RegistryDataLoader
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final record
(package private) static interface
static final record
-
Field Summary
FieldsModifier 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static RegistryOps.RegistryInfoLookup
createContext
(RegistryAccess registryAccess, List<RegistryDataLoader.Loader<?>> registryLoaders) private static <T> RegistryOps.RegistryInfo
<T> createInfoForContextRegistry
(Registry<T> registry) private static <T> RegistryOps.RegistryInfo
<T> createInfoForNewRegistry
(WritableRegistry<T> registry) static RegistryAccess.Frozen
load
(Map<ResourceKey<? extends Registry<?>>, List<RegistrySynchronization.PackedRegistryEntry>> elements, ResourceProvider resourceProvider, RegistryAccess registryAccess, List<RegistryDataLoader.RegistryData<?>> registryData) private static RegistryAccess.Frozen
load
(RegistryDataLoader.LoadingFunction loadingFunction, RegistryAccess registryAccess, List<RegistryDataLoader.RegistryData<?>> registryData) static RegistryAccess.Frozen
load
(ResourceManager resourceManager, RegistryAccess registryAccess, List<RegistryDataLoader.RegistryData<?>> registryData) (package private) static <E> void
loadContentsFromManager
(ResourceManager resourceManager, RegistryOps.RegistryInfoLookup registryInfoLookup, WritableRegistry<E> registry, com.mojang.serialization.Decoder<E> codec, Map<ResourceKey<?>, Exception> loadingErrors) (package private) static <E> void
loadContentsFromNetwork
(Map<ResourceKey<? extends Registry<?>>, List<RegistrySynchronization.PackedRegistryEntry>> elements, ResourceProvider resourceProvider, RegistryOps.RegistryInfoLookup registryInfoLookup, WritableRegistry<E> registry, com.mojang.serialization.Decoder<E> codec, Map<ResourceKey<?>, Exception> loadingErrors) private static <E> void
loadElementFromResource
(WritableRegistry<E> registry, com.mojang.serialization.Decoder<E> codec, RegistryOps<com.google.gson.JsonElement> ops, ResourceKey<E> resourceKey, Resource resource, RegistrationInfo registrationInfo) private static void
logErrors
(Map<ResourceKey<?>, Exception> errors)
-
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
-
load
public static RegistryAccess.Frozen load(ResourceManager resourceManager, RegistryAccess registryAccess, List<RegistryDataLoader.RegistryData<?>> registryData) -
load
public static RegistryAccess.Frozen load(Map<ResourceKey<? extends Registry<?>>, List<RegistrySynchronization.PackedRegistryEntry>> elements, ResourceProvider resourceProvider, RegistryAccess registryAccess, List<RegistryDataLoader.RegistryData<?>> registryData) -
load
private static RegistryAccess.Frozen load(RegistryDataLoader.LoadingFunction loadingFunction, RegistryAccess registryAccess, List<RegistryDataLoader.RegistryData<?>> registryData) -
createContext
private static RegistryOps.RegistryInfoLookup createContext(RegistryAccess registryAccess, List<RegistryDataLoader.Loader<?>> registryLoaders) -
createInfoForNewRegistry
private static <T> RegistryOps.RegistryInfo<T> createInfoForNewRegistry(WritableRegistry<T> registry) -
createInfoForContextRegistry
-
logErrors
-
loadElementFromResource
private static <E> void loadElementFromResource(WritableRegistry<E> registry, com.mojang.serialization.Decoder<E> codec, RegistryOps<com.google.gson.JsonElement> ops, ResourceKey<E> resourceKey, Resource resource, RegistrationInfo registrationInfo) throws IOException - Throws:
IOException
-
loadContentsFromManager
static <E> void loadContentsFromManager(ResourceManager resourceManager, RegistryOps.RegistryInfoLookup registryInfoLookup, WritableRegistry<E> registry, com.mojang.serialization.Decoder<E> codec, Map<ResourceKey<?>, Exception> loadingErrors) -
loadContentsFromNetwork
static <E> void loadContentsFromNetwork(Map<ResourceKey<? extends Registry<?>>, List<RegistrySynchronization.PackedRegistryEntry>> elements, ResourceProvider resourceProvider, RegistryOps.RegistryInfoLookup registryInfoLookup, WritableRegistry<E> registry, com.mojang.serialization.Decoder<E> codec, Map<ResourceKey<?>, Exception> loadingErrors)
-