Interface SpriteCreationContext

All Known Implementing Classes:
SpriteCreationContextImpl

public interface SpriteCreationContext
Created 29/04/2023 by SuperMartijn642
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.client.renderer.texture.TextureAtlasSprite
    Creates the sprite as if it were created by vanilla.
    net.minecraft.client.renderer.texture.TextureAtlas
    Gets the atlas which the sprite is stitched to.
    int
    Gets the height of the texture.
    int
    Gets the width of the atlas.
    int
    Gets the configured number of mipmap levels.
    int
    Gets the height of the sprite as allocated on the atlas.
    int
    Gets the x-position of the sprite on the atlas.
    int
    Gets the y-position of the sprite on the atlas.
    int
    Gets the width of the sprite as allocated on the atlas.
    com.mojang.blaze3d.platform.NativeImage[]
    Gets the texture data.
    int
    Gets the height of the texture.
    net.minecraft.resources.ResourceLocation
    Gets the identifier of the texture.
    int
    Gets the width of the texture.
  • Method Details

    • createOriginalSprite

      net.minecraft.client.renderer.texture.TextureAtlasSprite createOriginalSprite()
      Creates the sprite as if it were created by vanilla. Note that if this is called, responsibility for closing the returned sprite's resources lies with the caller.
    • getTextureWidth

      int getTextureWidth()
      Gets the width of the texture.
    • getTextureHeight

      int getTextureHeight()
      Gets the height of the texture.
    • getTextureIdentifier

      net.minecraft.resources.ResourceLocation getTextureIdentifier()
      Gets the identifier of the texture.
    • getTextureBuffers

      com.mojang.blaze3d.platform.NativeImage[] getTextureBuffers()
      Gets the texture data. Each element in the array corresponds to one mipmap level. Note that if this is called, responsibility for closing the returned images lies with the caller.
    • getAtlasWidth

      int getAtlasWidth()
      Gets the width of the atlas.
    • getAtlasHeight

      int getAtlasHeight()
      Gets the height of the texture.
    • getAtlas

      net.minecraft.client.renderer.texture.TextureAtlas getAtlas()
      Gets the atlas which the sprite is stitched to.
    • getSpritePositionX

      int getSpritePositionX()
      Gets the x-position of the sprite on the atlas.
    • getSpritePositionY

      int getSpritePositionY()
      Gets the y-position of the sprite on the atlas.
    • getSpriteWidth

      int getSpriteWidth()
      Gets the width of the sprite as allocated on the atlas.
    • getSpriteHeight

      int getSpriteHeight()
      Gets the height of the sprite as allocated on the atlas.
    • getMipmapLevels

      int getMipmapLevels()
      Gets the configured number of mipmap levels.