Animated Java logo Animated Java

Variants

Every Variant gets an apply function:

<blueprint_id>/variants/<variant>/apply

It must be run as the root entity of the rig. <variant> is the Variant’s Name from its Variant Config.

execute as @e[tag=my_pack.my_rig.root] run function my_pack:my_rig/variants/angry/apply

It returns success 1, so it also works with execute if function:

execute as @e[tag=my_pack.my_rig.root] if function my_pack:my_rig/variants/angry/apply run say Grr!

To get back to the rig’s base look, apply the Default Variant (variants/default/apply, unless you’ve renamed it).

Other Ways to Apply Variants

  • When summoning: pass the variant argument.

    function my_pack:my_rig/summon {args: {variant: "angry"}}
  • During an animation: add a Variant keyframe to the animation’s Effects. One keyframe can apply several Variants in order. See Effect Keyframes.