mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 15:45:10 +00:00
Removed "render ticks" tick type. Instead, animations and frames can define a tick speed measured in milliseconds. Animations/frames using MC tick type will be 50ms (1000ms/20), and render ticks 20ms.
This commit is contained in:
1 parent
de909472b3
commit
799631eece
11 files changed
+97
-95
No files matched your search
@@ -24,7 +24,7 @@ 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 boolean renderTicks = false; // If true, MC ticks are used. If false, render ticks are used.
|
||||
public int tickDuration = 50;
|
||||
|
||||
public boolean whileStanding = true;
|
||||
public boolean whileAttacking = true;
|
||||
@@ -93,6 +93,15 @@ 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;
|
||||
@@ -111,15 +120,6 @@ public class Animation implements IAnimation {
|
||||
return this.smooth;
|
||||
}
|
||||
|
||||
public IAnimation useRenderTicks(boolean renderTicks) {
|
||||
this.renderTicks = renderTicks;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean useRenderTicks() {
|
||||
return this.renderTicks;
|
||||
}
|
||||
|
||||
public IAnimation doWhileStanding(boolean whileStanding) {
|
||||
this.whileStanding = whileStanding;
|
||||
return this;
|
||||
@@ -183,8 +183,6 @@ public class Animation implements IAnimation {
|
||||
smooth = compound.getByte("Smooth");
|
||||
loop = compound.getInteger("Loop");
|
||||
|
||||
renderTicks = compound.getBoolean("RenderTicks");
|
||||
|
||||
ArrayList<Frame> frames = new ArrayList<Frame>();
|
||||
NBTTagList list = compound.getTagList("Frames", 10);
|
||||
for (int i = 0; i < list.tagCount(); i++) {
|
||||
@@ -209,8 +207,6 @@ public class Animation implements IAnimation {
|
||||
compound.setByte("Smooth", smooth);
|
||||
compound.setInteger("Loop",loop);
|
||||
|
||||
compound.setBoolean("RenderTicks", renderTicks);
|
||||
|
||||
NBTTagList list = new NBTTagList();
|
||||
for(Frame frame : frames){
|
||||
NBTTagCompound item = frame.writeToNBT();
|
||||
|
||||
Reference in new issue
Block a user