Class TextureResourceLoader
java.lang.Object
foundry.veil.impl.resource.loader.TextureResourceLoader
- All Implemented Interfaces:
VeilResourceLoader
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canLoad
(net.minecraft.server.packs.PackType packType, net.minecraft.resources.ResourceLocation location, Path filePath, @Nullable Path modResourcePath) Checks if the specified resource can load.VeilResource
<?> load
(VeilResourceManager resourceManager, net.minecraft.server.packs.resources.ResourceProvider provider, net.minecraft.server.packs.PackType packType, net.minecraft.resources.ResourceLocation location, @Nullable Path filePath, @Nullable Path modResourcePath) Loads the resource from the specified path.
-
Constructor Details
-
TextureResourceLoader
public TextureResourceLoader()
-
-
Method Details
-
canLoad
public boolean canLoad(net.minecraft.server.packs.PackType packType, net.minecraft.resources.ResourceLocation location, Path filePath, @Nullable @Nullable Path modResourcePath) Description copied from interface:VeilResourceLoader
Checks if the specified resource can load.- Specified by:
canLoad
in interfaceVeilResourceLoader
- Parameters:
packType
- The type of pack the resource was loaded fromlocation
- The path to load the resource fromfilePath
- The file path of the resourcemodResourcePath
- The path to this resource in the build folder if in a dev environment- Returns:
- If this resource loader recognizes and can load the specified extension
-
load
public VeilResource<?> load(VeilResourceManager resourceManager, net.minecraft.server.packs.resources.ResourceProvider provider, net.minecraft.server.packs.PackType packType, net.minecraft.resources.ResourceLocation location, @Nullable @Nullable Path filePath, @Nullable @Nullable Path modResourcePath) throws IOException Description copied from interface:VeilResourceLoader
Loads the resource from the specified path.- Specified by:
load
in interfaceVeilResourceLoader
- Parameters:
resourceManager
- The Veil resource manager instanceprovider
- The provider for vanilla resourcespackType
- The type of pack the resource was loaded fromlocation
- The path to load the resource fromfilePath
- The file path of the resourcemodResourcePath
- The path to this resource in the build folder if in a dev environment- Returns:
- The loaded resource
- Throws:
IOException
-