Class DataMapLoader
java.lang.Object
net.neoforged.neoforge.registries.DataMapLoader
- All Implemented Interfaces:
PreparableReloadListener
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
PreparableReloadListener.PreparationBarrier -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ICondition.IContextprivate static final org.slf4j.Loggerstatic final Stringprivate final RegistryAccessprivate Map<ResourceKey<? extends Registry<?>>, DataMapLoader.LoadResult<?>> -
Constructor Summary
ConstructorsConstructorDescriptionDataMapLoader(ICondition.IContext conditionContext, RegistryAccess registryAccess) -
Method Summary
Modifier and TypeMethodDescriptionvoidapply()private <T> voidapply(BaseMappedRegistry<T> registry, DataMapLoader.LoadResult<T> result) private <T,R> Map <ResourceKey<R>, T> buildDataMap(Registry<R> registry, DataMapType<R, T> attachment, List<DataMapFile<T, R>> entries) static StringgetFolderLocation(ResourceLocation registryId) private CompletableFuture<Map<ResourceKey<? extends Registry<?>>, DataMapLoader.LoadResult<?>>> load(ResourceManager manager, Executor executor, ProfilerFiller profiler) private static Map<ResourceKey<? extends Registry<?>>, DataMapLoader.LoadResult<?>> load(ResourceManager manager, ProfilerFiller profiler, RegistryAccess access, ICondition.IContext context) private static <A,T> List <DataMapFile<A, T>> readData(RegistryOps<com.google.gson.JsonElement> ops, DataMapType<T, A> attachmentType, ResourceKey<Registry<T>> registryKey, List<Resource> resources) reload(PreparableReloadListener.PreparationBarrier preparationBarrier, ResourceManager resourceManager, ProfilerFiller preparationsProfiler, ProfilerFiller reloadProfiler, Executor backgroundExecutor, Executor gameExecutor) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
getName
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
PATH
- See Also:
-
results
-
conditionContext
-
registryAccess
-
-
Constructor Details
-
DataMapLoader
-
-
Method Details
-
reload
public CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier preparationBarrier, ResourceManager resourceManager, ProfilerFiller preparationsProfiler, ProfilerFiller reloadProfiler, Executor backgroundExecutor, Executor gameExecutor) - Specified by:
reloadin interfacePreparableReloadListener
-
apply
public void apply() -
apply
-
buildDataMap
private <T,R> Map<ResourceKey<R>,T> buildDataMap(Registry<R> registry, DataMapType<R, T> attachment, List<DataMapFile<T, R>> entries) -
load
private CompletableFuture<Map<ResourceKey<? extends Registry<?>>,DataMapLoader.LoadResult<?>>> load(ResourceManager manager, Executor executor, ProfilerFiller profiler) -
load
private static Map<ResourceKey<? extends Registry<?>>,DataMapLoader.LoadResult<?>> load(ResourceManager manager, ProfilerFiller profiler, RegistryAccess access, ICondition.IContext context) -
getFolderLocation
-
readData
private static <A,T> List<DataMapFile<A,T>> readData(RegistryOps<com.google.gson.JsonElement> ops, DataMapType<T, A> attachmentType, ResourceKey<Registry<T>> registryKey, List<Resource> resources)
-