Package foundry.veil.api.resource
Class VeilDynamicRegistry
java.lang.Object
foundry.veil.api.resource.VeilDynamicRegistry
Allows the creation of normal vanilla dynamic registries. They can be created client or server side depending on the use case.
- Since:
- 1.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordStored data about loaded dynamic registries. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanloadRegistries(net.minecraft.server.packs.resources.ResourceManager resourceManager, Collection<net.minecraft.resources.RegistryDataLoader.RegistryData<?>> registries, Executor executor) Loads the specified registries from the normal registry folder.static @Nullable StringprintErrors(Map<net.minecraft.resources.ResourceKey<?>, Exception> errors) Prints all errors from loading registries into a string.
-
Constructor Details
-
VeilDynamicRegistry
public VeilDynamicRegistry()
-
-
Method Details
-
loadRegistries
public static CompletableFuture<VeilDynamicRegistry.Data> loadRegistries(net.minecraft.server.packs.resources.ResourceManager resourceManager, Collection<net.minecraft.resources.RegistryDataLoader.RegistryData<?>> registries, Executor executor) Loads the specified registries from the normal registry folder.- Parameters:
resourceManager- The manager for all resourcesregistries- The registries to loadexecutor- The executor to load all registries on- Returns:
- All loaded registries and their errors
-
printErrors
@Nullable public static @Nullable String printErrors(Map<net.minecraft.resources.ResourceKey<?>, Exception> errors) Prints all errors from loading registries into a string.- Parameters:
errors- The errors to print- Returns:
- The errors or
nullif there were no errors
-
isLoading
@Internal public static boolean isLoading()
-