Interface SpriteCreationContext
- All Known Implementing Classes:
SpriteCreationContextImpl
public interface SpriteCreationContext
Created 29/04/2023 by SuperMartijn642
-
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.client.renderer.texture.TextureAtlasSpriteCreates the sprite as if it were created by vanilla.net.minecraft.client.renderer.texture.TextureAtlasgetAtlas()Gets the atlas which the sprite is stitched to.intGets the height of the texture.intGets the width of the atlas.intGets the configured number of mipmap levels.intGets the height of the sprite as allocated on the atlas.intGets the x-position of the sprite on the atlas.intGets the y-position of the sprite on the atlas.intGets the width of the sprite as allocated on the atlas.com.mojang.blaze3d.platform.NativeImage[]Gets the texture data.intGets the height of the texture.net.minecraft.resources.ResourceLocationGets the identifier of the texture.intGets 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.
-