Skip to content

Commit

Permalink
we don't actually need to provide the parent here.
Browse files Browse the repository at this point in the history
  • Loading branch information
birsy committed Nov 22, 2024
1 parent b120482 commit d784d45
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ public TimedAnimationEntry<P, T> addTimedAnimation(Animation<P, T> animation, in
return entry;
}

public void tick(P parent) {
public void tick() {
this.skeleton.tick();
this.skeleton.bones.forEach((name, bone) -> bone.reset());
this.animate(parent);
this.animate();
this.animations.forEach(animation -> animation.apply(this.parent, this.skeleton));
this.constraints.forEach(constraintEntry -> constraintEntry.constraint.apply());
this.animatePostConstraints(parent);
this.animatePostConstraints();
}
public void animate(P parent) {}
public void animatePostConstraints(P parent) {}
public void animate() {}
public void animatePostConstraints() {}

record ConstraintEntry(Constraint constraint, int priority) {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class LevelRendererMixin {
if (this.level == null) return;
for (Entity entity : this.level.entitiesForRendering()) {
if (entity instanceof SkeletonParent parent) {
if (parent.getAnimator() != null) parent.getAnimator().tick(parent);
if (parent.getAnimator() != null) parent.getAnimator().tick();
}
}
}
Expand Down

0 comments on commit d784d45

Please sign in to comment.