Record Class SpriteSkin
java.lang.Object
java.lang.Record
cromveil.combatnumbers.client.skins.SpriteSkin
- All Implemented Interfaces:
Skin
public record SpriteSkin(SpriteSheet sheet, @Nullable Integer fillColor, float letterSpacing, boolean colored, float scale)
extends Record
implements Skin
-
Constructor Summary
ConstructorsConstructorDescriptionSpriteSkin(SpriteSheet sheet, @Nullable Integer fillColor, float letterSpacing, boolean colored) SpriteSkin(SpriteSheet sheet, @Nullable Integer fillColor, float letterSpacing, boolean colored, float scale) Creates an instance of aSpriteSkinrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleancolored()Returns the value of thecoloredrecord component.createVisual(String text) final booleanIndicates whether some other object is "equal to" this one.@Nullable IntegerReturns the value of thefillColorrecord component.floatgetScale()final inthashCode()Returns a hash code value for this object.floatReturns the value of theletterSpacingrecord component.floatscale()Returns the value of thescalerecord component.sheet()Returns the value of thesheetrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SpriteSkin
public SpriteSkin(SpriteSheet sheet, @Nullable Integer fillColor, float letterSpacing, boolean colored) -
SpriteSkin
public SpriteSkin(SpriteSheet sheet, @Nullable Integer fillColor, float letterSpacing, boolean colored, float scale) Creates an instance of aSpriteSkinrecord class.- Parameters:
sheet- the value for thesheetrecord componentfillColor- the value for thefillColorrecord componentletterSpacing- the value for theletterSpacingrecord componentcolored- the value for thecoloredrecord componentscale- the value for thescalerecord component
-
-
Method Details
-
createVisual
- Specified by:
createVisualin interfaceSkin
-
getScale
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
sheet
Returns the value of thesheetrecord component.- Returns:
- the value of the
sheetrecord component
-
fillColor
Returns the value of thefillColorrecord component.- Returns:
- the value of the
fillColorrecord component
-
letterSpacing
public float letterSpacing()Returns the value of theletterSpacingrecord component.- Returns:
- the value of the
letterSpacingrecord component
-
colored
public boolean colored()Returns the value of thecoloredrecord component.- Returns:
- the value of the
coloredrecord component
-
scale
public float scale()Returns the value of thescalerecord component.- Returns:
- the value of the
scalerecord component
-