public class IntermittentAnimation<T extends net.minecraft.entity.Entity & IIntermittentEntity>
extends java.lang.Object
| Constructor and Description |
|---|
IntermittentAnimation(T entity,
int duration,
int intervalDuration,
int startPropbability,
boolean isOperator) |
| Modifier and Type | Method and Description |
|---|---|
float |
getAnimationFraction()
Returns a float that represents a fraction of the animation, a value between 0.0F and 1.0F.
|
float |
getAnimationProgressArcTan()
Returns a value between 0.0F and 1.0F depending on the timer and duration of the animation.
|
float |
getAnimationProgressPoly2()
Returns a value between 0.0F and 1.0F depending on the timer and duration of the animation.
|
float |
getAnimationProgressPoly3()
Returns a value between 0.0F and 1.0F depending on the timer and duration of the animation.
|
float |
getAnimationProgressPolyN(int n)
Returns a value between 0.0F and 1.0F depending on the timer and duration of the animation.
|
float |
getAnimationProgressSin()
Returns a value between 0.0F and 1.0F depending on the timer and duration of the animation.
|
float |
getAnimationProgressSinPowerOf(int i)
Returns a value between 0.0F and 1.0F depending on the timer and duration of the animation.
|
float |
getAnimationProgressSinSqrt()
Returns a value between 0.0F and 1.0F depending on the timer and duration of the animation.
|
float |
getAnimationProgressSinToTen()
Returns a value between 0.0F and 1.0F depending on the timer and duration of the animation.
|
float |
getAnimationProgressSinToTenWithoutReturn() |
float |
getAnimationProgressSmooth()
Returns a value between 0.0F and 1.0F depending on the timer and duration of the animation.
|
float |
getAnimationProgressSteep()
Returns a value between 0.0F and 1.0F depending on the timer and duration of the animation.
|
float |
getAnimationProgressTemporary()
Returns a value between 0.0F and 1.0F depending on the timer and duration of the animation.
|
float |
getAnimationProgressTemporaryFS()
Returns a value between 0.0F and 1.0F depending on the timer and duration of the animation.
|
float |
getAnimationProgressTemporaryInvesed()
Returns a value between 0.0F and 1.0F depending on the timer and duration of the animation.
|
int |
getTimeRunning()
Returns the timer of this animation.
|
void |
resetTimeRunning()
Sets the timer to 0.
|
void |
setDuration(int duration)
Sets the duration of the animation in ticks.
|
void |
setID(byte id) |
void |
setTimeRunning(int timeRunning)
Sets the timer to a specific value.
|
void |
start() |
void |
stop()
Decreases the timer by 1.
|
void |
stop(int timeDelta)
Decreases the timer by a specific value.
|
void |
update()
Increases the timer by 1.
|
public IntermittentAnimation(T entity, int duration, int intervalDuration, int startPropbability, boolean isOperator)
public void setID(byte id)
public void setDuration(int duration)
duration - is the maximum number of ticks that the timer can reach.public int getTimeRunning()
public void setTimeRunning(int timeRunning)
timeRunning - is the number of ticks to be set.public void resetTimeRunning()
public void update()
public void start()
public void stop()
public void stop(int timeDelta)
timeDelta - is the number of ticks to be decreased in the timerpublic float getAnimationFraction()
public float getAnimationProgressSmooth()
public float getAnimationProgressSteep()
public float getAnimationProgressSin()
public float getAnimationProgressSinSqrt()
public float getAnimationProgressSinToTen()
public float getAnimationProgressSinToTenWithoutReturn()
public float getAnimationProgressSinPowerOf(int i)
i - is the power of the sine function.public float getAnimationProgressPoly2()
public float getAnimationProgressPoly3()
public float getAnimationProgressPolyN(int n)
n - is the power of the polynomial function.public float getAnimationProgressArcTan()
public float getAnimationProgressTemporary()
public float getAnimationProgressTemporaryFS()
public float getAnimationProgressTemporaryInvesed()