1. Rigs
  2. Controlling a Rig Instance

Rigs

Controlling a Rig Instance

Learn how to control a Rig Instance.

Selecting the Rig Instance

Before we can control a Rig Instance, we need to be able to select it. The following selectors can be used to select Rig Instances:

Select all Rig Instances
        @e[type=item_display,tag=aj.global.root]

      
Select all Rig Instances from a specific Blueprint
        @e[type=item_display, tag=aj.<export_namespace>.root]

      

Moving and Rotating the Rig Instance

Similar to how we control normal entities in Minecraft, we can move and rotate Rig Instances using the tp or rotate command.

Move a Rig Instance 5 blocks towards positive X
        execute as @e[type=item_display,tag=aj.<export_namespace>.root] at @s run \
	tp @s ~5 ~ ~

      
Rotate a Rig Instance 90 degrees
        execute as @e[type=item_display,tag=aj.<export_namespace>.root] at @s run \
	rotate @s ~90 ~

      
Move a Rig Instance 5 blocks upwards and rotate it 90 degrees
        execute as @e[type=item_display,tag=aj.<export_namespace>.root] at @s run \
	tp @s ~ ~5 ~ ~90 ~

      

Applying Variants

Variants can be applied to the Rig Instance using the desired Variant's apply function.

Apply the angry Variant
        execute as @e[type=item_display,tag=aj.<export_namespace>.root] run \
	function animated_java:<export_namespace>/variants/angry/apply

      

There is no way to remove a Variant individually once it has been applied. To reset the Variant to it's default state, you can apply the default Variant.

Apply the default Variant
        execute as @e[type=item_display,tag=aj.<export_namespace>.root] run \
	function animated_java:<export_namespace>/variants/default/apply

      
WARNING

Applying the default Variant will not remove any NBT the Variant has modified due to bone configs.

You will have to manually reset the NBT to it's default state, or re-summon the Rig Instance.