Class ResourceEntry

java.lang.Object
org.moddingx.libx.datapack.ResourceEntry

public class ResourceEntry extends Object
Represents a resource entry defined by its ResourceLocation used as id and a Resource used to access the resource entry.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ResourceEntry(net.minecraft.resources.ResourceLocation id, net.minecraft.server.packs.resources.Resource resource)
    Creates a new resource entry.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.resources.ResourceLocation
    id()
    Gets the id of this resource entry
    net.minecraft.server.packs.resources.Resource
    Opens a resource for this entry.

    Methods inherited from class java.lang.Object

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

    • ResourceEntry

      public ResourceEntry(net.minecraft.resources.ResourceLocation id, net.minecraft.server.packs.resources.Resource resource)
      Creates a new resource entry.
      Parameters:
      id - The id of the resource
      resource - The resource
  • Method Details

    • id

      public net.minecraft.resources.ResourceLocation id()
      Gets the id of this resource entry
    • resource

      public net.minecraft.server.packs.resources.Resource resource() throws IOException
      Opens a resource for this entry. The resource must be closed later.
      Throws:
      IOException