Record Class SpriteSkinDefinition
java.lang.Object
java.lang.Record
cromveil.combatnumbers.skins.SpriteSkinDefinition
- All Implemented Interfaces:
SkinDefinition
-
Field Summary
Fields inherited from interface SkinDefinition
COLOR_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionSpriteSkinDefinition(net.minecraft.resources.Identifier texture, int columns, int cellWidth, int cellHeight, String charOrder, @Nullable Integer fillColor, float letterSpacing, Map<String, Float> advances, boolean colored, float scale) Creates an instance of aSpriteSkinDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionadvances()Returns the value of theadvancesrecord component.intReturns the value of thecellHeightrecord component.intReturns the value of thecellWidthrecord component.Returns the value of thecharOrderrecord component.booleancolored()Returns the value of thecoloredrecord component.intcolumns()Returns the value of thecolumnsrecord component.final booleanIndicates whether some other object is "equal to" this one.@Nullable IntegerReturns the value of thefillColorrecord component.final inthashCode()Returns a hash code value for this object.floatReturns the value of theletterSpacingrecord component.floatscale()Returns the value of thescalerecord component.net.minecraft.resources.Identifiertexture()Returns the value of thetexturerecord component.final StringtoString()Returns a string representation of this record class.type()
-
Constructor Details
-
SpriteSkinDefinition
public SpriteSkinDefinition(net.minecraft.resources.Identifier texture, int columns, int cellWidth, int cellHeight, String charOrder, @Nullable Integer fillColor, float letterSpacing, Map<String, Float> advances, boolean colored, float scale) Creates an instance of aSpriteSkinDefinitionrecord class.- Parameters:
texture- the value for thetexturerecord componentcolumns- the value for thecolumnsrecord componentcellWidth- the value for thecellWidthrecord componentcellHeight- the value for thecellHeightrecord componentcharOrder- the value for thecharOrderrecord componentfillColor- the value for thefillColorrecord componentletterSpacing- the value for theletterSpacingrecord componentadvances- the value for theadvancesrecord componentcolored- the value for thecoloredrecord componentscale- the value for thescalerecord component
-
-
Method Details
-
type
- Specified by:
typein interfaceSkinDefinition
-
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. -
texture
public net.minecraft.resources.Identifier texture()Returns the value of thetexturerecord component.- Returns:
- the value of the
texturerecord component
-
columns
public int columns()Returns the value of thecolumnsrecord component.- Returns:
- the value of the
columnsrecord component
-
cellWidth
public int cellWidth()Returns the value of thecellWidthrecord component.- Returns:
- the value of the
cellWidthrecord component
-
cellHeight
public int cellHeight()Returns the value of thecellHeightrecord component.- Returns:
- the value of the
cellHeightrecord component
-
charOrder
Returns the value of thecharOrderrecord component.- Returns:
- the value of the
charOrderrecord 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
-
advances
-
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.- Specified by:
scalein interfaceSkinDefinition- Returns:
- the value of the
scalerecord component
-