Record Class PackOptions

java.lang.Object
java.lang.Record
net.darkhax.openloader.common.impl.unused.PackOptions

public record PackOptions(boolean enabled, boolean required, net.minecraft.server.packs.repository.Pack.Position position, Optional<net.minecraft.network.chat.Component> name, Optional<net.minecraft.network.chat.Component> description, boolean includeSourceName, boolean fixedPosition) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<PackOptions>
     
    static final PackOptions
     
    static final com.mojang.serialization.Codec<net.minecraft.server.packs.repository.Pack.Position>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    PackOptions(boolean enabled, boolean required, net.minecraft.server.packs.repository.Pack.Position position, Optional<net.minecraft.network.chat.Component> name, Optional<net.minecraft.network.chat.Component> description, boolean includeSourceName, boolean fixedPosition)
    Creates an instance of a PackOptions record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Optional<net.minecraft.network.chat.Component>
    Returns the value of the description record component.
    boolean
    Returns the value of the enabled record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    boolean
    Returns the value of the fixedPosition record component.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the includeSourceName record component.
    Optional<net.minecraft.network.chat.Component>
    Returns the value of the name record component.
    net.minecraft.server.packs.repository.Pack.Position
    Returns the value of the position record component.
    readOptions(File packCandidate)
     
    boolean
    Returns the value of the required record component.
    net.minecraft.server.packs.PackSelectionConfig
     
    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

    • DEFAULT_OPTIONS

      public static final PackOptions DEFAULT_OPTIONS
    • POSITION

      public static final com.mojang.serialization.Codec<net.minecraft.server.packs.repository.Pack.Position> POSITION
    • CODEC

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

    • PackOptions

      public PackOptions(boolean enabled, boolean required, net.minecraft.server.packs.repository.Pack.Position position, Optional<net.minecraft.network.chat.Component> name, Optional<net.minecraft.network.chat.Component> description, boolean includeSourceName, boolean fixedPosition)
      Creates an instance of a PackOptions record class.
      Parameters:
      enabled - the value for the enabled record component
      required - the value for the required record component
      position - the value for the position record component
      name - the value for the name record component
      description - the value for the description record component
      includeSourceName - the value for the includeSourceName record component
      fixedPosition - the value for the fixedPosition record component
  • Method Details

    • selectionConfig

      public net.minecraft.server.packs.PackSelectionConfig selectionConfig()
    • readOptions

      public static PackOptions readOptions(File packCandidate)
    • 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.
    • enabled

      public boolean enabled()
      Returns the value of the enabled record component.
      Returns:
      the value of the enabled record component
    • required

      public boolean required()
      Returns the value of the required record component.
      Returns:
      the value of the required record component
    • position

      public net.minecraft.server.packs.repository.Pack.Position position()
      Returns the value of the position record component.
      Returns:
      the value of the position record component
    • name

      public Optional<net.minecraft.network.chat.Component> name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • description

      public Optional<net.minecraft.network.chat.Component> description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • includeSourceName

      public boolean includeSourceName()
      Returns the value of the includeSourceName record component.
      Returns:
      the value of the includeSourceName record component
    • fixedPosition

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