mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-27 05:02:56 +00:00
Merge branch 'janino-scripts' into syntax-highlighter-unified
This commit is contained in:
commit
0f27ef2628
8 files changed
+729
-5
No files matched your search
@@ -360,7 +360,7 @@ public class Animation implements IAnimation {
|
||||
* to the new local instance on entity's AnimationData,
|
||||
* and clear them from the global instance.
|
||||
*/
|
||||
public void takeTasksFrom(Animation animation) {
|
||||
public void moveFromGlobalToLocal(Animation animation) {
|
||||
this.onAnimationStart = animation.onAnimationStart;
|
||||
this.onAnimationFrame = animation.onAnimationFrame;
|
||||
this.onAnimationEnd = animation.onAnimationEnd;
|
||||
@@ -368,6 +368,9 @@ public class Animation implements IAnimation {
|
||||
animation.onAnimationEnd = null;
|
||||
animation.onAnimationFrame = null;
|
||||
animation.onAnimationStart = null;
|
||||
|
||||
this.dataStore.putAll(animation.dataStore);
|
||||
animation.dataStore.clear();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -272,7 +272,7 @@ public class AnimationData implements IAnimationData {
|
||||
newAnim.currentFrame = 0;
|
||||
newAnim.currentFrameTime = 0;
|
||||
newAnim.parent = this;
|
||||
newAnim.takeTasksFrom((Animation) animation);
|
||||
newAnim.moveFromGlobalToLocal((Animation) animation);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user