This will apply the model to the caster when it spawns. It will also set a few conditions. Such as disabling damage tint, displaying the name on a bone named `nametag`, allowing a driver and passengers to mount the model, and letting the model step up blocks up to 3 blocks tall automatically.
***
## State
Tell the model to start or stop playing an animation.
| driver | d, drive | Is this mechanic mounting a driver | true |
| force | f | Should the target be forced to mount on the bone<br>Driver: dismount the original driver and mount the target<br>Passenger: find a seat with the least passengers and mount the target | false |
| damagemount | dmg | Can the mounted entity damage the mount | false |
| mode | m | What mount mode should the mounted entity use<br>**Walking**: WASD ground controller<br>**Flying**: WASD-Sneak-Jump aerial controller (jump to ascend, shift to descend, shift while mount on ground to dismount)<br>**Flying_v16**: WASD-Pitch-Jump aerial controller for 1.16 (look up + space to ascend, look down + space to descend)<br>**Force_Walking**: Same as Walking, but mounted entity cannot dismount<br>**Force_Flying**: Same as Flying, but mounted entity cannot dismount | walking |
| pbone | p | Not Driver: A list of seats searched when mounting entities<br>Format: pbone=seat1,seat2,seat3<br>If force is not enabled, this will fill all the seats until no more passengers can be mounted. | |
>Note: Minecraft 1.16 has a bug where player dismount happens client-sided, which means the server cannot intercept it. Hence, all force mode would not work for 1.16 clients, and must use flying_v16 for flying. For more information, read [MC-202202](https://bugs.mojang.com/browse/MC-202202).
### Example
`- mountmodel{mode=flying} @trigger ~onInteract`
Mount the player to the mount point when right-clicked, and gives the player flying control. If there is already a driver, it will not do anything.
| driver | d, drive | Is this mechanic dismounting a driver | true |
| pbone | p | Not Driver: A list of seats searched when dismounting entities<br>Format: pbone=seat1,seat2,seat3 | |
### Example
`- dismountmodel{p=seat1} @self ~onTimer:100`
Dismount any entities on seat1 every 100 ticks.
***
## DismountAll
Dismount all passengers on the model. To dismount a driver, see [DismountModel](https://github.com/Ticxo/Model-Engine-Wiki/wiki/Mechanics#dismountmodel).
| modelid | m, mid, model | The model being tinted | |
| partid | p, pid, part | The part being tinted | |
| color | c | The color in hex<br>Format: `FFFFFF`/`#FFFFFF` | FFFFFF |
| exactmatch | em, exact, match | Does the part need to match the partid completely<br>If set to false, this will tint all parts with IDs containing partid<br>Example: pid=arm;em=false<br>This will tint both leftarm and rightarm | true |
This will tint both arms of the model when the mob attacks. Since `em=false`, any bone with IDs containing `arm` (right_arm / left_arm) will be tinted.
| modelid | m, mid, model | The model being tinted | |
| partid | p, pid, part | The part being tinted | |
| enchant | en | Is this mechanic enchanting part or disenchanting | true |
| exactmatch | em, exact, match | Does the part need to match the partid completely<br>If set to false, this will tint all parts with IDs containing partid<br>Example: pid=arm;em=false<br>This will tint both leftarm and rightarm | true |
This will enchant both of the model's arms, when the mob falls below 50% HP. Since `em=false`, any bone with IDs containing `arm` (right_arm / left_arm) will be enchanted.
***
## SwapModel
Macro mechanic for adding and removing models at the same time.
This will change Kindletron Jr's left arm to Kindletron Sr's left arm when it spawns. Yes, you can mix & match parts from different models with this mechanic! Note that the location of a bone cannot change, therefore in this example, Kindletron Jr would have one giant floating arm!
***
## SubModel
Add or remove a part of a different model to the targeted model. This will create all child bones contained in the substitution, with the offset and rotation taken from the model.
| modelid | m, mid, model | The targeted model | |
### Example
`- petrify{m=kindletronjr} @self ~onDeath`
This will create a statue of Kindletron Jr when he dies. Note that petrify does kill the mob that the model is "riding" on, with no way of removing it!
***
## DefaultState
Set the default state to a different state. This is for changing automatic states such as idle animation.
This will set Kindletron Jr's walking animation to a running animation. This is very useful when combined with stance & auras! I personally use this when passive mobs "flee" from the player, then run another `defaultstate` mechanic after the mob has disengaged from combat.
***
## BodyClamp
Set the maximum head rotation before rotating the body. This effect can be seen on player models, where the body will stay stationary before the head rotates beyond 50 degrees.
| modelid | m, mid, model | The targeted model | |
| clamp | c, angle | The maximum head rotation before the body moves with the head | 50 |
### Example
`- bodyclamp{m=kindletronsr;c=10} @self ~onSpawn`
This will set the amount of rotation limit of the "neck" before the body begins to rotate with it. Note how all mobs in Minecraft have neck rotations, before also moving their body to follow the player!
***
## SetModelTag
Set the name displayed on the name tag of the model.
This will find a nametag bone called `hp_bar` and set it to display the caster's HP on spawn. The value would update automatically without ~onTimer trigger.
| modelid | m, mod, model | The model id of the model | |
| partid | p, pid, part | The targeted part | |
| visibility | v, visible | Should the part be visible | false |
| exactmatch | em, exact, match | Does the part need to match the partid completely<br>If set to false, this will change the visibility of all parts with IDs containing partid<br>Example: pid=arm;em=false<br>This will select both leftarm and rightarm | true |
| modelid | m, mid, model | The model id of the sub-hitbox | |
| partid | p, pid, part | The id of the sub-hitbox | |
| pass | | Percentage of damage passed to base mob.<br>If value > 0, attack and interact remain.<br>If value <= 0, attack and interact would be canceled. | 1 |
This will make the right arm hitbox transfer only 50% of the damage received. However, if a mythic mob is bound using [BindHitbox](https://github.com/Ticxo/Model-Engine-Wiki/wiki/Mechanics#bindhitbox), the mythic mob would take full damage.
Add a delay to the mechanic to ensure the bone is correctly initialized.
***
## RemapModel
Remap a new model to the current model, part by part.