Introduction
“Stacking” is the process of mounting multiple entities on top of each other.
Using Locators and their Use Entity and On-Summon Function properties, you can stack multiple rigs 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 Functiontofunction animated_java:head/summon {args:{}} ride @n[type=item_frame,tag=aj.head.root,distance=..0.01] mount @s
Save and export both rigs (see Your First Blueprint for export instructions).
In Minecraft, reload your Data Pack and Resource Pack.
Run the following command to summon your body rig.
execute rotated 0 0 run function animated_java:body/summon {args: {}}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.
Common Issues
The
headrig falls behind thebodyrig when moving.This commonly happens when mounting the
bodyroot entity on an entity, then moving that entity viaMotion(or the entity moving itself).The only (known) way to keep this connection seemless is to use the
tpcommand to move the rig.