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.

πŸ“Œ Scope note

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:

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:

CubeBone
Rotation valuesOnly 0, Β±22.5, Β±45 degrees. 90 and 67.5 are not allowed.Unrestricted.
Rotation axesOnly one axis may be rotated.Unrestricted.
CostFree β€” 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.

πŸ’‘ Best practice

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 / idBehavior
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.
⚠ Version differences
  • R4.0.7 The seg_ and tl_ tags may only be used on cube-less bones, and the bone's pivot should sit at the back. Both are further configured with the segment mechanic.
  • R4.0.4 Added the /meg menu in-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_name for 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.

TagPlayer 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.
⚠ Gotcha

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

  1. Save the model as .bbmodel. Geometry, textures and animations all live inside that one file β€” no separate exports needed.
  2. Drop it into plugins/ModelEngine/blueprints/. Sub-folders are fine and are recursed.
  3. 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
🚧 Workaround

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}.

⚠ Gotcha β€” name collisions

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.

MechanicDescription
Entity
ModelAdd or remove model from this entity
CullConfigConfigures the culling option
LockModelLock or unlock entity rotation
BodyRotationConfigure the body rotation of this entity
PairModelForce entity to be seen or hidden from the targeted players
PetrifySpawn real entities that represents the model and kill the entity
Model
StatePlay or stop an animation
ModifyStateModify attributes of an animation
DefaultStateConfigure the default animation of a model
LockModelHeadLock the pitch or yaw of a model
RemapModelRemap a model using bones from another model
RenderInitShows a model to the players, if initrender was used
StateToggleToggle an animation between playing and not playing on a model
SubModelForcefully create new bones or remove old ones on a model
SwapEntitySwap the owner of a model
ScaleSet the render or hitbox scale of a model
RootMotionSets the root options motion for the model
Bone
AnimateModelProgrammatically animates a model's bone, without relying on animations
ChangeParentChange the parent bone of a bone
ChangePartChange the model of a bone to another bone from a different model
CyclePartsCycle the model of a bone to multiple different bones at an interval
EnchantEnchant a bone
TintColor a bone
GlowGlow a bone
BrightnessSet brightness of a bone
PartVisibilityToggle the bone model visibility without removing the bone
ModelPlayerSkinApply the skin of the targeted player to the selected player limb bones
BillboardSet the billboard mode of a bone
Mounting
MountModelMount an entity to a selection of mount bones
DismountModelDismount an entity from a selection of mount bones
DismountAllModelDismount all entities on the selected mount bones
Controller
JumpCause the entity to jump
MoveCause the entity to move. Step heights are accounted
NoFallReset the fall distance of the entity. Useful for canceling fall damage
SyncYawSync the yaw of the entity. Fixer mechanic when local movement travels at wrong direction
Hitbox
BindHitboxSummon and bind a MythicMobs mob to a sub-hitbox
HitboxConfigConfigure the damage pass-through rate of a sub-hitbox
Segment
SegmentConfigure the segment bones
Misc
ModelDisguiseDisguise the targeted player with a model
ModelUndisguiseUndisguise a model from the targeted player
LinkItemBoneLink an entity equipment slot to an item bone
SetItemModelSet the item on an item bone
LeashConnect the target to a leash bone
LeashSelfConnect a leash bone to another leash bone
SetModelTagSet the text on a name tag bone
SetModelTagVisibleConfigure the visibility of a name tag bone

Condition index

ConditionTypeDescription
DrivingModelEntityChecks if the target entity is the driver of a modeled entity
HasModelEntityChecks if the target entity currently has a model applied
HitboxEntityChecks which hitbox was damaged or interacted with
HitboxIsSubHitboxEntityChecks if a hitbox other than the main hitbox was what triggered the skill
RidingModelEntityChecks if the target entity is a passenger of a modeled entity
ModelHasDriverEntityChecks if the target modeled entity has a driver
ModelHasPassengersEntityChecks if the target modeled entity has passengers

Commands

CommandDoes
/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 undisguiseRemoves your disguise.
/meg debug [toggle] <true|false>Toggles a debug option, or prints its state.
/meg menu R4.0.4Opens the in-game model configuration menu.
/meg healthPrints 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:

OptionTypeMeaning
scaleDoubleVisual scale of the model.
hitboxScaleDoubleCollision hitbox scale.
doDamageTintBooleanFlash red when the base entity is damaged.
lockPitch / lockYawBooleanLock the model's pitch / yaw.
showHitboxBooleanRender the hitbox.
showShadowBooleanRender the shadow.
viewRadiusIntegerRadius within which the model is visible.
stepHeightDoubleStep height of the base entity.
colorHex colourDefault tint.

disguise adds three of its own:

OptionDefaultMeaning
hideSelftrueHide the disguised player's own vanilla body from themselves.
hideSelfDisguisefalseAlso hide the model from the disguised player. When false they see their own model.
pivotOverridetrueUse the player as the model's pivot.

Configuration

plugins/ModelEngine/config.yml splits into three areas. The options most likely to matter:

OptionAreaPurpose
use-state-machineEngineEnables the newer state-machine animation system. Defaults to false, but the docs recommend migrating all models to it.
engine-threads / max-engine-threadsEngineInitial and maximum threads for animation processing; max must exceed the initial value.
sync-client-tick-endEngineTime desync detection off the client's ClientTickEnd packet instead of its movement packet.
default-animation-priority, client-sync-interval, lower-scale-limitEngineAnimation blending priority, client resync cadence, minimum scale.
render-fire-on-model, manual-translucency-orderEngineFire overlay and translucency sorting.
force-custom-model-dataEngineForces the legacy CustomModelData path.
mineskin-api-keyEngineKey for skin resolution (see the codex's NPC skins page for how MineSkin works).
create-shaderGeneratorEmits an entity core shader. Set false when running MythicArmors.
create-zip, create-atlas, create-mc-meta, namespaceGeneratorResource-pack output shape.
bundle-everything, bundle-sizeNetworkPacket bundling.
cull-interval, culling-threads, max-culling-threadsNetworkVisibility culling cadence and parallelism.
vertical-render-distance, skip-models-behind-viewer, skip-blocked-models, reduce-update-when-farNetworkThe main performance levers on a busy server β€” stop sending updates for models a player cannot see.
πŸ’‘ Best practice

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

πŸ“Œ Note

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

Sources