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 SpritelikefromJson(com.google.gson.JsonElement json) static SpritelikefromNbt(net.minecraft.nbt.NbtElement nbt) abstract intabstract net.minecraft.util.Identifierabstract intabstract Spritelike.SpritelikeTypegetType()getUVs()abstract SpriteUVRegiongetUVs(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
-