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
FieldsModifier 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
ConstructorsConstructorDescriptionRenderableSprite(ResourceWithFallback resource) RenderableSprite(ResourceWithFallback resource, Color color) RenderableSprite(ResourceWithFallback resource, Color color, org.joml.Vector3f offset) Creates an instance of aRenderableSpriterecord class.RenderableSprite(ResourceWithFallback resource, org.joml.Vector3f offset) -
Method Summary
Modifier and TypeMethodDescriptioncolor()Returns the value of thecolorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.org.joml.Vector3foffset()Returns the value of theoffsetrecord component.resource()Returns the value of theresourcerecord component.final StringtoString()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 aRenderableSpriterecord class.- Parameters:
resource- the value for theresourcerecord componentcolor- the value for thecolorrecord componentoffset- the value for theoffsetrecord 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 theresourcerecord component.- Returns:
- the value of the
resourcerecord component
-
color
Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-
offset
public org.joml.Vector3f offset()Returns the value of theoffsetrecord component.- Returns:
- the value of the
offsetrecord component
-