Class EaglerTextureAtlasSprite
- java.lang.Object
-
- net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite
-
- Direct Known Subclasses:
TextureClock
,TextureCompass
public class EaglerTextureAtlasSprite extends java.lang.Object
Copyright (c) 2022-2023 LAX1DUDE. All Rights Reserved. WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR. NOT FOR COMMERCIAL OR MALICIOUS USE (please read the 'LICENSE' file this repo's root directory for more info)
-
-
Field Summary
Fields Modifier and Type Field Description protected TextureAnimationCache
animationCache
protected int
frameCounter
protected java.util.List<int[][]>
framesTextureData
protected int
height
protected int[][]
interpolatedFrameData
protected int
originX
protected int
originY
protected boolean
rotated
protected int
tickCounter
protected int
width
-
Constructor Summary
Constructors Constructor Description EaglerTextureAtlasSprite(java.lang.String spriteName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bakeAnimationCache()
void
clearFramesTextureData()
void
copyFrom(EaglerTextureAtlasSprite atlasSpirit)
void
generateMipmaps(int level)
int
getFrameCount()
int[][]
getFrameTextureData(int index)
int
getIconHeight()
java.lang.String
getIconName()
int
getIconWidth()
float
getInterpolatedU(double u)
float
getInterpolatedV(double v)
float
getMaxU()
float
getMaxV()
float
getMinU()
float
getMinV()
int
getOriginX()
int
getOriginY()
boolean
hasAnimationMetadata()
void
initSprite(int inX, int inY, int originInX, int originInY, boolean rotatedIn)
void
loadSprite(ImageData[] images, AnimationMetadataSection meta)
static EaglerTextureAtlasSprite
makeAtlasSprite(ResourceLocation spriteResourceLocation)
void
setFramesTextureData(java.util.List<int[][]> newFramesTextureData)
void
setIconHeight(int newHeight)
void
setIconWidth(int newWidth)
static void
setLocationNameClock(java.lang.String clockName)
static void
setLocationNameCompass(java.lang.String compassName)
java.lang.String
toString()
void
updateAnimation()
-
-
-
Field Detail
-
framesTextureData
protected java.util.List<int[][]> framesTextureData
-
interpolatedFrameData
protected int[][] interpolatedFrameData
-
rotated
protected boolean rotated
-
originX
protected int originX
-
originY
protected int originY
-
width
protected int width
-
height
protected int height
-
frameCounter
protected int frameCounter
-
tickCounter
protected int tickCounter
-
animationCache
protected TextureAnimationCache animationCache
-
-
Method Detail
-
makeAtlasSprite
public static EaglerTextureAtlasSprite makeAtlasSprite(ResourceLocation spriteResourceLocation)
-
setLocationNameClock
public static void setLocationNameClock(java.lang.String clockName)
-
setLocationNameCompass
public static void setLocationNameCompass(java.lang.String compassName)
-
initSprite
public void initSprite(int inX, int inY, int originInX, int originInY, boolean rotatedIn)
-
copyFrom
public void copyFrom(EaglerTextureAtlasSprite atlasSpirit)
-
getOriginX
public int getOriginX()
-
getOriginY
public int getOriginY()
-
getIconWidth
public int getIconWidth()
-
getIconHeight
public int getIconHeight()
-
getMinU
public float getMinU()
-
getMaxU
public float getMaxU()
-
getInterpolatedU
public float getInterpolatedU(double u)
-
getMinV
public float getMinV()
-
getMaxV
public float getMaxV()
-
getInterpolatedV
public float getInterpolatedV(double v)
-
getIconName
public java.lang.String getIconName()
-
updateAnimation
public void updateAnimation()
-
getFrameTextureData
public int[][] getFrameTextureData(int index)
-
getFrameCount
public int getFrameCount()
-
setIconWidth
public void setIconWidth(int newWidth)
-
setIconHeight
public void setIconHeight(int newHeight)
-
loadSprite
public void loadSprite(ImageData[] images, AnimationMetadataSection meta) throws java.io.IOException
- Throws:
java.io.IOException
-
generateMipmaps
public void generateMipmaps(int level)
-
bakeAnimationCache
public void bakeAnimationCache()
-
clearFramesTextureData
public void clearFramesTextureData()
-
hasAnimationMetadata
public boolean hasAnimationMetadata()
-
setFramesTextureData
public void setFramesTextureData(java.util.List<int[][]> newFramesTextureData)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-