resourcepack.ai
DOCS

Models

Putting a model on a mob

Any entity on the server can wear one of your models: a MythicMobs boss, a Citizens NPC, a shopkeeper, a mob another plugin owns. Look at it and run:

/rp bind mypack:golem     put the model on the mob you are looking at
/rp unbind                take it off again

Look at it from within 12 blocks. Both commands are for operators by default (rpengine.bind, rpengine.unbind). Putting a model on another player also needs rpengine.bind.others.

The entity is not replaced. It keeps its AI, loot, health, hitbox and UUID, and every plugin that knows about it still has the same entity. Only its vanilla body is made invisible, and /rp unbind brings it back.

To spawn a new mob that comes with a model, use custom entities from your content folder, or a Mob made in Studio.

Drawing the model so it fits#

  • Face it North in Blockbench (the -Z side is the front), as for Model Engine. A model drawn facing South walks backwards.
  • Its bottom stands on the ground under the mob, whatever the mob's size.

The model is an item ID#

Use the same ID a place: block uses, so one model can stand in the world and be worn by a mob without being written twice.

If the model animates, the worn copy animates and faces wherever its mob faces. Bones that do something work here: h_ heads track what the mob is fighting, b_ hitboxes let it be hit where you aimed, p_ and mount bones are seats, and tag_ puts its name somewhere sensible.

Playing animations#

A worn model has no clicks to react to, so whatever controls the mob decides when it animates: a MythicMobs skill (rpanimate), or your own plugin through Models.animate.

What it costs#

An animated model is one display entity per moving bone, riding the mob. A ten-bone boss is eleven entities, so keep detailed rigs for bosses rather than common mobs.

Making it stick#

/rp bind lasts as long as that entity does. A mob that is removed and respawned by the plugin that owns it comes back without the model. Use the Citizens trait or MythicMobs' rpmodel on ~onSpawn to put it back on every time.