Interface VeilResourceLoader

All Known Implementing Classes:
FramebufferResourceLoader, McMetaResourceLoader, PostPipelineResourceLoader, ShaderIncludeLoader, ShaderResourceLoader, TextResourceLoader, TextureResourceLoader

public interface VeilResourceLoader
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    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.
    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 from
      location - The path to load the resource from
      filePath - The file path of the resource
      modResourcePath - The path to this resource in the build folder if in a dev environment
      Returns:
      If this resource loader recognizes & 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 instance
      provider - The provider for vanilla resources
      packType - The type of pack the resource was loaded from
      location - The path to load the resource from
      filePath - The file path of the resource
      modResourcePath - The path to this resource in the build folder if in a dev environment
      Returns:
      The loaded resource
      Throws:
      IOException