Back to 9Minecraft
Wiki 9Minecraft Wiki 9Minecraft
Armoreablemobs Wiki › Guides › Adding Multiple Armor Sets to the Same Mob

Adding Multiple Armor Sets to the Same Mob

Why Use Multiple Groups

If you want a zombie to sometimes spawn in iron and sometimes in diamond, you do not stack slots on one group. Instead you create separate ArmorGroup instances, each with its own chance value, and register the same entity to each one. The mod rolls each group independently, so a mob can end up with any of the sets you define.

Build Each Set Separately

`zenscript

var ironSet = ArmorHandler.createArmorGroup("iron_zombie", 0.3);

ironSet.addEntity(<entity:minecraft:zombie>);

ironSet.addArmor(ArmorHandler.createArmorSlot("head", <minecraft:iron_helmet>));

ironSet.addArmor(ArmorHandler.createArmorSlot("chest", <minecraft:iron_chestplate>));

var diamondSet = ArmorHandler.createArmorGroup("diamond_zombie", 0.1);

diamondSet.addEntity(<entity:minecraft:zombie>);

diamondSet.addArmor(ArmorHandler.createArmorSlot("head", <minecraft:diamond_helmet>));

diamondSet.addArmor(ArmorHandler.createArmorSlot("chest", <minecraft:diamond_chestplate>));

`

Tune the Odds

Because each group rolls separately, the combined chance of a zombie getting any armor is roughly the sum of the individual chances. Keep the rarer, stronger sets at lower values and the common sets higher. If you want strictly exclusive loadouts, keep the total of all chances at or below 1.0 so overlaps are unlikely, or accept that a mob may occasionally roll two groups and end up with mixed gear. Test by spawning several zombies in a creative world and checking their equipment slots.