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.
/rp bind mypack:golem look at a mob, put the model on it
/rp unbind take it off againThe entity is never replaced
It keeps its AI, its loot table, its health, its hitbox and its uuid, and
every plugin holding a reference to it still has the same entity. Its vanilla
body is made invisible; unbind gives it back.
An implementation that spawned a new mob to carry the model would take the mob away from the plugin running it, and hand back something that only looks similar.
The model is an item ID#
The same ID a place: block names — so one model can be
stood in a world and worn by a mob without being written twice.
If it animates, the worn copy animates. It faces wherever its host faces, and
bones that do something do them here:
h_ heads track what the mob is fighting, b_ hitboxes let it be hit on the
wing you aimed at, tag_ puts its name somewhere sensible.
Animations are played by name#
A worn model has nothing to punch and nothing to walk into, so the triggers a placed model resolves have nothing to fire from. Whatever drives the mob decides when it animates — a MythicMobs skill, or your own plugin.
What it costs#
An animated model is one display entity per moving bone, and they are passengers of the mob — so vanilla moves them, and there is no per-tick work of ours involved.
That still makes a ten-bone boss eleven entities. It is a boss, not a spawner mob.
Making it stick#
/rp bind lasts as long as the entity does. A mob that is removed and respawned
by whatever owns it comes back bare — which is what the
Citizens trait and
MythicMobs' ~onSpawn are for.