mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 01:05:12 +00:00
Removed millisecond ticks and tick duration from animations.
This commit is contained in:
1 parent
e5673a85e7
commit
3b9c38124e
12 files changed
+54
-192
No files matched your search
@@ -14,7 +14,6 @@ public class Frame implements IFrame {
|
||||
public Animation parent;
|
||||
public HashMap<EnumAnimationPart,FramePart> frameParts = new HashMap<>();
|
||||
public int duration = 0;
|
||||
public int tickDuration = 50;
|
||||
|
||||
boolean customized = false;
|
||||
public float speed = 1.0F;
|
||||
@@ -77,15 +76,6 @@ public class Frame implements IFrame {
|
||||
return this;
|
||||
}
|
||||
|
||||
public int tickDuration() {
|
||||
return !this.customized && this.parent != null ? this.parent.tickDuration : this.tickDuration;
|
||||
}
|
||||
|
||||
public IFrame setTickDuration(int tickDuration) {
|
||||
this.tickDuration = tickDuration;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isCustomized() {
|
||||
return customized;
|
||||
}
|
||||
@@ -148,18 +138,9 @@ public class Frame implements IFrame {
|
||||
smooth = compound.getByte("Smooth");
|
||||
}
|
||||
|
||||
if (compound.hasKey("TickDuration")) {
|
||||
customized = true;
|
||||
this.tickDuration = compound.getInteger("TickDuration");
|
||||
} else if(compound.hasKey("RenderTicks")){
|
||||
customized = true;
|
||||
this.tickDuration = compound.getBoolean("RenderTicks") ? 20 : 50;
|
||||
}
|
||||
|
||||
if (!customized && parent != null) {
|
||||
this.speed = parent.speed;
|
||||
this.smooth = parent.smooth;
|
||||
this.tickDuration = parent.tickDuration;
|
||||
}
|
||||
|
||||
HashMap<EnumAnimationPart,FramePart> frameParts = new HashMap<>();
|
||||
@@ -186,7 +167,6 @@ public class Frame implements IFrame {
|
||||
if(customized){
|
||||
compound.setFloat("Speed", speed);
|
||||
compound.setByte("Smooth", smooth);
|
||||
compound.setInteger("TickDuration", tickDuration);
|
||||
}
|
||||
|
||||
NBTTagList list = new NBTTagList();
|
||||
@@ -209,7 +189,6 @@ public class Frame implements IFrame {
|
||||
frame.customized = this.customized;
|
||||
frame.speed = this.speed;
|
||||
frame.smooth = this.smooth;
|
||||
frame.tickDuration = this.tickDuration;
|
||||
frame.colorMarker = this.colorMarker;
|
||||
return frame;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user