Record Class BundleFiles

java.lang.Object
java.lang.Record
de.luckymcdev.foundryengine.common.bundle.info.BundleFiles
Record Components:
root - the root path of a bundle
assets - the assets path of a bundle
data - the data path of a bundle
scripts - the ScriptFiles data of a bundle
zipFileSystem - the file system used to open a bundle if its a zip file.

public record BundleFiles(Path root, Path assets, Path data, BundleFiles.ScriptFiles scripts, Path saves, @Nullable FileSystem zipFileSystem) extends Record
A Record of data related to Bundle Files.
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<BundleFiles> CODEC
  • Constructor Details

    • BundleFiles

      public BundleFiles(Path root, Path assets, Path data, BundleFiles.ScriptFiles scripts, Path saves, @Nullable @Nullable FileSystem zipFileSystem)
      Creates an instance of a BundleFiles record class.
      Parameters:
      root - the value for the root record component
      assets - the value for the assets record component
      data - the value for the data record component
      scripts - the value for the scripts record component
      saves - the value for the saves record component
      zipFileSystem - the value for the zipFileSystem record component
  • Method Details

    • builder

      public static BundleFilesBuilder builder()
    • hasZipFileSystem

      public boolean hasZipFileSystem()
    • scriptCount

      public int scriptCount()
    • 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.
    • root

      public Path root()
      Returns the value of the root record component.
      Returns:
      the value of the root record component
    • assets

      public Path assets()
      Returns the value of the assets record component.
      Returns:
      the value of the assets record component
    • data

      public Path data()
      Returns the value of the data record component.
      Returns:
      the value of the data record component
    • scripts

      public BundleFiles.ScriptFiles scripts()
      Returns the value of the scripts record component.
      Returns:
      the value of the scripts record component
    • saves

      public Path saves()
      Returns the value of the saves record component.
      Returns:
      the value of the saves record component
    • zipFileSystem

      @Nullable public @Nullable FileSystem zipFileSystem()
      Returns the value of the zipFileSystem record component.
      Returns:
      the value of the zipFileSystem record component