Package com.samsthenerd.inline.utils
Class Spritelike
java.lang.Object
com.samsthenerd.inline.utils.Spritelike
- Direct Known Subclasses:
TextureSprite
,URLSprite
A wrapper around various texture sources.
Spritelike is server safe, on the client it renders with a SpritelikeRenderer. IMPORTANT NOTE: spritelike serialization is a bit spotty, if you need to send it to the client you should consider instead sending something more specific that can then reconstruct a spritelike. See SpriteInlineData for some more related notes.
You shouldn't need to make new Spritelike types.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Spritelike
fromJson
(com.google.gson.JsonElement json) static Spritelike
fromNbt
(net.minecraft.nbt.NbtElement nbt) abstract int
abstract net.minecraft.util.Identifier
abstract int
abstract Spritelike.SpritelikeType
getType()
getUVs()
abstract SpriteUVRegion
getUVs
(long time) static void
-
Field Details
-
CODEC
-
-
Constructor Details
-
Spritelike
public Spritelike()
-
-
Method Details
-
getType
-
getTextureId
@Nullable public abstract net.minecraft.util.Identifier getTextureId() -
getUVs
-
getUVs
-
getTextureWidth
public abstract int getTextureWidth() -
getTextureHeight
public abstract int getTextureHeight() -
fromJson
-
fromNbt
-
registerType
-