Record Class GeyserResourcePack

java.lang.Object
java.lang.Record
org.geysermc.geyser.pack.GeyserResourcePack
All Implemented Interfaces:
org.geysermc.geyser.api.pack.ResourcePack

public record GeyserResourcePack(org.geysermc.geyser.api.pack.PackCodec codec, org.geysermc.geyser.api.pack.ResourcePackManifest manifest, String contentKey) extends Record implements org.geysermc.geyser.api.pack.ResourcePack
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The size of each chunk to use when sending the resource packs to clients in bytes
  • Constructor Summary

    Constructors
    Constructor
    Description
    GeyserResourcePack(org.geysermc.geyser.api.pack.PackCodec codec, org.geysermc.geyser.api.pack.ResourcePackManifest manifest, String contentKey)
    Creates an instance of a GeyserResourcePack record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.geysermc.geyser.api.pack.PackCodec
    Returns the value of the codec record component.
    Returns the value of the contentKey record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    org.geysermc.geyser.api.pack.ResourcePackManifest
    Returns the value of the manifest 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
  • Field Details

    • CHUNK_SIZE

      public static final int CHUNK_SIZE
      The size of each chunk to use when sending the resource packs to clients in bytes
      See Also:
  • Constructor Details

    • GeyserResourcePack

      public GeyserResourcePack(org.geysermc.geyser.api.pack.PackCodec codec, org.geysermc.geyser.api.pack.ResourcePackManifest manifest, String contentKey)
      Creates an instance of a GeyserResourcePack record class.
      Parameters:
      codec - the value for the codec record component
      manifest - the value for the manifest record component
      contentKey - the value for the contentKey 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.
    • codec

      public org.geysermc.geyser.api.pack.PackCodec codec()
      Returns the value of the codec record component.
      Specified by:
      codec in interface org.geysermc.geyser.api.pack.ResourcePack
      Returns:
      the value of the codec record component
    • manifest

      public org.geysermc.geyser.api.pack.ResourcePackManifest manifest()
      Returns the value of the manifest record component.
      Specified by:
      manifest in interface org.geysermc.geyser.api.pack.ResourcePack
      Returns:
      the value of the manifest record component
    • contentKey

      public String contentKey()
      Returns the value of the contentKey record component.
      Specified by:
      contentKey in interface org.geysermc.geyser.api.pack.ResourcePack
      Returns:
      the value of the contentKey record component