Record Class ResourceCacheManager.ResourceCacheEntry

java.lang.Object
java.lang.Record
net.minecraftforge.resource.ResourceCacheManager.ResourceCacheEntry
Record Components:
packType - The pack type that the resource resides in.
namespace - The namespace that the resource resides in.
path - The path in the pack that the resource resides in.
resourceLocation - The resource location for the resource.
Enclosing class:
ResourceCacheManager

private static record ResourceCacheManager.ResourceCacheEntry(PackType packType, String namespace, Path path, ResourceLocation resourceLocation) extends Record
Record for the individual cache entries.
  • Field Details

    • packType

      private final PackType packType
      The field for the packType record component.
    • namespace

      private final String namespace
      The field for the namespace record component.
    • path

      private final Path path
      The field for the path record component.
    • resourceLocation

      private final ResourceLocation resourceLocation
      The field for the resourceLocation record component.
  • Constructor Details

    • ResourceCacheEntry

      private ResourceCacheEntry(PackType packType, String namespace, Path path, ResourceLocation resourceLocation)
      Creates an instance of a ResourceCacheEntry record class.
      Parameters:
      packType - the value for the packType record component
      namespace - the value for the namespace record component
      path - the value for the path record component
      resourceLocation - the value for the resourceLocation record component
  • Method Details

    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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 PackType packType()
      Returns the value of the packType record component.
      Returns:
      the value of the packType record component
    • namespace

      public String namespace()
      Returns the value of the namespace record component.
      Returns:
      the value of the namespace record component
    • path

      public Path path()
      Returns the value of the path record component.
      Returns:
      the value of the path record component
    • resourceLocation

      public ResourceLocation resourceLocation()
      Returns the value of the resourceLocation record component.
      Returns:
      the value of the resourceLocation record component