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 RegistryAccess.Frozen
load
(Map<ResourceKey<? extends Registry<?>>, List<RegistrySynchronization.PackedRegistryEntry>> p_321642_, ResourceProvider p_326068_, RegistryAccess p_321850_, List<RegistryDataLoader.RegistryData<?>> p_321716_) static RegistryAccess.Frozen
load
(RegistryDataLoader.LoadingFunction p_321713_, RegistryAccess p_321583_, List<RegistryDataLoader.RegistryData<?>> p_321856_) static RegistryAccess.Frozen
load
(ResourceManager p_252046_, RegistryAccess p_249916_, List<RegistryDataLoader.RegistryData<?>> p_250344_) (package private) static <E> void
loadContentsFromManager
(ResourceManager p_321535_, RegistryOps.RegistryInfoLookup p_321612_, WritableRegistry<E> p_321557_, com.mojang.serialization.Decoder<E> p_321820_, Map<ResourceKey<?>, Exception> p_321649_) (package private) static <E> void
loadContentsFromNetwork
(Map<ResourceKey<? extends Registry<?>>, List<RegistrySynchronization.PackedRegistryEntry>> p_321633_, ResourceProvider p_326020_, RegistryOps.RegistryInfoLookup p_321801_, WritableRegistry<E> p_321671_, com.mojang.serialization.Decoder<E> p_321718_, Map<ResourceKey<?>, Exception> p_321625_) private static <E> void
loadElementFromResource
(WritableRegistry<E> p_326195_, com.mojang.serialization.Decoder<E> p_326476_, RegistryOps<com.google.gson.JsonElement> p_325932_, ResourceKey<E> p_326054_, Resource p_326141_, RegistrationInfo p_326033_) private static void
logErrors
(Map<ResourceKey<?>, Exception> p_252325_) private static String
registryDirPath
(ResourceLocation p_252033_)
-
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 p_252046_, RegistryAccess p_249916_, List<RegistryDataLoader.RegistryData<?>> p_250344_) -
load
public static RegistryAccess.Frozen load(Map<ResourceKey<? extends Registry<?>>, List<RegistrySynchronization.PackedRegistryEntry>> p_321642_, ResourceProvider p_326068_, RegistryAccess p_321850_, List<RegistryDataLoader.RegistryData<?>> p_321716_) -
load
public static RegistryAccess.Frozen load(RegistryDataLoader.LoadingFunction p_321713_, RegistryAccess p_321583_, List<RegistryDataLoader.RegistryData<?>> p_321856_) -
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
-
registryDirPath
-
loadElementFromResource
private static <E> void loadElementFromResource(WritableRegistry<E> p_326195_, com.mojang.serialization.Decoder<E> p_326476_, RegistryOps<com.google.gson.JsonElement> p_325932_, ResourceKey<E> p_326054_, Resource p_326141_, RegistrationInfo p_326033_) throws IOException - Throws:
IOException
-
loadContentsFromManager
static <E> void loadContentsFromManager(ResourceManager p_321535_, RegistryOps.RegistryInfoLookup p_321612_, WritableRegistry<E> p_321557_, com.mojang.serialization.Decoder<E> p_321820_, Map<ResourceKey<?>, Exception> p_321649_) -
loadContentsFromNetwork
static <E> void loadContentsFromNetwork(Map<ResourceKey<? extends Registry<?>>, List<RegistrySynchronization.PackedRegistryEntry>> p_321633_, ResourceProvider p_326020_, RegistryOps.RegistryInfoLookup p_321801_, WritableRegistry<E> p_321671_, com.mojang.serialization.Decoder<E> p_321718_, Map<ResourceKey<?>, Exception> p_321625_)
-