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.
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
static VeilDynamicRegistry.Data
loadRegistries
(net.minecraft.server.packs.resources.ResourceManager resourceManager, Collection<net.minecraft.resources.RegistryDataLoader.RegistryData<?>> registries) Loads the specified registries from the normal registry folder.static @Nullable String
printErrors
(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 VeilDynamicRegistry.Data loadRegistries(net.minecraft.server.packs.resources.ResourceManager resourceManager, Collection<net.minecraft.resources.RegistryDataLoader.RegistryData<?>> registries) Loads the specified registries from the normal registry folder.- Parameters:
resourceManager
- The manager for all resourcesregistries
- The registries to load- 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
null
if there were no errors
-
isLoading
@Internal public static boolean isLoading()
-