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
bodyrig, 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 EntitySet the
Entity Typetominecraft:item_displaySet
On-Summon Commandsto
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
The head rig falls behind the body rig when moving.
- Open up the exported Data Pack, and locate
datapack/animated_java/data/animated_java/tags/function/global/root/on_tick.json. - Make sure the
headrig'son_tickfunction is listed after thebodyrig'son_tickfunction. - You can manually reorder the functions in this file, or rename the
headrig toz_headto force it to be listed last.
Support Us!