Class VanillaTextureType
java.lang.Object
com.supermartijn642.fusion.texture.types.VanillaTextureType
- All Implemented Interfaces:
TextureType<Void>,Serializer<Void>
Created 30/04/2023 by SuperMartijn642
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.client.renderer.texture.TextureAtlasSpritecreateSprite(SpriteCreationContext context, Void data) Creates the sprite from the custom texture data.deserialize(com.google.gson.JsonObject json) Deserializes the given json to some data.getFrameSize(SpritePreparationContext context, Void data) Gets the size of a single frame.com.google.gson.JsonObjectSerializes the given data to json.
-
Constructor Details
-
VanillaTextureType
public VanillaTextureType()
-
-
Method Details
-
getFrameSize
Description copied from interface:TextureTypeGets the size of a single frame. The returned size will be allocated in the relevant atlas.- Specified by:
getFrameSizein interfaceTextureType<Void>- Parameters:
context- context for calculating the frame sizedata- custom texture data- Returns:
- the size to allocate to this sprite in the atlas
- See Also:
-
createSprite
public net.minecraft.client.renderer.texture.TextureAtlasSprite createSprite(SpriteCreationContext context, Void data) Description copied from interface:TextureTypeCreates the sprite from the custom texture data.- Specified by:
createSpritein interfaceTextureType<Void>- Parameters:
context- context for creating the spritedata- custom texture data- See Also:
-
deserialize
Description copied from interface:SerializerDeserializes the given json to some data.- Specified by:
deserializein interfaceSerializer<Void>- Throws:
com.google.gson.JsonParseException- if the given json does not match the expected format
-
serialize
Description copied from interface:SerializerSerializes the given data to json.- Specified by:
serializein interfaceSerializer<Void>
-