Mob Gear

Mob Gear

A server-side Fabric mod which allows datapacks to decide what gear mobs spawn with using loot tables

by
249 Downloads
fabricequipmentmobsutility
Rent Server with this Mod

About this Mod

MobGear

A server-side fabric mod which adds the ability for datapacks to control what equipment mobs spawn with using loot tables.

This mod can be installed on the server without needing players to install it!

Loot tables matching the entity's resource location under loot_table/mobgear/ folder will determine the type of equipment that entity spawns with. As an example data/minecraft/loot_table/mobgear/zombie.json will control what equipment the zombie will spawn with. For modded mobs the equivalent would be data/modname/loot_table/mobgear/modded_mob.json (this is not tested but it might work!).

How is luck handled?

When generating the equipment loot table, luck is set as the local difficulty. This means the range is following:

  • Peaceful: 0
  • Easy: 0.75 - 1.5
  • Normal: 1.5 - 4.0
  • Hard: 2.25 - 6.75

These ranges can be used to make certain equipment only appear when the difficulty is high enough to really spice up the difficulty.

Read more about local difficulty

New Combined Group loot entry type

Currently vanilla loot tables have no proper way of selecting multiple specific items at once. Introducing mobgear:combinedgroup! CombinedGroup behaves similarly to regular Group but all of the items generated within the children are provided as potential equipment.

Unlike the vanilla loot groups, the combined group also includes weight and quality fields which behave like regular: real weight = max(floor(weight + (quality × luck)),0). If the resulting weight is 0 or less, the group is discarded.

Items inside the combined group can also use weight and quality to filter out items out of the group. Similar to combined group itself if the real weight is 0 or less then the item is discarded.

Example Loot table using CombinedGroup to equip full iron armor
{
    "type": "minecraft:equipment",
    "pools": [
        {
            "rolls": 1,
            "entries": [
                {
                    "type": "mobgear:combinedgroup",
                    "weight": 1,
                    "quality": 0,
                    "children": [
                        {
                            "type": "minecraft:item",
                            "name": "minecraft:iron_helmet"
                        },
                        {
                            "type": "minecraft:item",
                            "name": "minecraft:iron_chestplate"
                        },
                        {
                            "type": "minecraft:item",
                            "name": "minecraft:iron_leggings"
                        },
                        {
                            "type": "minecraft:item",
                            "name": "minecraft:iron_boots"
                        }
                    ]
                }
            ]
        }
    ]
}

Equip order

There are only a limited number of slots in a mob which can be filled with items. Items are selected to their corresponding slots in first come first serve order and will attempt to equip the item to it's matching slot. This however can be bypassed using custom data component!

Custom data controls

The equipped items can be controlled using the following custom data components:

mobgear:priority

Number value.
Controls item's equip priority. Highest number is equipped first.

mobgear:slot

Possible values:

  • "MAINHAND"
  • "OFFHAND"
  • "FEET"
  • "LEGS"
  • "CHEST"
  • "HEAD"
  • "BODY"
    • Refers to animal body slot. Used with horse armor and Lama carpets.
  • "SADDLE"

Determines which slot this item attempts to occupy. If the slot is already taken, the item will be discarded.

You can put any item to any slot but they might not show up correctly!

Example of putting a black banner on the head
{
    "type": "minecraft:item",
    "name": "minecraft:black_banner",
    "functions": [
        {
            "function": "minecraft:set_custom_data",
            "tag": {
                "mobgear:slot": "HEAD"
            }
        }
    ]
}
Example of dual wielding wooden axes
"entries": [
    {
        "type": "minecraft:item",
        "name": "minecraft:wooden_axe",
        "functions": [
            {
                "function": "minecraft:set_custom_data",
                "tag": {
                    "mobgear:slot": "MAINHAND"
                }
            }
        ]
    },
    {
        "type": "minecraft:item",
        "name": "minecraft:wooden_axe",
        "functions": [
            {
                "function": "minecraft:set_custom_data",
                "tag": {
                    "mobgear:slot": "OFFHAND"
                }
            }
        ]
    }
]

mobgear:dropchance

Number value between 0-1.
Controls % chance of this item being dropped on death. 1 meaning 100%, 0.5 meaning 50% and 0 meaning 0% chance. This is useful for making equipment undroppable even with looting when the equipment was not made to be used by players.

Example of making OP equipment not drop
{
    "type": "minecraft:item",
    "name": "minecraft:netherite_chestplate",
    "functions": [
        {
            "function": "minecraft:set_enchantments",
            "enchantments": {
                "minecraft:protection": 10,
                "minecraft:projectile_protection": 10,
                "minecraft:blast_protection": 10
            }
        },
        {
            "function": "minecraft:set_custom_data",
            "tag": {
                "mobgear:dropchance": 0
            }
        }
    ]
}
Example of having 30% chance to drop the equipped zombie head
{
    "type": "minecraft:item",
    "name": "minecraft:zombie_head",
    "functions": [
        {
            "function": "minecraft:set_custom_data",
            "tag": {
                "mobgear:dropchance": 0.3,
                "mobgear:slot": "HEAD"
            }
        }
    ]
}

mobgear:deathloottable

String value to loot table resource path.
This changes the mob's DeathLootTable which determines which Loot table is used to generate the mob's dropped loot. This is the only custom data value that isn't specifically targetting the item but the mob itself.

Example of setting mob's death loot table to desert pyramid's archaeology loot
{
  "type": "minecraft:equipment",
  "pools": [
    {
      "rolls": 0,
      "entries": [
        {
          "type": "minecraft:item",
          "name": "minecraft:egg",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "type": "minecraft:uniform",
                "min": 3,
                "max": 7
              }
            },
            {
              "function": "minecraft:set_custom_data",
              "tag": {
                "mobgear:deathloottable": "minecraft:archaeology/desert_pyramid"
              }
            }
          ]
        }
      ]
    }
  ]
}

Using vanilla equipment logic

Most hostile mobs have pre-existing logic for their equipped gear which can be a hassle to recreate using loot tables. I've implemented a simple solution for having an option to decide whether to use vanilla equipment or to use custom equipment.

If loot table has no valid Loot Pools the vanilla behavior is used! This can be controlled using Loot Pool's conditions.

Example of only using custom equipment if mob spawns in a Stronghold.

If the location_check condition is false then vanilla behavior is used as none of the available loot pools are valid.

{
  "type": "minecraft:equipment",
  "pools": [
    {
      "rolls": 1,
      "entries": [
        ...
      ],
      "conditions": [
        {
          "condition": "minecraft:location_check",
          "predicate": {
            "structures": "minecraft:stronghold"
          }
        }
      ]
    }
  ]
}
Example of mobs below y=0 use custom equipment

If the location_check condition is false then vanilla behavior is used as none of the available loot pools are valid.

{
  "type": "minecraft:equipment",
  "pools": [
    {
      "rolls": 1,
      "entries": [
        ...
      ],
      "conditions": [
        {
          "condition": "minecraft:location_check",
          "predicate": {
            "position": {
              "y": {
                "max": 0
              }
            }
          }
        }
      ]
    }
  ]
}

Available Versions

Mob Gear 1.0.1release
MC 1.21.6fabric
June 22, 2025
Mob Gear 1.0.0release
MC 1.21.5fabric
May 31, 2025

How to Install Mob Gear on Your Server

1

Order Server

Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).

2

Set fabric Loader

In the panel under "Egg", select the fabric loader and matching Minecraft version (1.21.6).

3

Install Mod

Open the mod browser in the dashboard and search for "Mob Gear". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.

Compatibility

Mod Loaders

fabric

Minecraft Versions

1.21.6, 1.21.5

Server-side

Required

Recommended RAM

4 GB(min. 3 GB)

Frequently Asked Questions

Mob Gear server crashes on startup – what to do?

Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.21.6). You can switch loaders with one click in the panel.

Is Mob Gear compatible with fabric?

Mob Gear officially supports fabric for Minecraft 1.21.6, 1.21.5. The Mado dashboard automatically detects incompatible loader combinations.

Server lagging with Mob Gear – how to optimize performance?

Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if Mob Gear consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.

Rent Modded Server

Install Mob Gear with just one click on your server.

Recommended RAM
4 GBab €8/mo
Min. 3 GB | +1 GB pro 8 Spieler
Create Server Now
1-Click Mod Install
NVMe SSD Storage
DDoS Protection included

Details

License
Creative Commons Zero v1.0 Universal
Server-side
Required

Supported Versions

1.21.61.21.5