mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 03:47:27 +00:00
Added Animation task consumers (much better than animation events)
This commit is contained in:
1 parent
c5c35a1113
commit
a33acee117
2 files changed
+46
-1
No files matched your search
@@ -98,15 +98,18 @@ public class AnimationData implements IAnimationData {
|
||||
this.isClientAnimating = this.allowAnimation && this.animation != null;
|
||||
if (prevIsClientAnimating && (!this.isClientAnimating || this.animation != this.currentClientAnimation)) {
|
||||
EventHooks.onAnimationEnded(this.currentClientAnimation);
|
||||
this.currentClientAnimation.fireEndTask();
|
||||
}
|
||||
if (this.isClientAnimating) {
|
||||
this.currentClientAnimation = this.animation;
|
||||
}
|
||||
|
||||
if (this.animation != null && this.allowAnimation) {
|
||||
this.animation.fireStartTask();
|
||||
if (EventHooks.onAnimationStarted(this.animation))
|
||||
return;
|
||||
EventHooks.onAnimationFrameEntered(this.animation, this.animation.currentFrame());
|
||||
this.animation.fireFrameTask(this.animation.currentFrame);
|
||||
}
|
||||
|
||||
List<EntityPlayer> entities = sendingEntity.worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(
|
||||
|
||||
Reference in new issue
Block a user