ModelEngine
Server-side 3D models and animation for Minecraft, driven by Blockbench files and delivered through a generated resource pack β no client mod required. This page covers the bone/cube model, the full bone-tag vocabulary, importing, mounts, the meg mechanic and condition indexes, and configuration.
ModelEngine (often abbreviated MEG) is a Paper/Spigot plugin. It works standalone via its API, but in practice it is driven from MythicMobs skills. Syntax here targets the R4.1.x line. Its wiki is hosted separately from the other Mythic plugins, on git.lumine.io.
How it works
ModelEngine takes a Blockbench Generic or Bedrock model and splits it into multiple resource-pack item models, one per bone. In-game each bone is represented by a display entity wearing its piece on its head, and the plugin animates those pieces every tick. Because everything is expressed as vanilla item models plus entity transforms, an unmodified client renders it.
Two consequences follow, and both matter constantly:
- Each bone that holds geometry costs an entity β so bone count is a performance budget, not a free abstraction.
- Cubes must obey Minecraft's item-model restrictions, while bones need not (see below).
Bones vs cubes
A cube is an individual box. A bone is a folder (a group in the Blockbench outliner) that contains cubes. The distinction drives what you can and cannot animate:
| Cube | Bone | |
|---|---|---|
| Rotation values | Only 0, Β±22.5, Β±45 degrees. 90 and 67.5 are not allowed. | Unrestricted. |
| Rotation axes | Only one axis may be rotated. | Unrestricted. |
| Cost | Free β cubes are geometry inside a bone's model. | A bone containing geometry costs one display entity. |
A bone with no cubes in it is a virtual bone and costs no entity β which is why mount points, seats and leash anchors are all cube-less bones.
Balance the two. You can build a model entirely out of bones to escape the rotation limits, but every geometry-bearing bone is another entity to track and send to clients. Model in cubes where the shape is static and reserve bones for things that must move independently. Also: model facing North β ModelEngine treats North as forward, and the Blockbench grid is 16 Γ 16 pixels, i.e. one block.
Bone tags & behaviors
Special behaviour is requested by naming, not configuration. A bone name is <tag><id> β for phead_playerhead, the tag is phead_ and the bone's id is playerhead. ModelEngine strips the tag when generating the pack.
| Tag / id | Behavior |
|---|---|
| General | |
h_ | Head β rotates like a head rather than a body. A model may have several. Child bones each need their own h_. |
hi_ | Inherited head β as h_, but every child inherits head behaviour without its own tag. |
mount (id, not a tag) | Driver seat β a cube-less bone named exactly mount marks the controllable mount point. Can be animated and parented. |
p_ | Passenger seat β additional, non-controlling seats. Any number. |
ih_ | Item display, head slot β renders the entity's head-slot item. |
ir_ | Item display, main hand. |
il_ | Item display, offhand. |
g_ | Ghost β bone exists for structure but is not rendered. |
tag_ | Nametag anchor point. |
l_ | Leash attachment point; used by the leash / leashSelf mechanics. Any number. |
| Inverse kinematics | |
seg_ / segf_ | Segment β procedurally follows its parent with minimal movement; for long dynamic bodies (worms, chains). Creates a separate child pivot. seg_ puts the pivot at the back, segf_ at the front. |
tl_ / tlf_ | Tail β visually identical to segment but reuses the base pivot. Use when the tail stays near the model; use segment when it travels far enough that bones would otherwise not move in world space. |
| Hitboxes | |
b_ | Axis-aligned bounding box sub-hitbox. |
ob_ | Oriented bounding box sub-hitbox. |
- R4.0.7 The
seg_andtl_tags may only be used on cube-less bones, and the bone's pivot should sit at the back. Both are further configured with thesegmentmechanic. - R4.0.4 Added the
/meg menuin-game model configuration menu, and the documented Citizens integration targets this release. - r2.3.0 Name tags stopped being automatic β models must supply their own nametag bone. MCPets standardises on the id
tag_namefor this.
Player limb bones
Player-limb bones render regions of a player skin instead of your own texture, so a model can wear someone's skin. Cubes inside these bones are ignored. Apply a skin with the modelPlayerSkin mechanic.
| Tag | Player part |
|---|---|
phead_ | Head |
pbody_ | Body |
prarm_ | Right arm |
plarm_ | Left arm |
prleg_ | Right leg |
plleg_ | Left leg |
limb[type=X] | A single, finer-grained skin region selected by the required type parameter β lets you split a model into upper/lower torso, upper/lower arms and so on. |
Player-limb rendering is built on core-shader technology (a modified version of Bradleyq's Stable Player Display). It works on vanilla, OptiFine and Sodium, but not when modded shaders are in use. Note also that ModelEngine's shader generation conflicts with MythicArmors β see that page.
Importing a model
- Save the model as
.bbmodel. Geometry, textures and animations all live inside that one file β no separate exports needed. - Drop it into
plugins/ModelEngine/blueprints/. Sub-folders are fine and are recursed. - Start the server, or run
/meg reload models.
With MythicMobs installed, models can instead live inside a Mythic pack, which keeps a themed content set together:
plugins/MythicMobs/packs/<YourPack>/models/
MythicMobs
|-- packs
|-- YourPackName
|-- models
|-- YourModel.bbmodel
|-- otherDirectory
|-- AnotherModel.bbmodel
ModelEngine regenerates a resource pack on import, but it will not send the pack to players for you. You must serve it yourself β server.properties' resource-pack, a pack-hosting service, or a pack-manager plugin. A model that looks like floating armor stands or shows the wrong item is almost always a pack-delivery problem, not a model problem.
Driving models from MythicMobs
Apply a model to a Mythic mob with the model mechanic, then animate it with state:
plugins/MythicMobs/Mobs/capybara.yml
Capybara:
Type: PIG
Display: 'Capybara'
Health: 40
Options:
Silent: true
Skills:
- model{mid=capybara} ~onSpawn
- state{mid=capybara;s=attack} @self ~onAttack
For a rideable model, the mount point must exist in the model as a cube-less bone named mount, the spawning mechanic must opt in with drive=true, and mounting is performed with ModelEngine's mountModel β not MythicMobs' own mount mechanic:
plugins/MythicMobs/Mobs/mount.yml
RideableCapybara:
Type: PIG
Health: 40
Skills:
- model{mid=capybara;drive=true} ~onSpawn
- mountModel{mid=capybara} @trigger ~onInteract
Passenger seats work the same way but use ride=true and mountModel{driver=false}.
If another Mythic addon registers a mechanic under the same name, prefix ModelEngine's with the meg: namespace. Crucible's setitemmodel shadows ModelEngine's, for example:
Disambiguating a shadowed mechanic
Skills:
# The Crucible mechanic
- setitemmodel{m=3} @self
# The Model Engine mechanic
- meg:setitemmodel{mid=testmodel;bone=examplebone;i=STONE} @self
Mechanic index
ModelEngine's mechanics become available to any MythicMobs skill once the plugin is installed. They are grouped by what they act on β the base entity, a model on that entity, an individual bone, mounting, or the movement controller.
| Mechanic | Description |
|---|---|
| Entity | |
Model | Add or remove model from this entity |
CullConfig | Configures the culling option |
LockModel | Lock or unlock entity rotation |
BodyRotation | Configure the body rotation of this entity |
PairModel | Force entity to be seen or hidden from the targeted players |
Petrify | Spawn real entities that represents the model and kill the entity |
| Model | |
State | Play or stop an animation |
ModifyState | Modify attributes of an animation |
DefaultState | Configure the default animation of a model |
LockModelHead | Lock the pitch or yaw of a model |
RemapModel | Remap a model using bones from another model |
RenderInit | Shows a model to the players, if initrender was used |
StateToggle | Toggle an animation between playing and not playing on a model |
SubModel | Forcefully create new bones or remove old ones on a model |
SwapEntity | Swap the owner of a model |
Scale | Set the render or hitbox scale of a model |
RootMotion | Sets the root options motion for the model |
| Bone | |
AnimateModel | Programmatically animates a model's bone, without relying on animations |
ChangeParent | Change the parent bone of a bone |
ChangePart | Change the model of a bone to another bone from a different model |
CycleParts | Cycle the model of a bone to multiple different bones at an interval |
Enchant | Enchant a bone |
Tint | Color a bone |
Glow | Glow a bone |
Brightness | Set brightness of a bone |
PartVisibility | Toggle the bone model visibility without removing the bone |
ModelPlayerSkin | Apply the skin of the targeted player to the selected player limb bones |
Billboard | Set the billboard mode of a bone |
| Mounting | |
MountModel | Mount an entity to a selection of mount bones |
DismountModel | Dismount an entity from a selection of mount bones |
DismountAllModel | Dismount all entities on the selected mount bones |
| Controller | |
Jump | Cause the entity to jump |
Move | Cause the entity to move. Step heights are accounted |
NoFall | Reset the fall distance of the entity. Useful for canceling fall damage |
SyncYaw | Sync the yaw of the entity. Fixer mechanic when local movement travels at wrong direction |
| Hitbox | |
BindHitbox | Summon and bind a MythicMobs mob to a sub-hitbox |
HitboxConfig | Configure the damage pass-through rate of a sub-hitbox |
| Segment | |
Segment | Configure the segment bones |
| Misc | |
ModelDisguise | Disguise the targeted player with a model |
ModelUndisguise | Undisguise a model from the targeted player |
LinkItemBone | Link an entity equipment slot to an item bone |
SetItemModel | Set the item on an item bone |
Leash | Connect the target to a leash bone |
LeashSelf | Connect a leash bone to another leash bone |
SetModelTag | Set the text on a name tag bone |
SetModelTagVisible | Configure the visibility of a name tag bone |
Condition index
| Condition | Type | Description |
|---|---|---|
DrivingModel | Entity | Checks if the target entity is the driver of a modeled entity |
HasModel | Entity | Checks if the target entity currently has a model applied |
Hitbox | Entity | Checks which hitbox was damaged or interacted with |
HitboxIsSubHitbox | Entity | Checks if a hitbox other than the main hitbox was what triggered the skill |
RidingModel | Entity | Checks if the target entity is a passenger of a modeled entity |
ModelHasDriver | Entity | Checks if the target modeled entity has a driver |
ModelHasPassengers | Entity | Checks if the target modeled entity has passengers |
Commands
| Command | Does |
|---|---|
/meg reload <config|models|mappings> | Reloads configs, reimports models, reloads skin mappings. With no argument, all three. |
/meg summon [model-id] <entity-type=PIG> <optionsβ¦> | Summons an entity wearing a model at your location. |
/meg disguise [model-id] <optionsβ¦> | Disguises you as a model. |
/meg undisguise | Removes your disguise. |
/meg debug [toggle] <true|false> | Toggles a debug option, or prints its state. |
/meg menu R4.0.4 | Opens the in-game model configuration menu. |
/meg health | Prints performance health: model-updater timings (min/max/avg) and per-tracker load. |
summon and disguise share a set of key value model options; anything omitted keeps the model's default:
| Option | Type | Meaning |
|---|---|---|
scale | Double | Visual scale of the model. |
hitboxScale | Double | Collision hitbox scale. |
doDamageTint | Boolean | Flash red when the base entity is damaged. |
lockPitch / lockYaw | Boolean | Lock the model's pitch / yaw. |
showHitbox | Boolean | Render the hitbox. |
showShadow | Boolean | Render the shadow. |
viewRadius | Integer | Radius within which the model is visible. |
stepHeight | Double | Step height of the base entity. |
color | Hex colour | Default tint. |
disguise adds three of its own:
| Option | Default | Meaning |
|---|---|---|
hideSelf | true | Hide the disguised player's own vanilla body from themselves. |
hideSelfDisguise | false | Also hide the model from the disguised player. When false they see their own model. |
pivotOverride | true | Use the player as the model's pivot. |
Configuration
plugins/ModelEngine/config.yml splits into three areas. The options most likely to matter:
| Option | Area | Purpose |
|---|---|---|
use-state-machine | Engine | Enables the newer state-machine animation system. Defaults to false, but the docs recommend migrating all models to it. |
engine-threads / max-engine-threads | Engine | Initial and maximum threads for animation processing; max must exceed the initial value. |
sync-client-tick-end | Engine | Time desync detection off the client's ClientTickEnd packet instead of its movement packet. |
default-animation-priority, client-sync-interval, lower-scale-limit | Engine | Animation blending priority, client resync cadence, minimum scale. |
render-fire-on-model, manual-translucency-order | Engine | Fire overlay and translucency sorting. |
force-custom-model-data | Engine | Forces the legacy CustomModelData path. |
mineskin-api-key | Engine | Key for skin resolution (see the codex's NPC skins page for how MineSkin works). |
create-shader | Generator | Emits an entity core shader. Set false when running MythicArmors. |
create-zip, create-atlas, create-mc-meta, namespace | Generator | Resource-pack output shape. |
bundle-everything, bundle-size | Network | Packet bundling. |
cull-interval, culling-threads, max-culling-threads | Network | Visibility culling cadence and parallelism. |
vertical-render-distance, skip-models-behind-viewer, skip-blocked-models, reduce-update-when-far | Network | The main performance levers on a busy server β stop sending updates for models a player cannot see. |
When models cause lag, reach for the Network Optimization block before reducing model quality. skip-models-behind-viewer, skip-blocked-models and reduce-update-when-far cut packet volume without touching the art. Use /meg health to see whether time is going into the model updater or into entity trackers.
Version notes
ModelEngine's wiki does not publish a changelog, so this page does not attempt a release history. The version facts stated above are the ones the documentation marks inline β R4.0.4 for /meg menu and the Citizens integration, R4.0.7 for the cube-less restriction on segment and tail bones, and r2.3.0 for the nametag-bone change. The current release line is R4.1.x. Treat anything else you read about ModelEngine version behaviour as unverified until checked against the plugin itself.
Gotchas
- Cube rotations are quantised. 90Β° and 67.5Β° are simply not expressible on a cube β move the rotation onto the bone.
- Every geometry bone is an entity. Bone count is the main driver of both server tick cost and client packet volume.
- The pack is generated, not delivered. ModelEngine never sends the resource pack.
- Use
mountModel, notmount, for model mounts, and rememberdrive=true/ride=trueon the spawning mechanic. create-shaderconflicts with MythicArmors.- Model faces North. A model built facing another direction will appear rotated in-game.
Sources
- ModelEngine 4 Wiki β Home
- ModelEngine 4 Wiki β Creating a Model
- ModelEngine 4 Wiki β Bone Behaviors
- ModelEngine 4 Wiki β Importing a Model
- ModelEngine 4 Wiki β MythicMobs integration
- ModelEngine 4 Wiki β Mechanics
- ModelEngine 4 Wiki β Conditions
- ModelEngine 4 Wiki β Commands & Permissions
- ModelEngine 4 Wiki β Configuration
- Blockbench