Record Class RenderableSprite
java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.api.util.RenderableSprite
public record RenderableSprite(ResourceWithFallback resource, Color color, org.joml.Vector3f offset)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<RenderableSprite>
static final com.mojang.serialization.Codec<RenderableSprite>
static final com.mojang.serialization.Codec<List<RenderableSprite>>
-
Constructor Summary
ConstructorDescriptionRenderableSprite
(ResourceWithFallback resource) RenderableSprite
(ResourceWithFallback resource, Color color) RenderableSprite
(ResourceWithFallback resource, Color color, org.joml.Vector3f offset) Creates an instance of aRenderableSprite
record class.RenderableSprite
(ResourceWithFallback resource, org.joml.Vector3f offset) -
Method Summary
Modifier and TypeMethodDescriptioncolor()
Returns the value of thecolor
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.org.joml.Vector3f
offset()
Returns the value of theoffset
record component.resource()
Returns the value of theresource
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
DIRECT_CODEC
-
CODEC
-
LIST_CODEC
-
-
Constructor Details
-
RenderableSprite
-
RenderableSprite
-
RenderableSprite
-
RenderableSprite
Creates an instance of aRenderableSprite
record class.- Parameters:
resource
- the value for theresource
record componentcolor
- the value for thecolor
record componentoffset
- the value for theoffset
record component
-
-
Method Details
-
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)
. -
resource
Returns the value of theresource
record component.- Returns:
- the value of the
resource
record component
-
color
Returns the value of thecolor
record component.- Returns:
- the value of the
color
record component
-
offset
public org.joml.Vector3f offset()Returns the value of theoffset
record component.- Returns:
- the value of the
offset
record component
-