Removed millisecond ticks and tick duration from animations.

This commit is contained in:
luisc committed 2025-02-12 12:15:33 -06:00
1 parent e5673a85e7
commit 3b9c38124e
12 files changed
+54 -192

No files matched your search

@@ -26,7 +26,6 @@ public class Animation implements IAnimation {
public float speed = 1.0F;
public byte smooth = 0;
public int loop = -1; //If greater than 0 and less than the amount of frames, the animation will begin looping when it reaches this frame.
public int tickDuration = 50;
public boolean whileStanding = true;
public boolean whileAttacking = true;
@@ -99,15 +98,6 @@ public class Animation implements IAnimation {
return this.name;
}
public int tickDuration() {
return this.tickDuration;
}
public IAnimation setTickDuration(int tickDuration) {
this.tickDuration = tickDuration;
return this;
}
public IAnimation setSpeed(float speed) {
this.speed = speed;
return this;
@@ -179,7 +169,7 @@ public class Animation implements IAnimation {
public long getTotalTime() {
long time = 0;
for (Frame frame : this.frames) {
time += (long) frame.duration * (frame.customized ? frame.tickDuration : this.tickDuration);
time += frame.duration;
}
return time;
}
@@ -197,12 +187,6 @@ public class Animation implements IAnimation {
smooth = compound.getByte("Smooth");
loop = compound.getInteger("Loop");
if (compound.hasKey("TickDuration")) {
this.tickDuration = compound.getInteger("TickDuration");
} else if(compound.hasKey("RenderTicks")){
this.tickDuration = compound.getBoolean("RenderTicks") ? 20 : 50;
}
ArrayList<Frame> frames = new ArrayList<Frame>();
NBTTagList list = compound.getTagList("Frames", 10);
for (int i = 0; i < list.tagCount(); i++) {
@@ -229,7 +213,6 @@ public class Animation implements IAnimation {
compound.setFloat("Speed", speed);
compound.setByte("Smooth", smooth);
compound.setInteger("Loop",loop);
compound.setInteger("TickDuration", tickDuration);
NBTTagList list = new NBTTagList();
for(Frame frame : frames){