Record Class PatternColors

java.lang.Object
java.lang.Record
at.petrak.hexcasting.client.render.PatternColors

public record PatternColors(int innerStartColor, int innerEndColor, int outerStartColor, int outerEndColor, int startingDotColor, int gridDotsColor) extends Record
An immutable wrapper for pattern colors.

This is separate from PatternRenderSettings because it does not affect the shape of the pattern, so we can re-use those parts for different colors.

  • Field Details

    • DEFAULT_PATTERN_COLOR

      public static final PatternColors DEFAULT_PATTERN_COLOR
    • DIMMED_COLOR

      public static final PatternColors DIMMED_COLOR
    • DEFAULT_GRADIENT_COLOR

      public static final PatternColors DEFAULT_GRADIENT_COLOR
    • STARTING_DOT

      public static final int STARTING_DOT
      See Also:
    • GRID_DOTS

      public static final int GRID_DOTS
      See Also:
    • READABLE_SCROLL_COLORS

      public static final PatternColors READABLE_SCROLL_COLORS
    • READABLE_GRID_SCROLL_COLORS

      public static final PatternColors READABLE_GRID_SCROLL_COLORS
    • SLATE_WOBBLY_COLOR

      public static final PatternColors SLATE_WOBBLY_COLOR
    • SLATE_WOBBLY_PURPLE_COLOR

      public static final PatternColors SLATE_WOBBLY_PURPLE_COLOR
  • Constructor Details

    • PatternColors

      public PatternColors(int innerColor, int outerColor)
    • PatternColors

      public PatternColors(int innerStartColor, int innerEndColor, int outerStartColor, int outerEndColor, int startingDotColor, int gridDotsColor)
      Creates an instance of a PatternColors record class.
      Parameters:
      innerStartColor - the value for the innerStartColor record component
      innerEndColor - the value for the innerEndColor record component
      outerStartColor - the value for the outerStartColor record component
      outerEndColor - the value for the outerEndColor record component
      startingDotColor - the value for the startingDotColor record component
      gridDotsColor - the value for the gridDotsColor record component
  • Method Details

    • singleStroke

      public static PatternColors singleStroke(int color)
    • glowyStroke

      public static PatternColors glowyStroke(int color)
    • gradientStrokes

      public static PatternColors gradientStrokes(int innerStartColor, int innerEndColor, int outerStartColor, int outerEndColor)
    • gradientStroke

      public static PatternColors gradientStroke(int startColor, int endColor)
    • withGradientEnds

      public PatternColors withGradientEnds(int endColorInner, int endColorOuter)
    • withGradientEnds

      public PatternColors withGradientEnds(PatternColors end)
    • withDotColors

      public PatternColors withDotColors(int startingDotColor, int gridDotsColor)
    • withDots

      public PatternColors withDots(boolean startingDot, boolean gridDots)
    • 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 '=='.
      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.
    • innerStartColor

      public int innerStartColor()
      Returns the value of the innerStartColor record component.
      Returns:
      the value of the innerStartColor record component
    • innerEndColor

      public int innerEndColor()
      Returns the value of the innerEndColor record component.
      Returns:
      the value of the innerEndColor record component
    • outerStartColor

      public int outerStartColor()
      Returns the value of the outerStartColor record component.
      Returns:
      the value of the outerStartColor record component
    • outerEndColor

      public int outerEndColor()
      Returns the value of the outerEndColor record component.
      Returns:
      the value of the outerEndColor record component
    • startingDotColor

      public int startingDotColor()
      Returns the value of the startingDotColor record component.
      Returns:
      the value of the startingDotColor record component
    • gridDotsColor

      public int gridDotsColor()
      Returns the value of the gridDotsColor record component.
      Returns:
      the value of the gridDotsColor record component