Class EaglerTextureAtlasSprite
- java.lang.Object
-
- net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite
-
- Direct Known Subclasses:
TextureClock,TextureCompass
public class EaglerTextureAtlasSprite extends java.lang.ObjectCopyright (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 TextureAnimationCacheanimationCacheprotected intframeCounterprotected java.util.List<int[][]>framesTextureDataprotected intheightprotected int[][]interpolatedFrameDataprotected intoriginXprotected intoriginYprotected booleanrotatedprotected inttickCounterprotected intwidth
-
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 voidbakeAnimationCache()voidclearFramesTextureData()voidcopyFrom(EaglerTextureAtlasSprite atlasSpirit)voidgenerateMipmaps(int level)intgetFrameCount()int[][]getFrameTextureData(int index)intgetIconHeight()java.lang.StringgetIconName()intgetIconWidth()floatgetInterpolatedU(double u)floatgetInterpolatedV(double v)floatgetMaxU()floatgetMaxV()floatgetMinU()floatgetMinV()intgetOriginX()intgetOriginY()booleanhasAnimationMetadata()voidinitSprite(int inX, int inY, int originInX, int originInY, boolean rotatedIn)voidloadSprite(ImageData[] images, AnimationMetadataSection meta)static EaglerTextureAtlasSpritemakeAtlasSprite(ResourceLocation spriteResourceLocation)voidsetFramesTextureData(java.util.List<int[][]> newFramesTextureData)voidsetIconHeight(int newHeight)voidsetIconWidth(int newWidth)static voidsetLocationNameClock(java.lang.String clockName)static voidsetLocationNameCompass(java.lang.String compassName)java.lang.StringtoString()voidupdateAnimation()
-
-
-
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:
toStringin classjava.lang.Object
-
-