@@ -865,20 +865,28 @@ public PlayerAnimBone get3DTransform(@NotNull PlayerAnimBone bone) {
865865 return IAnimation .DEFAULT_FIRST_PERSON_CONFIG ;
866866 }
867867
868- public void setFirstPersonMode (FirstPersonMode mode ) {
868+ public AnimationController setFirstPersonMode (FirstPersonMode mode ) {
869869 firstPersonMode = (controller ) -> mode ;
870+
871+ return this ;
870872 }
871873
872- public void setFirstPersonModeHandler (Function <AnimationController , FirstPersonMode > modeHandler ) {
874+ public AnimationController setFirstPersonModeHandler (Function <AnimationController , FirstPersonMode > modeHandler ) {
873875 firstPersonMode = modeHandler ;
876+
877+ return this ;
874878 }
875879
876- public void setFirstPersonConfiguration (FirstPersonConfiguration config ) {
880+ public AnimationController setFirstPersonConfiguration (FirstPersonConfiguration config ) {
877881 firstPersonConfiguration = (controller ) -> config ;
882+
883+ return this ;
878884 }
879885
880- public void setFirstPersonConfigurationHandler (Function <AnimationController , FirstPersonConfiguration > configHandler ) {
886+ public AnimationController setFirstPersonConfigurationHandler (Function <AnimationController , FirstPersonConfiguration > configHandler ) {
881887 firstPersonConfiguration = configHandler ;
888+
889+ return this ;
882890 }
883891
884892 @ Override
@@ -890,7 +898,12 @@ public void tick(AnimationData state) {
890898 }
891899 if (!modifiers .isEmpty ())
892900 modifiers .getFirst ().tick (state );
893- else if (this .animationState == State .RUNNING ) tick += 1 ;
901+ else {
902+ handleAnimation (state );
903+ if (this .animationState == State .RUNNING ) {
904+ tick += 1 ;
905+ }
906+ }
894907 }
895908
896909 @ Override
@@ -1042,6 +1055,7 @@ private InternalAnimationAccessor(AnimationController controller) {
10421055
10431056 @ Override
10441057 public void tick (AnimationData state ) {
1058+ this .anim .handleAnimation (state );
10451059 if (this .anim .animationState == State .RUNNING ) this .anim .tick += 1 ;
10461060 }
10471061
0 commit comments