In ModelEngine, it is possible to use specific prefixes (called Tags) in the bone name or specific bone ids in order to give bones special behaviors.
Please note that the id of each bone is the name of the bone without the Tag. For instance, if we had a bone called
phead_playerhead
phead_playerhead
would be the Complete name of the bonephead_
would be its Tagplayerhead
would be its Id
There are several types of Tags, and each of them brings about a different behavior.
The following is a list of all of them:
General tags
Head
Tag: h_
When mobs look around, the head turns before the rest of the body does. You can do this in Model Engine too!
All bones rotate like a body by default. If you want a bone to rotate like a head, you need to use the h_
Tag. Model Engine will interpret this as a head bone, remove the h_
in the resource pack, and move this part like a normal head.
A model can have multiple head bones so you can create models with multiple heads. Head bone can also have child bones, but all child bones would also need the h_
flag in front to act like a head.
Mount
Id: mount
If you want your mob to be controllable, you can set a specific location to mount on.
Create an empty bone named mount
and place it wherever you like. The mount point can be animated, and if it is parented to another bone, it will follow the parent bone. Otherwise, it will follow the base mob.
Note: In your mob's MythicMob code you'll want to add
drive=true
into your model spawning mechanic to enable mounting, then use Model Engine'smountmodel
mechanic instead of MythicMob'smount
mechanic for mounting the model. (Don't worry about this part until you get to coding!)
Seat
Tag: p_
You can create multiple passenger seats for other players/mobs to mount on. Unlike the driver seat, they cannot control the mount, and can have more than one point.
Create an empty bone and place it wherever you like, then add p_
in front of the bone name. The passenger point can be animated, and if it is parented to another bone, it will follow the parent bone. Otherwise, it will follow the base mob.
Note: Same as the driver seat, you should add
ride=true
in your model spawning mechanic, and usemountmodel{driver=false}
to mount your entity.
Item
Sometimes you would like items to be synced in your model.
You can do so by creating special, cube-less bones with a specific tag written before the actual bone name. Depending of the the tag used, the item that will be displayed will be treated as if it was equipped in the corresponding slot
Head Display
Tag: ih_
Main Hand Display
Tag: ir_
Offhand Display
Tag: il_
You can create as many item bones as you want. You can then equip items there via the SetItemModel mechanic.
Ghost
Tag: g_
Normal ghost bones (bones without cubes inside) are only used internally and do not spawn armor stands. Marking them as rendered would cause them to spawn an armor stand, but will not display any models
You can set the model of a rendered ghost bone using the ChangePart mechanic
Nametag
Tag: tag_
To display the name of the model, or add an HP bar on top, you would need a name tag bone.
Each model can have as many name tag bones as you need. They don't need to be centered, and they can have animations.
To create a name tag bone, add tag_
in front of the bone name.
Once you get to coding, if you want to use a specific tag bone as the display bone of your model, you can use the model mechanic's
nametag
attribute to specify one.
Example: if you had a bone calledtag_yournametag
, your would need to usemodel{mid=your_model;nametag=yournametag}
Leash
Tag: `l_
By making a cube-less bone and using a special tag before the bone name, you can mark a bone as the attachment point when being leashed.
You can create as many bones as you want. You can leash the model using the Leash or LeashSelf mechanics
Hitbox Tags
Meg allows you to add different kinds of sub-hitboxes to the model. Depending on the type, the specific functionalities will vary. The following is a list of all possible sub-hitbox you can employ in your model.
Axis Aligned Bounding Box
Tag: b_
They are like the normal hitbox, but cannot collide with blocks and take suffocation damage. These hitboxes would act like bones and follow their parent, however, they will not rotate with the parent bone, and they must still be square-based.
Create a sub-hitbox by adding a bone starting with b_
and a cube inside. The size of the cube is the hitbox size. Same as the normal hitbox, it must obey Minecraft's hitbox limit, and X and Z values must be the same.
Oriented Bounding Box
Tag: ob_
This type of bounding box is, essentially, an Axis Aligned Bounding Box with the ability to be rotated. These hitboxes would act the same as normal sub-hitboxes, but they can rotate with the parent bone, and they can be any size.
Similar to a normal sub-hitbox, create a bone with a cube inside, but the bone name starts with ob_
, and unlike normal hitboxes, your cube can be any size you want, meaning the X and Z values can be different.
Player Limbs Tags
Player Head
Tag: phead_
Player Right Arm
Tag: prarm_
Player Left Arm
Tag: plarm_
Player Body
Tag: pbody_
Player Right Leg
Tag: prleg_
Player Left Leg
Tag: plleg_