In Model Engine, 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.
Inherited Head
Tag: hi_
Same as the Head behavior, but with this tag every child bone will also inherit the
head behavior without the need of using the h_
tag
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 entity, 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
Model Engine 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 limb tags allow a model to use player skin and limb. You can recreate the entire player model, only use parts, or
have multiple of the same parts.
To create a player limb bone, create a bone that starts with one of the tags listed below. Any cubes inside these bones
will be ignored automatically.
If you need some guide on how to create these bones, check out this demo player model.
This is a modified version of Bradleyq's Stable Player Display. It requires core shader, works on vanilla, optifine and sodium, but does not work when modded shaders are used.
Massive thanks to them for sharing this technology. For more information, check out their repository.
Tag | Player Part |
---|---|
phead_ | Head |
prarm_ | Right Arm |
plarm_ | Left Arm |
pbody_ | Body |
prleg_ | Right Leg |
plleg_ | Left leg |