Animations

This page will cover how to create, configure, and control animations for your Animated Java Rig.

Creating an animation

You can create animations just how you would normally for a Bedrock model.

Simply open the Animate tab and click on the New Animation button in the Animations panel.

Animation Properties

Animation Properties Dialog

The animation properties dialog has been modified by Animated Java. Most of the options should be familiar to anyone who has experience with Bedrock animations, but there are a few differences.

Animation Name

Pretty self-explamatory. This is the name of the animation.

Keep in mind that this will be the name used to reference the functions generated by Animated Java.

Animation Loop mode

The loop mode of the animation.

This has 3 options: Loop, Hold on Last Frame, and Play Once.

Loop will loop the animation indefinitely.

Hold on Last Frame will play the animation once, and then hold on the last frame.

Play Once will play the animation once, and then reset to the first frame.

Animation Start Delay

The amount of time (in ticks) to wait before starting the animation after running the play function.

Useful for adding a buffer to the beginning animations without having to shift all of your keyframes around.

Animation Loop Delay

The amount of time (in ticks) to wait before looping the animation again once it's finished.

This is only used if the loop mode is set to Loop.

New Effect Keyframes

Animated Java adds a few new effect keyframe types to the timeline.

New Effect Keyframes

Variants

The Variants keyframe allows you to conditionally apply variants to your model during an animation.

Variants Keyframe

  • Variant

    The variant to apply.

  • Condition

    The condition that must be met for the variant to be applied.

    This is an execute sub-command chain. Eg. if score @s value matches 2 would only apply the variant if the score @s value is equal to 2.

Commands

The Commands keyframe allows you to conditionally run commands during an animation.

Commands Keyframe

  • Commands

    The command(s) to run.

    Each newline will be treated as a separate command. (Exactly like a normal function)

  • Condition

    The condition that must be met for the command to be run.

    This is an execute sub-command chain. Eg. if score @s value matches 2 would only apply the variant if the score @s value is equal to 2.

Scoreboard Data

Global

Global variables and constants are stored in fake players.

  • Loop Mode Constants

    Provide easy access to each loop mode's index.

    • $aj.loop_mode.once aj.i
    • $aj.loop_mode.hold aj.i
    • $aj.loop_mode.loop aj.i
  • Animation ID

    • $aj.<project_name>.animation.<animation_name> aj.id

    Each animation creates a scoreboard constant with the animation ID.

    Internally this is the index of the animation in the Animations panel.

Per Rig

Each animation creates a few local scoreboard objectives that are stored on the Root Entity.

  • Local Anim Time

    • @s aj.<project_name>.animation.<animation_name>.local_anim_time

    The local animation time of the animation.

    This is the time of the animation relative to the start of this specific animation.

  • Loop Mode

    • @s aj.<project_name>.animation.<animation_name>.loop_mode

    The loop mode of the animation.

    This is the index of the Animation Loop Mode property in the animation properties dialog.

    You can use the loop mode constants to access the loop mode index: execute if score @s aj.foo.animation.bar.loop_mode = $aj.loop_mode.once aj.i