public class ScrollingTextureType extends java.lang.Object implements TextureType<ScrollingTextureData>
| Constructor and Description |
|---|
ScrollingTextureType() |
| Modifier and Type | Method and Description |
|---|---|
net.minecraft.client.renderer.texture.TextureAtlasSprite |
createSprite(SpriteCreationContext context,
ScrollingTextureData data)
Creates the sprite from the custom texture data.
|
ScrollingTextureData |
deserialize(com.google.gson.JsonObject json)
Deserializes the given json to some data.
|
Pair<java.lang.Integer,java.lang.Integer> |
getFrameSize(SpritePreparationContext context,
ScrollingTextureData data)
Gets the size of a single frame.
|
com.google.gson.JsonObject |
serialize(ScrollingTextureData data)
Serializes the given data to json.
|
public ScrollingTextureData deserialize(com.google.gson.JsonObject json) throws com.google.gson.JsonParseException
Serializerdeserialize in interface Serializer<ScrollingTextureData>com.google.gson.JsonParseException - if the given json does not match the expected formatpublic com.google.gson.JsonObject serialize(ScrollingTextureData data)
Serializerserialize in interface Serializer<ScrollingTextureData>public Pair<java.lang.Integer,java.lang.Integer> getFrameSize(SpritePreparationContext context, ScrollingTextureData data)
TextureTypegetFrameSize in interface TextureType<ScrollingTextureData>context - context for calculating the frame sizedata - custom texture dataSpritePreparationContextpublic net.minecraft.client.renderer.texture.TextureAtlasSprite createSprite(SpriteCreationContext context, ScrollingTextureData data)
TextureTypecreateSprite in interface TextureType<ScrollingTextureData>context - context for creating the spritedata - custom texture dataSpriteCreationContext