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 Summary
FieldsModifier and TypeFieldDescriptionstatic final PatternColorsstatic final PatternColorsstatic final PatternColorsstatic final intstatic final PatternColorsstatic final PatternColorsstatic final PatternColorsstatic final PatternColorsstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionPatternColors(int innerColor, int outerColor) PatternColors(int innerStartColor, int innerEndColor, int outerStartColor, int outerEndColor, int startingDotColor, int gridDotsColor) Creates an instance of aPatternColorsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static PatternColorsglowyStroke(int color) static PatternColorsgradientStroke(int startColor, int endColor) static PatternColorsgradientStrokes(int innerStartColor, int innerEndColor, int outerStartColor, int outerEndColor) intReturns the value of thegridDotsColorrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of theinnerEndColorrecord component.intReturns the value of theinnerStartColorrecord component.intReturns the value of theouterEndColorrecord component.intReturns the value of theouterStartColorrecord component.static PatternColorssingleStroke(int color) intReturns the value of thestartingDotColorrecord component.final StringtoString()Returns a string representation of this record class.withDotColors(int startingDotColor, int gridDotsColor) withDots(boolean startingDot, boolean gridDots) withGradientEnds(int endColorInner, int endColorOuter)
-
Field Details
-
DEFAULT_PATTERN_COLOR
-
DIMMED_COLOR
-
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
-
READABLE_GRID_SCROLL_COLORS
-
SLATE_WOBBLY_COLOR
-
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 aPatternColorsrecord class.- Parameters:
innerStartColor- the value for theinnerStartColorrecord componentinnerEndColor- the value for theinnerEndColorrecord componentouterStartColor- the value for theouterStartColorrecord componentouterEndColor- the value for theouterEndColorrecord componentstartingDotColor- the value for thestartingDotColorrecord componentgridDotsColor- the value for thegridDotsColorrecord component
-
-
Method Details
-
singleStroke
-
glowyStroke
-
gradientStrokes
public static PatternColors gradientStrokes(int innerStartColor, int innerEndColor, int outerStartColor, int outerEndColor) -
gradientStroke
-
withGradientEnds
-
withGradientEnds
-
withDotColors
-
withDots
-
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. -
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. -
equals
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 '=='. -
innerStartColor
public int innerStartColor()Returns the value of theinnerStartColorrecord component.- Returns:
- the value of the
innerStartColorrecord component
-
innerEndColor
public int innerEndColor()Returns the value of theinnerEndColorrecord component.- Returns:
- the value of the
innerEndColorrecord component
-
outerStartColor
public int outerStartColor()Returns the value of theouterStartColorrecord component.- Returns:
- the value of the
outerStartColorrecord component
-
outerEndColor
public int outerEndColor()Returns the value of theouterEndColorrecord component.- Returns:
- the value of the
outerEndColorrecord component
-
startingDotColor
public int startingDotColor()Returns the value of thestartingDotColorrecord component.- Returns:
- the value of the
startingDotColorrecord component
-
gridDotsColor
public int gridDotsColor()Returns the value of thegridDotsColorrecord component.- Returns:
- the value of the
gridDotsColorrecord component
-