Model
Apply the model to the target entity.
Attribute | Aliases | Description | Default |
---|---|---|---|
modelid | m, mid, model | The model id of the model | |
hitbox | h | Should the model override the hitbox | true |
remove | r | Is this mechanic used for removing model | false |
killowner | ko | Remove: Should the base entity be killed | true |
invisible | i, invis | Should the base entity be invisible | true |
damagetint | d, tint | Should the model flash red when damaged | true |
nametag | n, name | The tag bone used to display the name. Do not include the "tag_" prefix. | |
drive | Can this model be driven | false | |
ride | Can this model have passengers | false | |
mode | What animation mode should it use | Config default | |
lockpitch | lp, lpitch | Should the model's pitch be locked | false |
lockyaw | ly, lyaw | Should the model's yaw be locked | false |
step | s | The step height of the model. | 0.5 |
radius | rad | View radius of the model, in blocks. Any value less than or equal to 0 has no effect. |
0 |
Example
- model{m=kindletronsr;d=false;n=nametag;drive=true;ride=true;step=3} @self ~onSpawn
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.
Attribute | Aliases | Description | Default |
---|---|---|---|
modelid | m, mid, model | The model receiving a state change | |
state | s | The state | |
remove | r | Is this mechanic used for removing state | false |
speed | sp | Speed multiplier of the state | 1 |
lerpin | li | Transition tick before playing the animation | 0 |
lerpout | lo | Transition tick after playing the animation | 1 |
ignorelerp | i | Remove: Should the state be instantly removed without transition | false |
Example
- state{mid=kindletronjr;s=attack;li=3;lo=3} @self ~onAttack
This will add an attack
state to the specified model, and gives it 3 ticks to transition in and out of the animation.
MountModel
If the model has driver/passenger bones, mount entities to those bones.
Attribute | Aliases | Description | Default |
---|---|---|---|
driver | d, drive | Is this mechanic mounting a driver | true |
force | f | Should the target be forced to mount on the bone Driver: dismount the original driver and mount the target Passenger: find a seat with the least passengers and mount the target |
false |
autodismount | ad | If the target is already mounted on another seat, should the target dismount from the old seat and mount on the new seat | false |
damagemount | dmg | Can the mounted entity damage the mount | false |
mode | m | What mount mode should the mounted entity useWalking : WASD ground controllerFlying : WASD-Sneak-Jump aerial controller (jump to ascend, shift to descend, shift while mount on ground to dismount)Flying_v16 : WASD-Pitch-Jump aerial controller for 1.16 (look up + space to ascend, look down + space to descend)Force_Walking : Same as Walking, but mounted entity cannot dismountForce_Flying : Same as Flying, but mounted entity cannot dismount |
walking |
modelid | mid, model | Not Driver: The model ID of the passenger bones. | |
pbone | p |
Not Driver: A list of seats searched when mounting entities Format: pbone=seat1,seat2,seat3 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.
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.
- mountmodel{driver=false;mode=Force_Walking;pbone=seat1,seat2,seat3,seat4;dmg=true;mid=mymodel} @PIR{r=5} ~onDamaged
Mount 4 players within a 5 blocks radius to seat1-4 of the model "mymodel" when damaged. Players could not sneak to dismount, but they can hit the mount.
DismountModel
Dismount the target from the model.
Attribute | Aliases | Description | Default |
---|---|---|---|
driver | d, drive | Is this mechanic dismounting a driver | true |
pbone | p | Not Driver: A list of seats searched when dismounting entities 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.
Attribute | Aliases | Description | Default |
---|---|---|---|
pbone | p | A list of seats searched when dismounting entities Format: pbone=seat1,seat2,seat3 |
Example
- dismountall{p=seat1,seat2,seat3,seat4} @self ~onDamaged
Dismount all passengers on seat1-4 when damaged.
Tint
Tint certain parts of the model to said color. Damage tint will not reset this tint.
Attribute | Aliases | Description | Default |
---|---|---|---|
modelid | m, mid, model | The model being tinted | |
partid | p, pid, part | The part being tinted | |
color | c | The color in hex Format: FFFFFF /#FFFFFF
|
FFFFFF |
exactmatch | em, exact, match | Does the part need to match the partid completely If set to false, this will tint all parts with IDs containing partid Example: pid=arm;em=false This will tint both leftarm and rightarm |
true |
Example
- tint{m=kindletronsr;pid=arm;em=false;c=FF0000} @self ~onAttack
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.
Enchant
Enchant or disenchant certain parts of the model.
Attribute | Aliases | Description | Default |
---|---|---|---|
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 If set to false, this will tint all parts with IDs containing partid Example: pid=arm;em=false This will tint both leftarm and rightarm |
true |
Example
- enchant{m=kindletronsr;pid=arm;en=true;em=false} @self ~onDamaged =50%
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.
Attribute | Aliases | Description | Default |
---|---|---|---|
modelid | m, mid, model | The model being removed | |
newmodelid | n, nid, newmodel | The new model being applied |
Example
- swapmodel{m=kindletronjr;nid=kindletronsr} @self ~onDamaged =50%
This will change the entire model of the existing mob when it falls below 50% HP.
ChangePart
Set the part to display a part from a different model. This will not change the location of the bone, only visually change the model.
Attribute | Aliases | Description | Default |
---|---|---|---|
modelid | m, mid, model | The targeted model | |
partid | p, pid, part | The targeted part | |
newmodelid | nm, nmid, newmodel | The model of the new part | |
newpartid | np, npid, newpart | The new part id replacing partid |
Example
- changepart{m=kindletronjr;pid=left_arm;nm=kindletronsr;npid=left_arm} @self ~onSpawn
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.
Attribute | Aliases | Description | Default |
---|---|---|---|
modelid | m, mid, model | The targeted model | |
partid | p, pid, part | The targeted part | |
subpartid | sp, spid, subpart | The new part | |
remove | r | Is this mechanic removing a part |
Petrify
Create a statue of the model. This model will no longer be able to change or move.
Attribute | Aliases | Description | Default |
---|---|---|---|
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
Configure the default states of a model.
Attribute | Aliases | Description | Default |
---|---|---|---|
modelid | m, mid, model | The model being changed | |
type | t | The default state getting changed | |
state | s | Animation name | |
lerpin | li | Lerp in tick | prev |
lerpout | lo | Lerp out tick | prev |
speed | sp | Speed modifier | prev |
Example
- defaultstate{m=kindletronjr;t=walk;s=run} @self ~onDamaged
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
Configure the rotational interaction between the head bone and body bone.
Attribute | Aliases | Description | Default |
---|---|---|---|
headuneven | hu, head | Is the head clamp uneven (used while model is walking) | false |
maxhead | mh, mxh | Maximum angle the head can rotate | 50 |
minhead | mnh | Minimum angle the head can rotate | -maxhead |
bodyuneven | bu, body | Is the body clamp uneven (used while model is idling) | false |
maxbody | mb, mxb | Maximum angle the body can rotate | 50 |
minbody | mnb | Minimum angle the body can rotate | -maxbody |
playermode | m, mode, player | Should the body reorient itself like vanilla mobs | false |
stable | s | Stable angle before the body rotates E.g. if maxbody = 50, and stable = 15, the head can rotate freely until it passes 65 degrees, then the body would snap back to be 50 degrees apart from the head. |
15 |
rdelay | rde | Delay in ticks before the body reorient itself | 10 |
rduration | rdu | How long in ticks would the body take to reorient itself | 10 |
SetModelTag
Set the name displayed on the specified tag bone of the model.
Attribute | Aliases | Description | Default |
---|---|---|---|
modelid | m, mid, model | The targeted model | |
bone | b | The selected bone | |
tag | t | The name, or a placeholder string | |
visible | v | The visibility of the name tag | true |
Example
- setmodeltag{bone=hp_bar;tag=<caster.hp>} @self ~onSpawn
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.
SetModelTagVisible
Set the visibility of the name tag of the model.
Attribute | Aliases | Description | Default |
---|---|---|---|
bone | b | The selected bone | |
visible | v | The visibility of the name tag | false |
Example
- setmodeltagvisible{b=enrage_tag;v=false} @self ~onDamaged =10%
This will hide the model's enraged status tag when it falls below 10% HP.
Disguise
Disguise the targeted player to the model.
Attribute | Aliases | Description | Default |
---|---|---|---|
modelid | m, mod, model | The model id of the disguise | |
seeself | s, see | Can the player see their own disguise | true |
Example
- disguise{m=kindletronjr;s=true} @trigger ~onInteract
This will disguise the player as a Model Engine model.
Undisguise
Remove the model disguise of the targeted player.
Attribute | Aliases | Description | Default |
---|
Example
- undisguise @trigger ~onInteract
This will clear a player's Model Engine disguise.
LockHead
Lock the pitch and yaw rotation of the model.
Attribute | Aliases | Description | Default |
---|---|---|---|
lockpitch | lp, lpitch | Should the pitch be locked | No change |
lockyaw | ly, lyaw | Should the yaw be locked | No change |
Example
- lockhead{lp=true} @self ~onInteract
This will lock the pitch of the model's head when right-clicked.
ChangeParent
Force a part of the model to be child bone of another part. This will not create any new part.
Note: The part would still be using the offset from its old parent.
Attribute | Aliases | Description | Default |
---|---|---|---|
modelid | m, mid, model | The model id of the model | |
parent | p | The new parent of the child part | |
child | c | The targeted child part |
Example
- changeparent{model=guard;parent=left_hand_attach;child=sword} ~onEnterCombat
Make the guard hold the sword with their left hand when in combat, and
- changeparent{model=guard;parent=sheath_attach;child=sword} ~onDropCombat
Make the guard put the sword back into their sheath.
PartVisibility
Set the visibility of a part of the model. This will not remove or add any part.
Attribute | Aliases | Description | Default |
---|---|---|---|
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 If set to false, this will change the visibility of all parts with IDs containing partid Example: pid=arm;em=false This will select both leftarm and rightarm |
true |
Example
- partvisibility{m=kindletronsr;p=right_arm;v=false} @self ~onDamaged =20%
This will make Kindletron Sr's right arm disappear when he goes below 20% health.
BindHitbox
Spawn a mythic mob and bind that mob to a specific sub-hitbox.
Attribute | Aliases | Description | Default |
---|---|---|---|
modelid | m, mid, model | The model id of the sub-hitbox | |
partid | p, pid, part | The id of the sub-hitbox | |
type | t, mob, m | The mythic mob bound to the sub-hitbox | SKELETON |
Example
- bindhitbox{m=kindletronsr;p=b_right_arm;t=KindletronSR_RightArmHitbox} @self ~onSpawn
This will summon a mythic mob that represents Kindletron Sr's right arm sub-hitbox. All triggers would work separately from the base mob.
To target the base mob from the sub-hitbox mob, use @Parent targeter.
HitboxConfig
Configure the interaction between a sub-hitbox and the base mob.
Attribute | Aliases | Description | Default |
---|---|---|---|
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. If value > 0, attack and interact remain. If value <= 0, attack and interact would be canceled. |
1 |
Example
- hitboxconfig{m=kindletronsr;p=b_right_arm;pass=0.5;delay=1} @self ~onSpawn
This will make the right arm hitbox transfer only 50% of the damage received. However, if a mythic mob is bound using 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.
Attribute | Aliases | Description | Default |
---|---|---|---|
modelid | m, mid, model | The model id of the current model | |
newmodelid | n, nid, newmodel | The model id of the new model | |
map | (Optional) The model of a map used to map from newmodel to model |
Example
- remapmodel{m=kindletronsr;n=kindletronsr_enraged} @self ~onDamaged =20%
This will enrage Kindletron Sr and change the appearance of the model. However, all the animations are still using the old model.
If you wish to remap again, please use the initial model id as modelid
. In this scenario, it would be kindletronsr
, not kindletronsr_enraged
.
Leash
Visually link a leash bone to the target.
Attribute | Aliases | Description | Default |
---|---|---|---|
modelid | m, mid, model | The model being changed | |
partid | p, pid, part | Leash bone | |
leash | l | Is leashed to target |
LeashSelf
Link a leash bone to another.
Attribute | Aliases | Description | Default |
---|---|---|---|
modelid | m, mid, model | The model being changed | |
sourceid | s, sid, src, source | The leash bone being leashed | |
destid | d, did, dest | The leash bone holding the leash |
The leash would be visible as long as the destination is in view, or it will disappear. Double leash if you need it to be always visible (leash A to B, then leash B to A)
SwapEntity
Swap the model owner from one entity to the target.
Attribute | Aliases | Description | Default |
---|---|---|---|
modelid | m, mid, model | The targeted model | |
hitbox | h | Should override hitbox | true |
invisible | i, invis | Should the base entity be invisible | true |
step | s | New step height of receiver entity | 0.5 |
radius | rad | View radius of the model | base entity default |
LockModel
Lock all yaw rotation of the model. Useful when trying to execute a skill without the model turning.
Attribute | Aliases | Description | Default |
---|---|---|---|
lock | l | True to lock the model rotation. This would lock both the head and body yaw rotation, but animations do still play. |
true |
SetItemModel
Set the item displayed on an item bone.
Attribute | Aliases | Description | Default |
---|---|---|---|
modelid | m, mid, model | The targeted model | |
bone | b | The targeted item bone | |
item | i | The material name of a vanilla item, or the name of a MM item. If this attribute is not set, it would set the item as AIR. |
If Crucible is installed, then this mechanic will not work at all if used as-is, being overwritten by Crucible's own ModelSet mechanic. In that instance, please use the
meg:SetItemModel
mechanic. If you are trying to use this onSpawn or onLoad, it is advisable to apply a delay first. You need to make sure that the model is applied at all before using this mechanic!