Interface TextureType<T>

All Superinterfaces:
Serializer<T>
All Known Implementing Classes:
ConnectingTextureType, ScrollingTextureType, VanillaTextureType

public interface TextureType<T> extends Serializer<T>
Created 26/04/2023 by SuperMartijn642
  • Method Details

    • getFrameSize

      default Pair<Integer,Integer> getFrameSize(SpritePreparationContext context, T data)
      Gets the size of a single frame. The returned size will be allocated in the relevant atlas.
      Parameters:
      context - context for calculating the frame size
      data - custom texture data
      Returns:
      the size to allocate to this sprite in the atlas
      See Also:
    • createSprite

      net.minecraft.client.renderer.texture.TextureAtlasSprite createSprite(SpriteCreationContext context, T data)
      Creates the sprite from the custom texture data.
      Parameters:
      context - context for creating the sprite
      data - custom texture data
      See Also: