Package com.samsthenerd.inline.api.data
Class SpriteInlineData
java.lang.Object
com.samsthenerd.inline.api.data.SpriteInlineData
- All Implemented Interfaces:
InlineData<SpriteInlineData>
- Direct Known Subclasses:
ModIconData
data class for rendering spritelikes.
For many use cases it may be a better idea to extend this class
to use a more case-specific codec or make new data and renderer classes
that call out to the sprite renderer. See ModIconData for an example of the
first method and PlayerHeadData/PlayerHeadRenderer for the second.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface com.samsthenerd.inline.api.InlineData
InlineData.InlineDataType<D extends InlineData<D>>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSpriteInlineData
(Spritelike sprite) SpriteInlineData
(Spritelike sprite, boolean shouldTint) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.util.Identifier
Gets whichInlineRenderer
should be used for rendering this data.getType()
Gets the InlineDataType of this data.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.samsthenerd.inline.api.InlineData
asStyle, asText, getExtraStyle
-
Field Details
-
sprite
-
shouldTint
public final boolean shouldTint
-
-
Constructor Details
-
SpriteInlineData
-
SpriteInlineData
-
-
Method Details
-
getType
Description copied from interface:InlineData
Gets the InlineDataType of this data. Used mostly for serialization.- Specified by:
getType
in interfaceInlineData<SpriteInlineData>
- Returns:
- type of this data.
-
getRendererId
public net.minecraft.util.Identifier getRendererId()Description copied from interface:InlineData
Gets whichInlineRenderer
should be used for rendering this data.- Specified by:
getRendererId
in interfaceInlineData<SpriteInlineData>
- Returns:
- id of renderer
-