Animation not working

Started by α11яε on

Topic category: Help with MCreator software

Active 4 months ago
Joined Dec 2024
Points:
36

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 4
Animation not working

Executing Gradle task: runClient
Build info: MCreator 2024.4.52410, forge-1.20.1, 64-bit, 16255 MB, Windows 11, JVM 21.0.4, JAVA_HOME: C:\Program Files\Pylo\MCreator\jdk, started on: 2025-01-04-14:04:34

> Task :compileJava FAILED
C:\Users\Razor\MCreatorWorkspaces\first_mod\src\main\java\net\mcreator\firstmod\client\model\animations\CustomModelAnimation.java:16: error: ';' expected public static final AnimationDefinition butterfly.animation=AnimationDefinition.Builder.withLength(0.2917F).looping().addAnimation("bone",new AnimationChannel(AnimationChannel.Targets.ROTATION,new Keyframe(0.0F,KeyframeAnimations.degreeVec(0.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(0.0417F,KeyframeAnimations.degreeVec(0.0F,-6.5F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(0.0833F,KeyframeAnimations.degreeVec(0.0F,-12.5F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(0.125F,KeyframeAnimations.degreeVec(0.0F,-6.5F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(0.1667F,KeyframeAnimations.degreeVec(0.0F,6.5F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(0.2083F,KeyframeAnimations.degreeVec(0.0F,12.5F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(0.25F,KeyframeAnimations.degreeVec(0.0F,6.5F,0.0F),AnimationChannel.Interpolations.LINEAR))).addAnimation("bone2",new AnimationChannel(AnimationChannel.Targets.ROTATION,new Keyframe(0.0F,KeyframeAnimations.degreeVec(0.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(0.0417F,KeyframeAnimations.degreeVec(0.0F,6.5F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(0.0833F,KeyframeAnimations.degreeVec(0.0F,12.5F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(0.125F,KeyframeAnimations.degreeVec(0.0F,6.5F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(0.1667F,KeyframeAnimations.degreeVec(0.0F,-6.5F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(0.2083F,KeyframeAnimations.degreeVec(0.0F,-12.5F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(0.25F,KeyframeAnimations.degreeVec(0.0F,-6.5F,0.0F),AnimationChannel.Interpolations.LINEAR))).build();
^
C:\Users\Razor\MCreatorWorkspaces\first_mod\src\main\java\net\mcreator\firstmod\client\model\animations\CustomModelAnimation.java:16: error: expected public static final AnimationDefinition butterfly.animation=AnimationDefinition.Builder.withLength(0.2917F).looping().addAnimation("bone",new AnimationChannel(AnimationChannel.Targets.ROTATION,new Keyframe(0.0F,KeyframeAnimations.degreeVec(0.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(0.0417F,KeyframeAnimations.degreeVec(0.0F,-6.5F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(0.0833F,KeyframeAnimations.degreeVec(0.0F,-12.5F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(0.125F,KeyframeAnimations.degreeVec(0.0F,-6.5F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(0.1667F,KeyframeAnimations.degreeVec(0.0F,6.5F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(0.2083F,KeyframeAnimations.degreeVec(0.0F,12.5F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(0.25F,KeyframeAnimations.degreeVec(0.0F,6.5F,0.0F),AnimationChannel.Interpolations.LINEAR))).addAnimation("bone2",new AnimationChannel(AnimationChannel.Targets.ROTATION,new Keyframe(0.0F,KeyframeAnimations.degreeVec(0.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(0.0417F,KeyframeAnimations.degreeVec(0.0F,6.5F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(0.0833F,KeyframeAnimations.degreeVec(0.0F,12.5F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(0.125F,KeyframeAnimations.degreeVec(0.0F,6.5F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(0.1667F,KeyframeAnimations.degreeVec(0.0F,-6.5F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(0.2083F,KeyframeAnimations.degreeVec(0.0F,-12.5F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(0.25F,KeyframeAnimations.degreeVec(0.0F,-6.5F,0.0F),AnimationChannel.Interpolations.LINEAR))).build();
^
2 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
> Run with --info option to get more log output.
> Run with --scan to get full insights.
BUILD FAILED in 1s
1 actionable task: 1 executed

BUILD FAILED
Task completed in 1 second

 

butterfly.animation is not…
Sat, 01/04/2025 - 15:02

butterfly.animation

is not a valid Java identifier. You can't include dots in Java names. The animation code you provided is thus not valid.

For posting logs on forums, please also check General Publishing Guidelines.

Active 4 days ago
Joined Feb 2025
Points:
31

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 9
So how do i fix this? I…
Wed, 02/05/2025 - 11:20

So how do i fix this? I removed ALL the dots from animation name. NOTHING is working... I am making a doors mod and i have the same error: Task :compileJava
C:\Users\Admin\MCreatorWorkspaces\doors_mod_by_ezzidze\src\main\java\net\mcreator\doorsmodbyezzidze\client\model\animations\hv_giggleAnimation.java:16: error: ';' expected public static final AnimationDefinition idle.animation.json=AnimationDefinition.Builder.withLength(8.0F).looping().addAnimation("bone",new AnimationChannel(AnimationChannel.Targets.ROTATION,new Keyframe(0.0F,KeyframeAnimations.degreeVec(0.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(3.5417F,KeyframeAnimations.degreeVec(0.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(4.25F,KeyframeAnimations.degreeVec(0.0F,-45.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(5.0F,KeyframeAnimations.degreeVec(0.0F,-45.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(5.5F,KeyframeAnimations.degreeVec(0.0F,-32.5F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(5.75F,KeyframeAnimations.degreeVec(0.0F,17.5F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(7.0F,KeyframeAnimations.degreeVec(0.0F,17.5F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(7.25F,KeyframeAnimations.degreeVec(0.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR))).addAnimation("bone10",new AnimationChannel(AnimationChannel.Targets.ROTATION,new Keyframe(3.5F,KeyframeAnimations.degreeVec(0.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(4.0F,KeyframeAnimations.degreeVec(45.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(4.25F,KeyframeAnimations.degreeVec(-27.5F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(5.0F,KeyframeAnimations.degreeVec(-27.5F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(5.5F,KeyframeAnimations.degreeVec(-72.5F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(5.75F,KeyframeAnimations.degreeVec(-22.5F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(7.0F,KeyframeAnimations.degreeVec(-22.5F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(7.25F,KeyframeAnimations.degreeVec(0.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR))).addAnimation("bone11",new AnimationChannel(AnimationChannel.Targets.ROTATION,new Keyframe(3.5F,KeyframeAnimations.degreeVec(0.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(4.0F,KeyframeAnimations.degreeVec(0.0F,0.0F,22.5F),AnimationChannel.Interpolations.LINEAR),new Keyframe(4.25F,KeyframeAnimations.degreeVec(0.0F,0.0F,15.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(5.0F,KeyframeAnimations.degreeVec(0.0F,0.0F,15.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(7.0F,KeyframeAnimations.degreeVec(0.0F,0.0F,15.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(7.25F,KeyframeAnimations.degreeVec(0.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR))).addAnimation("bone7",new AnimationChannel(AnimationChannel.Targets.ROTATION,new Keyframe(3.5F,KeyframeAnimations.degreeVec(0.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(4.0F,KeyframeAnimations.degreeVec(-34.7045F,-3.333F,-3.7393F),AnimationChannel.Interpolations.LINEAR),new Keyframe(4.25F,KeyframeAnimations.degreeVec(12.7955F,-3.333F,-3.7393F),AnimationChannel.Interpolations.LINEAR),new Keyframe(5.0F,KeyframeAnimations.degreeVec(12.8F,-3.33F,-3.74F),AnimationChannel.Interpolations.LINEAR),new Keyframe(5.5F,KeyframeAnimations.degreeVec(69.6483F,17.113F,21.7271F),AnimationChannel.Interpolations.LINEAR),new Keyframe(5.75F,KeyframeAnimations.degreeVec(-14.5923F,8.6813F,-2.2027F),AnimationChannel.Interpolations.LINEAR),new Keyframe(7.0F,KeyframeAnimations.degreeVec(0.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR))).addAnimation("bone8",new AnimationChannel(AnimationChannel.Targets.ROTATION,new Keyframe(5.0F,KeyframeAnimations.degreeVec(0.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR))).addAnimation("Body",new AnimationChannel(AnimationChannel.Targets.ROTATION,new Keyframe(0.0F,KeyframeAnimations.degreeVec(0.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(1.0F,KeyframeAnimations.degreeVec(-10.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(3.0F,KeyframeAnimations.degreeVec(2.5F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(3.5F,KeyframeAnimations.degreeVec(2.5F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(7.0F,KeyframeAnimations.degreeVec(2.5F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(7.25F,KeyframeAnimations.degreeVec(0.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR))).build();
^
C:\Users\Admin\MCreatorWorkspaces\doors_mod_by_ezzidze\src\main\java\net\mcreator\doorsmodbyezzidze\client\model\animations\hv_giggleAnimation.java:16: error: expected public static final AnimationDefinition idle.animation.json=AnimationDefinition.Builder.withLength(8.0F).looping().addAnimation("bone",new AnimationChannel(AnimationChannel.Targets.ROTATION,new Keyframe(0.0F,KeyframeAnimations.degreeVec(0.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(3.5417F,KeyframeAnimations.degreeVec(0.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(4.25F,KeyframeAnimations.degreeVec(0.0F,-45.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(5.0F,KeyframeAnimations.degreeVec(0.0F,-45.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(5.5F,KeyframeAnimations.degreeVec(0.0F,-32.5F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(5.75F,KeyframeAnimations.degreeVec(0.0F,17.5F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(7.0F,KeyframeAnimations.degreeVec(0.0F,17.5F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(7.25F,KeyframeAnimations.degreeVec(0.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR))).addAnimation("bone10",new AnimationChannel(AnimationChannel.Targets.ROTATION,new Keyframe(3.5F,KeyframeAnimations.degreeVec(0.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(4.0F,KeyframeAnimations.degreeVec(45.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(4.25F,KeyframeAnimations.degreeVec(-27.5F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(5.0F,KeyframeAnimations.degreeVec(-27.5F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(5.5F,KeyframeAnimations.degreeVec(-72.5F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(5.75F,KeyframeAnimations.degreeVec(-22.5F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(7.0F,KeyframeAnimations.degreeVec(-22.5F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(7.25F,KeyframeAnimations.degreeVec(0.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR))).addAnimation("bone11",new AnimationChannel(AnimationChannel.Targets.ROTATION,new Keyframe(3.5F,KeyframeAnimations.degreeVec(0.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(4.0F,KeyframeAnimations.degreeVec(0.0F,0.0F,22.5F),AnimationChannel.Interpolations.LINEAR),new Keyframe(4.25F,KeyframeAnimations.degreeVec(0.0F,0.0F,15.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(5.0F,KeyframeAnimations.degreeVec(0.0F,0.0F,15.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(7.0F,KeyframeAnimations.degreeVec(0.0F,0.0F,15.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(7.25F,KeyframeAnimations.degreeVec(0.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR))).addAnimation("bone7",new AnimationChannel(AnimationChannel.Targets.ROTATION,new Keyframe(3.5F,KeyframeAnimations.degreeVec(0.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(4.0F,KeyframeAnimations.degreeVec(-34.7045F,-3.333F,-3.7393F),AnimationChannel.Interpolations.LINEAR),new Keyframe(4.25F,KeyframeAnimations.degreeVec(12.7955F,-3.333F,-3.7393F),AnimationChannel.Interpolations.LINEAR),new Keyframe(5.0F,KeyframeAnimations.degreeVec(12.8F,-3.33F,-3.74F),AnimationChannel.Interpolations.LINEAR),new Keyframe(5.5F,KeyframeAnimations.degreeVec(69.6483F,17.113F,21.7271F),AnimationChannel.Interpolations.LINEAR),new Keyframe(5.75F,KeyframeAnimations.degreeVec(-14.5923F,8.6813F,-2.2027F),AnimationChannel.Interpolations.LINEAR),new Keyframe(7.0F,KeyframeAnimations.degreeVec(0.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR))).addAnimation("bone8",new AnimationChannel(AnimationChannel.Targets.ROTATION,new Keyframe(5.0F,KeyframeAnimations.degreeVec(0.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR))).addAnimation("Body",new AnimationChannel(AnimationChannel.Targets.ROTATION,new Keyframe(0.0F,KeyframeAnimations.degreeVec(0.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(1.0F,KeyframeAnimations.degreeVec(-10.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(3.0F,KeyframeAnimations.degreeVec(2.5F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(3.5F,KeyframeAnimations.degreeVec(2.5F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(7.0F,KeyframeAnimations.degreeVec(2.5F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR),new Keyframe(7.25F,KeyframeAnimations.degreeVec(0.0F,0.0F,0.0F),AnimationChannel.Interpolations.LINEAR))).build();
^
2 errors
> Task :compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
> Run with --info option to get more log output.
> Run with --scan to get full insights.
BUILD FAILED in 3s
1 actionable task: 1 executed

BUILD FAILED
Task completed in 3 seconds

idle.animation.json is not…
Wed, 02/05/2025 - 18:13

idle.animation.json

is not a valid Java identifier. You can't include dots in Java names. The animation code you provided is thus not valid.

For posting logs and code on forums, please also check General Publishing Guidelines.

Active 4 days ago
Joined Feb 2025
Points:
31

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 9
You said i can't include…
Thu, 02/06/2025 - 10:16

You said i can't include dots, but i deleted all dots and same error appeared, nothing worked

Active 4 days ago
Joined Feb 2025
Points:
31

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 9
GiggleAnimation.java:16, the…
Fri, 02/07/2025 - 18:32

GiggleAnimation.java:16, the dot between animation and Java makes error?

Active 4 days ago
Joined Feb 2025
Points:
31

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 9
Also, I read the rules and…
Fri, 02/07/2025 - 18:52

Also, I read the rules and will send only the error

the dot between animation…
Sat, 02/08/2025 - 17:13

the dot between animation and Java makes error?

Yes. Dot is not a valid character for Java names. Only English letters, numbers, and underscore