Record Class PixelIcon
java.lang.Object
java.lang.Record
net.ixdarklord.folios.internal.client.paint.PixelIcon
public record PixelIcon(net.minecraft.resources.ResourceLocation texture, int width, int height, int frames)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionPixelIcon(net.minecraft.resources.ResourceLocation texture, int width, int height, int frames) Creates an instance of aPixelIconrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoiddraw(FoliosPainter painter, int x, int y, int color) voiddraw(FoliosPainter painter, int x, int y, int frame, int color) voiddraw(GuiGraphicsExtractor graphics, int x, int y, int color) voiddraw(GuiGraphicsExtractor graphics, int x, int y, int frame, int color) final booleanIndicates whether some other object is "equal to" this one.intframes()Returns the value of theframesrecord component.final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.static PixelIconstatic PixelIconvoidrainbow(FoliosPainter painter, int x, int y, float seconds, int base) voidrainbow(GuiGraphicsExtractor graphics, int x, int y, float seconds, int base) intsweepFrame(float seconds, float period, float length) net.minecraft.resources.ResourceLocationtexture()Returns the value of thetexturerecord component.final StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.
-
Constructor Details
-
PixelIcon
public PixelIcon(net.minecraft.resources.ResourceLocation texture, int width, int height, int frames) Creates an instance of aPixelIconrecord class.- Parameters:
texture- the value for thetexturerecord componentwidth- the value for thewidthrecord componentheight- the value for theheightrecord componentframes- the value for theframesrecord component
-
-
Method Details
-
of
-
of
-
draw
-
draw
-
draw
-
draw
-
rainbow
-
rainbow
-
sweepFrame
public int sweepFrame(float seconds, float period, float length) -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
texture
public net.minecraft.resources.ResourceLocation texture()Returns the value of thetexturerecord component.- Returns:
- the value of the
texturerecord component
-
width
public int width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public int height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
frames
public int frames()Returns the value of theframesrecord component.- Returns:
- the value of the
framesrecord component
-