Package foundry.veil.api.resource
Interface VeilResourceLoader
- All Known Implementing Classes:
FramebufferResourceLoader
,McMetaResourceLoader
,PostPipelineResourceLoader
,RenderTypeResourceLoader
,ShaderIncludeLoader
,ShaderResourceLoader
,TextResourceLoader
,TextureResourceLoader
public interface VeilResourceLoader
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canLoad
(net.minecraft.server.packs.PackType packType, net.minecraft.resources.ResourceLocation location, @Nullable 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.
-
Method Details
-
canLoad
boolean canLoad(net.minecraft.server.packs.PackType packType, net.minecraft.resources.ResourceLocation location, @Nullable @Nullable Path filePath, @Nullable @Nullable Path modResourcePath) Checks if the specified resource can load.- 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
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 Loads the resource from the specified path.- 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
-