Class TextureAtlasSprite
- java.lang.Object
-
- net.minecraft.client.renderer.texture.TextureAtlasSprite
-
- All Implemented Interfaces:
java.lang.AutoCloseable,IForgeTextureAtlasSprite
- Direct Known Subclasses:
MissingTextureSprite
public class TextureAtlasSprite extends java.lang.Object implements java.lang.AutoCloseable, IForgeTextureAtlasSprite
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTextureAtlasSprite.Info(package private) classTextureAtlasSprite.InterpolationData
-
Field Summary
Fields Modifier and Type Field Description private AtlasTextureatlasprivate intframeprivate int[]framesXprivate int[]framesYprivate TextureAtlasSprite.Infoinfoprivate TextureAtlasSprite.InterpolationDatainterpolationDataprotected NativeImage[]mainImageprivate AnimationMetadataSectionmetadataprivate intsubFrameprivate floatu0private floatu1private floatv0private floatv1private intxprivate inty
-
Constructor Summary
Constructors Modifier Constructor Description protectedTextureAtlasSprite(AtlasTexture p_i226049_1_, TextureAtlasSprite.Info p_i226049_2_, int p_i226049_3_, int p_i226049_4_, int p_i226049_5_, int p_i226049_6_, int p_i226049_7_, NativeImage p_i226049_8_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AtlasTextureatlas()private floatatlasSize()voidclose()voidcycleFrames()intgetFrameCount()intgetHeight()ResourceLocationgetName()intgetPixelRGBA(int frameIndex, int x, int y)floatgetU(double p_94214_1_)floatgetU0()floatgetU1()floatgetV(double p_94207_1_)floatgetV0()floatgetV1()intgetWidth()booleanisAnimation()booleanisTransparent(int p_195662_1_, int p_195662_2_, int p_195662_3_)java.lang.StringtoString()private voidupload(int p_195659_1_)private voidupload(int p_195667_1_, int p_195667_2_, NativeImage[] p_195667_3_)voiduploadFirstFrame()floatuvShrinkRatio()IVertexBuilderwrap(IVertexBuilder p_229230_1_)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.minecraftforge.client.extensions.IForgeTextureAtlasSprite
getDependencies, hasCustomLoader, load
-
-
-
-
Field Detail
-
atlas
private final AtlasTexture atlas
-
info
private final TextureAtlasSprite.Info info
-
metadata
private final AnimationMetadataSection metadata
-
mainImage
protected final NativeImage[] mainImage
-
framesX
private final int[] framesX
-
framesY
private final int[] framesY
-
interpolationData
@Nullable private final TextureAtlasSprite.InterpolationData interpolationData
-
x
private final int x
-
y
private final int y
-
u0
private final float u0
-
u1
private final float u1
-
v0
private final float v0
-
v1
private final float v1
-
frame
private int frame
-
subFrame
private int subFrame
-
-
Constructor Detail
-
TextureAtlasSprite
protected TextureAtlasSprite(AtlasTexture p_i226049_1_, TextureAtlasSprite.Info p_i226049_2_, int p_i226049_3_, int p_i226049_4_, int p_i226049_5_, int p_i226049_6_, int p_i226049_7_, NativeImage p_i226049_8_)
-
-
Method Detail
-
upload
private void upload(int p_195659_1_)
-
upload
private void upload(int p_195667_1_, int p_195667_2_, NativeImage[] p_195667_3_)
-
getWidth
public int getWidth()
-
getHeight
public int getHeight()
-
getU0
public float getU0()
-
getU1
public float getU1()
-
getU
public float getU(double p_94214_1_)
-
getV0
public float getV0()
-
getV1
public float getV1()
-
getV
public float getV(double p_94207_1_)
-
getName
public ResourceLocation getName()
-
atlas
public AtlasTexture atlas()
-
getFrameCount
public int getFrameCount()
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
isTransparent
public boolean isTransparent(int p_195662_1_, int p_195662_2_, int p_195662_3_)
-
uploadFirstFrame
public void uploadFirstFrame()
-
atlasSize
private float atlasSize()
-
uvShrinkRatio
public float uvShrinkRatio()
-
cycleFrames
public void cycleFrames()
-
isAnimation
public boolean isAnimation()
-
wrap
public IVertexBuilder wrap(IVertexBuilder p_229230_1_)
-
getPixelRGBA
public int getPixelRGBA(int frameIndex, int x, int y)
-
-