public class AnimationMetadataSection
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.List<AnimationFrame> |
animationFrames |
static AnimationMetadataSection |
EMPTY |
private int |
frameHeight |
private int |
frameTime |
private int |
frameWidth |
private boolean |
interpolate |
static AnimationMetadataSectionSerializer |
SERIALIZER |
Constructor and Description |
---|
AnimationMetadataSection(java.util.List<AnimationFrame> animationFramesIn,
int frameWidthIn,
int frameHeightIn,
int frameTimeIn,
boolean interpolateIn) |
Modifier and Type | Method and Description |
---|---|
private AnimationFrame |
getAnimationFrame(int frame) |
int |
getFrameCount() |
int |
getFrameHeight(int defHeightIn) |
int |
getFrameIndex(int frame) |
java.util.Set<java.lang.Integer> |
getFrameIndexSet() |
private com.mojang.datafixers.util.Pair<java.lang.Integer,java.lang.Integer> |
getFrameSize(int defWidthIn,
int defHeightIn) |
int |
getFrameTime() |
int |
getFrameTimeSingle(int frame) |
int |
getFrameWidth(int defWidthIn) |
com.mojang.datafixers.util.Pair<java.lang.Integer,java.lang.Integer> |
getSpriteSize(int widthIn,
int heightIn) |
boolean |
isInterpolate() |
private static boolean |
isMultipleOf(int valMul,
int val) |
public static final AnimationMetadataSectionSerializer SERIALIZER
public static final AnimationMetadataSection EMPTY
private final java.util.List<AnimationFrame> animationFrames
private final int frameWidth
private final int frameHeight
private final int frameTime
private final boolean interpolate
public AnimationMetadataSection(java.util.List<AnimationFrame> animationFramesIn, int frameWidthIn, int frameHeightIn, int frameTimeIn, boolean interpolateIn)
private static boolean isMultipleOf(int valMul, int val)
public com.mojang.datafixers.util.Pair<java.lang.Integer,java.lang.Integer> getSpriteSize(int widthIn, int heightIn)
private com.mojang.datafixers.util.Pair<java.lang.Integer,java.lang.Integer> getFrameSize(int defWidthIn, int defHeightIn)
public int getFrameHeight(int defHeightIn)
public int getFrameWidth(int defWidthIn)
public int getFrameCount()
public int getFrameTime()
public boolean isInterpolate()
private AnimationFrame getAnimationFrame(int frame)
public int getFrameTimeSingle(int frame)
public int getFrameIndex(int frame)
public java.util.Set<java.lang.Integer> getFrameIndexSet()