Record Class FluidState

java.lang.Object
java.lang.Record
com.hypixel.hytale.builtin.fluid.FluidState

public record FluidState(int fluidLevel, byte verticalFill) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final FluidState[]
     
    private final int
    The field for the fluidLevel record component.
    static final int
     
    static int
     
    private final byte
    The field for the verticalFill record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    FluidState(int fluidLevel, byte verticalFill)
    Creates an instance of a FluidState record class.
    FluidState(int fluidLevel, int verticalFill)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    int
    Returns the value of the fluidLevel record component.
    static FluidState[]
    generateFluidStates(int maxLevel)
     
    final int
    Returns a hash code value for this object.
    Returns a string representation of this record class.
    byte
    Returns the value of the verticalFill record component.

    Methods inherited from class java.lang.Object

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

    • fluidLevel

      private final int fluidLevel
      The field for the fluidLevel record component.
    • verticalFill

      private final byte verticalFill
      The field for the verticalFill record component.
    • SOURCE_LEVEL

      public static int SOURCE_LEVEL
    • FULL_LEVEL

      public static final int FULL_LEVEL
      See Also:
    • FLUID_STATES

      public static final FluidState[] FLUID_STATES
  • Constructor Details

    • FluidState

      public FluidState(int fluidLevel, int verticalFill)
    • FluidState

      public FluidState(int fluidLevel, byte verticalFill)
      Creates an instance of a FluidState record class.
      Parameters:
      fluidLevel - the value for the fluidLevel record component
      verticalFill - the value for the verticalFill record component
  • Method Details

    • generateFluidStates

      @Nonnull public static FluidState[] generateFluidStates(int maxLevel)
    • toString

      @Nonnull public 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 '=='.
      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.
    • fluidLevel

      public int fluidLevel()
      Returns the value of the fluidLevel record component.
      Returns:
      the value of the fluidLevel record component
    • verticalFill

      public byte verticalFill()
      Returns the value of the verticalFill record component.
      Returns:
      the value of the verticalFill record component