Package net.minecraft.client.texture
Class Sprite
java.lang.Object
net.minecraft.client.texture.Sprite
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
MissingSprite
@Environment(CLIENT) public class Sprite extends Object implements AutoCloseable
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) classSprite.class_5790(package private) static classSprite.class_5791static classSprite.Info(package private) classSprite.Interpolation -
Field Summary
Fields Modifier and Type Field Description private SpriteAtlasTextureatlasprivate static Loggerfield_28464private Identifierfield_28465private intfield_28466private intfield_28467private Sprite.class_5790field_28468protected NativeImage[]imagesprivate floatuMaxprivate floatuMinprivate floatvMaxprivate floatvMinprivate intxprivate inty -
Constructor Summary
Constructors Modifier Constructor Description protectedSprite(SpriteAtlasTexture spriteAtlasTexture, Sprite.Info info, int maxLevel, int atlasWidth, int atlasHeight, int x, int y, NativeImage nativeImage) -
Method Summary
Modifier and Type Method Description voidclose()floatgetAnimationFrameDelta()SpriteAtlasTexturegetAtlas()private intgetFrameCount()private floatgetFrameDeltaFactor()floatgetFrameU(double frame)floatgetFrameV(double frame)intgetHeight()IdentifiergetId()floatgetMaxU()floatgetMaxV()floatgetMinU()floatgetMinV()VertexConsumergetTextureSpecificVertexConsumer(VertexConsumer vertexConsumer)intgetWidth()booleanisPixelTransparent(int frame, int x, int y)private Sprite.class_5790method_33437(Sprite.Info info, int int2, int int3, int int4)IntStreammethod_33442()TextureTickListenermethod_33443()StringtoString()voidupload()private voidupload(int frameX, int frameY, NativeImage[] output)
-
Field Details
-
field_28464
-
atlas
-
field_28465
-
field_28466
private final int field_28466 -
field_28467
private final int field_28467 -
images
-
field_28468
-
x
private final int x -
y
private final int y -
uMin
private final float uMin -
uMax
private final float uMax -
vMin
private final float vMin -
vMax
private final float vMax
-
-
Constructor Details
-
Sprite
protected Sprite(SpriteAtlasTexture spriteAtlasTexture, Sprite.Info info, int maxLevel, int atlasWidth, int atlasHeight, int x, int y, NativeImage nativeImage)
-
-
Method Details
-
getFrameCount
private int getFrameCount() -
method_33437
-
upload
-
getWidth
public int getWidth() -
getHeight
public int getHeight() -
getMinU
public float getMinU() -
getMaxU
public float getMaxU() -
getFrameU
public float getFrameU(double frame) -
getMinV
public float getMinV() -
getMaxV
public float getMaxV() -
getFrameV
public float getFrameV(double frame) -
getId
-
getAtlas
-
method_33442
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
toString
-
isPixelTransparent
public boolean isPixelTransparent(int frame, int x, int y) -
upload
public void upload() -
getFrameDeltaFactor
private float getFrameDeltaFactor() -
getAnimationFrameDelta
public float getAnimationFrameDelta() -
method_33443
-
getTextureSpecificVertexConsumer
-