Record Class ConfigIcons.Icon
java.lang.Object
java.lang.Record
net.ixdarklord.coolcatcore.internal.config.client.gui.style.ConfigIcons.Icon
- Enclosing class:
- ConfigIcons
public static record ConfigIcons.Icon(net.minecraft.resources.ResourceLocation texture)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionIcon(net.minecraft.resources.ResourceLocation texture) Creates an instance of aIconrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoiddraw(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int color) voiddraw(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int size, int color) voiddrawCentered(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int width, int height, int color) Draws the icon centered in a box.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intheight()net.minecraft.resources.ResourceLocationtexture()Returns the value of thetexturerecord component.final StringtoString()Returns a string representation of this record class.intwidth()
-
Constructor Details
-
Icon
public Icon(net.minecraft.resources.ResourceLocation texture) Creates an instance of aIconrecord class.- Parameters:
texture- the value for thetexturerecord component
-
-
Method Details
-
width
public int width() -
height
public int height() -
draw
public void draw(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int color) -
draw
public void draw(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int size, int color) -
drawCentered
public void drawCentered(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int width, int height, int color) Draws the icon centered in a box. -
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 withObjects::equals(Object,Object). -
texture
public net.minecraft.resources.ResourceLocation texture()Returns the value of thetexturerecord component.- Returns:
- the value of the
texturerecord component
-