Class TextureAtlasSprite
java.lang.Object
net.minecraft.client.renderer.texture.TextureAtlasSprite
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
UnitTextureAtlasSprite
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Identifierprivate final SpriteContentsprivate final intprivate final floatprivate final floatprivate final floatprivate final floatprivate final intprivate final int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTextureAtlasSprite(Identifier atlasLocation, SpriteContents contents, int textureWidth, int textureHeight, int x, int y, int padding) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()contents()@Nullable SpriteContents.AnimationStatecreateAnimationState(GpuBufferSlice buffer, int size) intgetPixelRGBA(int frameIndex, int x, int y) floatgetU(float offset) floatgetU0()floatgetU1()floatgetV(float offset) floatgetV0()floatgetV1()intgetX()intgetY()(package private) booleantoString()voiduploadFirstFrame(GpuTexture texture, int mipLevel) voiduploadSpriteUbo(ByteBuffer buffer, int offset, int maxMipLevel, int width, int height, int length) wrap(VertexConsumer consumer)
-
Field Details
-
atlasLocation
-
contents
-
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 -
padding
private final int padding
-
-
Constructor Details
-
TextureAtlasSprite
protected TextureAtlasSprite(Identifier atlasLocation, SpriteContents contents, int textureWidth, int textureHeight, int x, int y, int padding)
-
-
Method Details
-
getX
public int getX() -
getY
public int getY() -
getU0
public float getU0() -
getU1
public float getU1() -
contents
-
createAnimationState
public @Nullable SpriteContents.AnimationState createAnimationState(GpuBufferSlice buffer, int size) -
getU
public float getU(float offset) -
getV0
public float getV0() -
getV1
public float getV1() -
getV
public float getV(float offset) -
atlasLocation
-
toString
-
uploadFirstFrame
-
wrap
-
isAnimated
boolean isAnimated() -
uploadSpriteUbo
public void uploadSpriteUbo(ByteBuffer buffer, int offset, int maxMipLevel, int width, int height, int length) -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
getPixelRGBA
public int getPixelRGBA(int frameIndex, int x, int y)
-