Can mobs be equipped with armour based on drops from a loot table?



  • I am making a RPG/Dungeon Crawler datapack and I want to procedurally make dungeons throughout the world. I have somewhat figured out how to make the dungeons, but I want the monsters to be random (e.g. what gear they have equipped).

    I would use a loot table to make the monsters harder to kill and be more profitable in a more vanilla way, but I don't know whether it's possible, or how it would be done.

    How can I link a mob's armour to a loot table's results?



  • I would use /loot to replace the mob's armour:

    execute as @e[tag=mob] run loot replace entity @s armor.feet 1 loot datapack:feet_loot
    execute as @e[tag=mob] run loot replace entity @s armor.legs 1 loot datapack:legs_loot
    ...
    

    and so on.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2