Tutorials
Stacking Rigs
Learn how to stack rigs on top of each other to create dynamic models.
Introduction
"Stacking" is a term used to describe the process of mounting multiple entities on top of eachother.
Using Locators and their Use Entity and On-Summon Commands properties, you can stack multiple rigs on top of each other to add dynamic parts to your model.
Tutorial
Let's take an existing rig (body
) and stack our head rig (head
) on top of it.
Inside of your
body
rig, create a new Locator namedhead_locator
. Position this Locator where you want the head to be mounted.Open up
head_locator
's config and configure the following properties:Enable
Use Entity
Set the
Entity Type
tominecraft:item_display
Set
On-Summon Commands
to
Save and Export both rigs.
In Minecraft, reload your Data Pack and Resource Pack.
Run
/execute rotated 0 0 run function animated_java:body/summon {args: {}}
to summon your body rig.You should see the head rig mounted on top of the body rig.
From here, you can use your own commands to adjust the head
rig's rotation as needed.
To match the head
rig's rotation to the head_locator
's rotation, you can add the following command to the head_locator
's On Tick Commands:
Or, if you wanted it to face the opposite direction:
Common Issues
head
rig falls behind the body
rig when moving.
The - Open up the exported Data Pack, and locate
datapack/animated_java/data/animated_java/tags/function/global/root/on_tick.json
. - Make sure the
head
rig'son_tick
function is listed after thebody
rig'son_tick
function. - You can manually reorder the functions in this file, or rename the
head
rig toz_head
to force it to be listed last.