Record Class KubeIconRenderer.FromAtlasSprite
java.lang.Object
java.lang.Record
dev.latvian.mods.kubejs.client.icon.KubeIconRenderer.FromAtlasSprite
- All Implemented Interfaces:
KubeIconRenderer
- Enclosing interface:
KubeIconRenderer
public static record KubeIconRenderer.FromAtlasSprite(AtlasSpriteKubeIcon icon)
extends Record
implements KubeIconRenderer
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.latvian.mods.kubejs.client.icon.KubeIconRenderer
KubeIconRenderer.FromAtlasSprite, KubeIconRenderer.FromItem, KubeIconRenderer.FromTexture, KubeIconRenderer.Registry -
Field Summary
Fields inherited from interface dev.latvian.mods.kubejs.client.icon.KubeIconRenderer
RENDERERS -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aFromAtlasSpriterecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoiddraw(net.minecraft.client.Minecraft mc, net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int size) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.icon()Returns the value of theiconrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FromAtlasSprite
Creates an instance of aFromAtlasSpriterecord class.- Parameters:
icon- the value for theiconrecord component
-
-
Method Details
-
draw
public void draw(net.minecraft.client.Minecraft mc, net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int size) - Specified by:
drawin interfaceKubeIconRenderer
-
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). -
icon
Returns the value of theiconrecord component.- Returns:
- the value of the
iconrecord component
-