Skip to content

Cosmetics on mobs

Mobs can spawn wearing your cosmetics at random, and drop them when a player kills them. You set it all in plugins/BoxCosmetics/mobs.yml: which mobs, how often, how many pieces or a whole set, and which cosmetics.

After you edit the file, run /bc reload.

A crown on one zombie in ten

# mobs.yml
enabled: true

rules:
  crowned-zombies:
    mobs: [zombie, husk, drowned]
    chance: 10
    pieces: 1
    cosmetics: [crown]

In game, about one zombie, husk or drowned in ten spawns with the crown on its head. A player who kills it picks the crown up, as /bc give makes its item.

As shipped

The roll is off as shipped: nothing turns up on mobs until you set enabled: true. Then the shipped rule, default, rolls from every cosmetic you have, packs you add later included.

# mobs.yml
enabled: false   # true: mobs roll the rules

spawns:
  natural: true
  spawner: true
  egg: true
  mythicmobs: true

rules:
  default:
    mobs: [zombie, husk, drowned, zombie_villager, skeleton, stray, wither_skeleton, bogged, parched, piglin, piglin_brute, zombified_piglin]
    chance: 5
    pieces: 1-2
  • enabled takes true or false. Default: false. Mobs that already wear cosmetics keep them and still drop them while it is false.
  • A value other than true or false under enabled or spawns is set back to its default, with a line in the console: Values it fixes.
  • To keep some cosmetics off mobs, see Which cosmetics.

Which mobs

Only the mobs the game draws armour on can wear cosmetics. On any other mob an item in its slots shows nothing, so a rule passes it over with a warning.

Mobs Babies too
zombie, husk, drowned, zombie_villager, giant Yes, but the giant
skeleton, stray, wither_skeleton, bogged, parched No babies in the game
piglin, piglin_brute, zombified_piglin Yes
armor_stand, mannequin A small stand too
  • Players never roll: they wear their own.
  • A rule with no mobs is for every mob here but giant, armor_stand and mannequin: see rules.
  • A zombie villager, baby or not, never wears anything in the Head list or the helmet slot: its tall head and big nose fit neither. Its other slots roll as ever.
  • A stand a player places, and a BoxStand stand, is no spawn here and never rolls. A stand made with /summon is an egg spawn.

spawns

The kinds of spawn that roll the rules. Each takes true or false. Default: true for all four.

Key The mobs it covers
natural Spawned by the world: at night, in caves, in new chunks, zombie sieges, reinforcements, jockeys, skeleton horsemen and nether portals
spawner Mob spawners and trial spawners
egg Spawn eggs, eggs from a dispenser, and /summon
mythicmobs MythicMobs mobs whose file puts no ModelEngine model on them
# mobs.yml
spawns:
  spawner: false   # nothing from spawners or mob farms
  • A MythicMobs mob with the model mechanic in its Skills, or with any ModelEngine model on it, never rolls.
  • A key under spawns that is not one of the four is warned about and passed over.
  • A mob that turns into another, such as a zombie that drowns, rolls nothing. It keeps what it wore: see When a mob changes.

rules

Each rule is a section under rules, with a name of your choice. A new mob tries the rules' chance from the top of the file, and takes the first one that comes up. So put a rare rule above a common one. A piece's or a category's own chance rolls on every rule: see Chances of their own.

Key Takes Default What it does
mobs A list of the mobs in Which mobs The 12 monsters of the shipped default rule The mobs the rule is for
chance A number from 0 to 100 100, or 0 in a rule with piece-chance or category-chance The chance in percent that the mob wears anything from this rule
pieces A number, or a range such as 1-3 1 How many of its cosmetics it wears, picked at random
set true or false false true: it wears every one of its cosmetics, and pieces is not read
cosmetics A list of cosmetic names (names with commas work too), or all all The cosmetics it picks from: Which cosmetics
except A list of cosmetic names (names with commas work too) None Cosmetics it never picks
except-permission true or false false true: it never picks a cosmetic with a permission
except-accessory true or false false true: it never picks an accessory
piece-chance A list of lines, a cosmetic name and a number from 0 to 100 on each None Each piece's own chance in percent: Chances of their own
category-chance A list of lines, a category name and a number from 0 to 100 on each None Each category's own chance in percent: Chances of their own
# mobs.yml
rules:
  knight:                   # tried first
    mobs: [skeleton, wither_skeleton]
    chance: 2
    set: true               # all of them
    cosmetics: [knight-helmet, knight-chestplate, knight-sword]
  hats:                     # tried when the knight does not come up
    mobs: [skeleton, zombie]
    chance: 15
    pieces: 1-2             # one or two, at random
    cosmetics: [crown, santa-hat, bat-wings]
  • Leave mobs out and the rule is for the 12 monsters the shipped default rule lists: every mob in Which mobs but giant, armor_stand and mannequin. Those three only when you write them.
  • With mobs written, the rule is for those mobs alone.
  • A name in cosmetics or except that is no cosmetic is warned about and passed over, and so is a rule left with none.
  • A name in mobs not in the table is warned about and passed over, and so is a rule whose mobs names none from it.
  • A chance outside 0 to 100 counts as the nearest end. A pieces under 1 counts as 1. Text in either is warned about, and the default is used.
  • set, except-permission and except-accessory take true or false. Any other value counts as false, and the console warns about it.

Which cosmetics

Each rule picks from its own cosmetics, in one of three ways.

You want Write
Every cosmetic Leave cosmetics out, or write cosmetics: all
Every cosmetic but some Leave cosmetics out, and list the others under except
Only some List them under cosmetics
# mobs.yml
rules:
  all-but-ranks:              # no mobs: the 12 monsters
    chance: 5
    except: [santa-hat]        # never this one
    except-permission: true    # never a VIP piece
    except-accessory: true     # never an accessory
  • Every cosmetic means every one: a cosmetic with a permission and an accessory too. A player who picks up a dropped VIP piece can wear it, unless permission-locks-item is true.
  • except, except-permission and except-accessory also take cosmetics out of a cosmetics list.
  • With no cosmetics in your cosmetics/ folder yet, a rule that takes every cosmetic does nothing, with no warning.
  • rules is yours: the plugin never adds or removes a rule.

Chances of their own

A rule can give a piece, or a whole category, its own chance in percent. Each one rolls by itself for every mob of the rule, so one mob can wear several.

# mobs.yml
rules:
  default:
    mobs: [zombie, skeleton]
    chance: 5
    pieces: 1-2
    piece-chance:
      - neon-knight-helmet 2   # 2 mobs in 100
    category-chance:
      - balloon 20%            # 1 in 5 floats a balloon

In game, about one zombie or skeleton in five floats a balloon, two in a hundred wear the neon helmet, and one can wear both, on top of the rule's 5 in 100.

  • Each line is a name and a percent: - balloon 20 and - balloon 20% are the same.
  • A category that comes up puts on one of the rule's cosmetics of that category, picked at random, in that category's slot.
  • The categories are the Collection's: helmet, chestplate, leggings, boots, hand, head, wear, balloon. One switched off in categories still rolls here.
  • A piece with its own chance comes from the rule only at that chance. Its category and the rule's chance leave it out.
  • A piece is put on as you name it, even if the rule's cosmetics or except leaves it out. A category picks from the rule's cosmetics: see Which cosmetics.
  • They go on before the rule's chance rolls, which then fills the room left. Only room limits them: see Where each piece goes. A zombie villager still never gets a Head list or helmet piece.
  • A rule with them and no chance puts on nothing more.
  • Every rule for the mob rolls its own, also those below the rule whose chance came up.
  • enabled: false and spawns switch them off too.
  • A line with no percent or with more words, a name that is no cosmetic or no category, a name listed twice, or a percent that is not a number, is warned about and passed over.

Where each piece goes

Each piece goes in the first slot its slot names that has room, as on a player.

  • A cosmetic with no slot goes in the Head list first, then the armour, the hands, the Wear list and the balloons.
  • The Head, Wear and Balloon lists hold as many as their max. Each armour slot and hand holds one.
  • Two cosmetics of one group are never worn together: the second is passed over.
  • An accessory goes where its slot stands for: its head list on the head, and so on.
  • When fewer pieces fit than the rule picks, the mob wears the ones that fit.

What players see

A mob wears its cosmetics as a player does: armour pieces over its real armour, by the same equipment settings, hats and back pieces as items or ModelEngine models, and balloons on a lead.

  • Nothing on the mob itself changes: its real armour still protects it, and a skeleton still burns in the sun under a cosmetic helmet.
  • Hats and back pieces sit on each mob's own head and back. A wither skeleton's are bigger and higher, a piglin's hat is as wide as its head, a baby's is small. Your head and wear settings in config.yml and each cosmetic's position are moved onto each mob the same way.
  • A mob's scale attribute grows everything it wears.
  • A balloon floats as high over a big mob as over a player of that size.
  • A ModelEngine model plays walk while the mob moves and idle while it stands, and burn and freeze over them.
  • Every player sees a mob's cosmetics, whatever their view button says: that button hides other players' cosmetics.

Drops

A mob drops what it wears only when a player kills it, as the game drops a mob's armour: the player killed it, or hit it in the 5 seconds before it died.

  • A mob that burns in the sun, drowns, falls or dies in a farm without a player drops nothing.
  • Each piece drops as /bc give makes its item. A cosmetic with no item drops nothing.
  • With the game rule doMobLoot off, nothing drops.

When a mob changes

A mob that turns into another keeps what it wears: a zombie that drowns, a husk that turns into a zombie, a skeleton in powder snow, a piglin in the Overworld.

  • A mob that turns into one not in Which mobs, such as a zombie villager that is cured, drops all it wore where it stands.

Kept on the mob

What a mob wears is saved on the mob. It still wears it after its chunk unloads and loads again, and after a restart.

  • A cosmetic taken out of your files is no longer drawn on the mob, and drops nothing.
  • A cosmetic taken off a rule stays on the mobs that wear it. Only new mobs stop rolling it.
  • A cosmetic whose file changed is drawn the new way after /bc reload.