Record Class PixelIcon
java.lang.Object
java.lang.Record
net.ixdarklord.folios.internal.client.paint.PixelIcon
public record PixelIcon(net.minecraft.resources.Identifier texture, int width, int height, int frames)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionPixelIcon(net.minecraft.resources.Identifier 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(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int x, int y, int color) voiddraw(net.minecraft.client.gui.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(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int x, int y, float seconds, int base) intsweepFrame(float seconds, float period, float length) net.minecraft.resources.Identifiertexture()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.Identifier 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
public void draw(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int x, int y, int color) -
draw
public void draw(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int x, int y, int frame, int color) -
rainbow
-
rainbow
public void rainbow(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int x, int y, float seconds, int base) -
sweepFrame
public int sweepFrame(float seconds, float period, float length) -
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
-
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
-