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 class
TextureAtlasSprite.Info
(package private) class
TextureAtlasSprite.InterpolationData
-
Field Summary
Fields Modifier and Type Field Description private AtlasTexture
atlas
private int
frame
private int[]
framesX
private int[]
framesY
private TextureAtlasSprite.Info
info
private TextureAtlasSprite.InterpolationData
interpolationData
protected NativeImage[]
mainImage
private AnimationMetadataSection
metadata
private int
subFrame
private float
u0
private float
u1
private float
v0
private float
v1
private int
x
private int
y
-
Constructor Summary
Constructors Modifier Constructor Description 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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AtlasTexture
atlas()
private float
atlasSize()
void
close()
void
cycleFrames()
int
getFrameCount()
int
getHeight()
ResourceLocation
getName()
int
getPixelRGBA(int frameIndex, int x, int y)
float
getU(double p_94214_1_)
float
getU0()
float
getU1()
float
getV(double p_94207_1_)
float
getV0()
float
getV1()
int
getWidth()
boolean
isAnimation()
boolean
isTransparent(int p_195662_1_, int p_195662_2_, int p_195662_3_)
java.lang.String
toString()
private void
upload(int p_195659_1_)
private void
upload(int p_195667_1_, int p_195667_2_, NativeImage[] p_195667_3_)
void
uploadFirstFrame()
float
uvShrinkRatio()
IVertexBuilder
wrap(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:
close
in interfacejava.lang.AutoCloseable
-
toString
public java.lang.String toString()
- Overrides:
toString
in 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)
-
-