Record Class VeilResourceInfo

java.lang.Object
java.lang.Record
foundry.veil.api.resource.VeilResourceInfo
Record Components:
location - The resource location path this resource is located at
filePath - The file path of this resource
modResourcePath - The path to this resource in the build folder if in a dev environment
hidden - Whether this resource should appear in the resource panel

public record VeilResourceInfo(net.minecraft.server.packs.PackType packType, net.minecraft.resources.ResourceLocation location, Path filePath, @Nullable Path modResourcePath, boolean hidden) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    VeilResourceInfo(net.minecraft.server.packs.PackType packType, net.minecraft.resources.ResourceLocation location, Path filePath, @Nullable Path modResourcePath, boolean hidden)
    Creates an instance of a VeilResourceInfo record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
     
    Returns the value of the filePath record component.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the hidden record component.
    boolean
     
    net.minecraft.resources.ResourceLocation
    Returns the value of the location record component.
    @Nullable Path
    Returns the value of the modResourcePath record component.
    net.minecraft.server.packs.PackType
    Returns the value of the packType record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • VeilResourceInfo

      public VeilResourceInfo(net.minecraft.server.packs.PackType packType, net.minecraft.resources.ResourceLocation location, Path filePath, @Nullable @Nullable Path modResourcePath, boolean hidden)
      Creates an instance of a VeilResourceInfo record class.
      Parameters:
      packType - the value for the packType record component
      location - the value for the location record component
      filePath - the value for the filePath record component
      modResourcePath - the value for the modResourcePath record component
      hidden - the value for the hidden record component
  • Method Details

    • fileName

      public String fileName()
      Returns:
      The file name of this resource
    • isStatic

      public boolean isStatic()
      Returns:
      If this file cannot be accessed by the native file system
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • packType

      public net.minecraft.server.packs.PackType packType()
      Returns the value of the packType record component.
      Returns:
      the value of the packType record component
    • location

      public net.minecraft.resources.ResourceLocation location()
      Returns the value of the location record component.
      Returns:
      the value of the location record component
    • filePath

      public Path filePath()
      Returns the value of the filePath record component.
      Returns:
      the value of the filePath record component
    • modResourcePath

      @Nullable public @Nullable Path modResourcePath()
      Returns the value of the modResourcePath record component.
      Returns:
      the value of the modResourcePath record component
    • hidden

      public boolean hidden()
      Returns the value of the hidden record component.
      Returns:
      the value of the hidden record component