Class TextResourceLoader

java.lang.Object
foundry.veil.impl.resource.loader.TextResourceLoader
All Implemented Interfaces:
VeilResourceLoader

public class TextResourceLoader extends Object implements VeilResourceLoader
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TextResourceLoader

      public TextResourceLoader()
  • Method Details

    • canLoad

      public boolean canLoad(net.minecraft.server.packs.PackType packType, net.minecraft.resources.ResourceLocation location, @Nullable @Nullable Path filePath, @Nullable @Nullable Path modResourcePath)
      Description copied from interface: VeilResourceLoader
      Checks if the specified resource can load.
      Specified by:
      canLoad in interface VeilResourceLoader
      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 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 interface VeilResourceLoader
      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