Skip to content

Users Loot Info Loot Categories

Yanny edited this page Oct 3, 2026 · 3 revisions

Loot Categories

A loot category is one category in your recipe viewer. Every block, entity, gameplay loot table and trade that ALI scans is put into exactly one of them.

Categories are declared in config/ali/ali_common.json in four lists:

List Matches Matched by
blockCategories blocks blocks — block IDs and block tags
entityCategories entity types entityTypes — entity IDs and entity tags
gameplayCategories gameplay loot tables pattern — regular expressions over the loot table ID
tradeCategories trades pattern — regular expressions over the trader ID (minecraft:farmer, minecraft:wandering_trader, a modded trader's entity ID)

The order matters. A block, entity or loot table is assigned to the first category that matches it. Put specific categories above general ones — the built-in block_loot, gameplay_loot and trade_loot categories are catch-alls (an empty matcher, or the .* pattern) and must stay last.

Common fields

Every category, regardless of kind, has:

Field Required Meaning
key yes Unique ID of the category, e.g. ali:plant_loot. Also the translation key of its title.
type 1.20.1 only BLOCK, ENTITY, GAMEPLAY or TRADE; see below.
icon yes Item ID used as the category icon, e.g. minecraft:diamond_hoe.
hide no (false); required on 1.20.1 Hides the category from the UI. Set on a server, its data is not even sent to clients.
catalysts no (empty) Items that "lead to" this category — looking up a catalyst item in the viewer shows the category. E.g. a Fishing Rod for fishing loot.

The syntax of catalysts is vanilla's ingredient format for your Minecraft version: on 1.20.1 and 1.21.1 the object form ({"item": "minecraft:fishing_rod"} / {"tag": "minecraft:tools"}), from 1.21.11 on the plain item ID or #tag string. The generated default file already contains catalysts for several categories — copy the form you see there.

There is one more field, type (BLOCK, ENTITY, GAMEPLAY, TRADE):

  • On Minecraft 1.20.1 it is required — a category without it is not loaded.
  • From 1.21.1 on it is not used at all. The kind is decided by the list the category is written in, so the mod neither writes the field nor reads it. Leaving it in an old file does no harm.

Block and entity categories

Matched by IDs and tags. A tag is written with a leading #. The examples include type, which is required on 1.20.1 and ignored on newer versions.

{
  "blockCategories": [
    {
      "key": "ali:plant_loot",
      "type": "BLOCK",
      "icon": "minecraft:diamond_hoe",
      "hide": false,
      "blocks": ["#minecraft:crops"]
    },
    {
      "key": "examplepack:ore_loot",
      "type": "BLOCK",
      "icon": "minecraft:diamond_pickaxe",
      "hide": false,
      "blocks": ["#minecraft:coal_ores", "minecraft:ancient_debris"]
    },
    {
      "key": "ali:block_loot",
      "type": "BLOCK",
      "icon": "minecraft:diamond_pickaxe",
      "hide": false,
      "blocks": []
    }
  ]
}

An empty list matches everything — that is how the catch-all ali:block_loot works, and why it has to be the last block category.

Entity categories are identical, with entityTypes instead of blocks:

{
  "entityCategories": [
    {
      "key": "examplepack:boss_loot",
      "type": "ENTITY",
      "icon": "minecraft:nether_star",
      "hide": false,
      "entityTypes": ["minecraft:wither", "minecraft:ender_dragon"]
    },
    {
      "key": "ali:entity_loot",
      "type": "ENTITY",
      "icon": "minecraft:skeleton_skull",
      "hide": false,
      "entityTypes": []
    }
  ]
}

If you find a classes field in an old config file or an old guide, that format no longer applies — use blocks/entityTypes as above.

Gameplay and trade categories

Matched by regular expressions against the loot table ID (namespace:path), and for trades against the trader ID. The first matching pattern wins, so again: specific first, .* last.

Every trader goes through tradeCategories, the wandering trader (minecraft:wandering_trader) included, so it can be given a category of its own or hidden like any other.

{
  "gameplayCategories": [
    {
      "key": "examplepack:my_dungeon_loot",
      "type": "GAMEPLAY",
      "icon": "minecraft:chest",
      "hide": false,
      "catalysts": [],
      "pattern": ["^examplepack:chests/dungeon/.*$"]
    },
    {
      "key": "ali:gameplay_loot",
      "type": "GAMEPLAY",
      "icon": "minecraft:compass",
      "hide": false,
      "pattern": [".*"]
    }
  ]
}

Built-in categories

The defaults ship with the mod and are regenerated whenever the config file is (re)created. On 1.21.11 and newer they are, in order:

  • blocks — ali:plant_loot (#minecraft:crops), ali:block_loot (everything else)
  • entities — ali:entity_loot (everything)
  • gameplay — ali:chest_loot, ali:trial_chambers, ali:fishing_loot, ali:archaeology_loot, ali:hero_loot, ali:cat_morning_gift, ali:piglin_bartering, ali:sniffer_digging, ali:panda_sneeze, ali:shearing, ali:armadillo_shed, ali:chicken_lay, ali:carving, ali:charged_creeper, ali:harvesting, ali:turtle_grow, ali:gameplay_loot (catch-all)
  • trades — ali:trade_loot (everything)

The gameplay list follows the vanilla features of the Minecraft version you are on, because older versions lack some of those loot tables:

  • 1.21.1 — ali:chest_loot, ali:trial_chambers, ali:fishing_loot, ali:archaeology_loot, ali:hero_loot, ali:cat_morning_gift, ali:piglin_bartering, ali:sniffer_digging, ali:panda_sneeze, ali:shearing, ali:gameplay_loot (catch-all)
  • 1.20.1 — ali:chest_loot, ali:fishing_loot, ali:archaeology_loot, ali:hero_loot, ali:cat_morning_gift, ali:piglin_bartering, ali:sniffer_digging, ali:gameplay_loot (catch-all)

The block, entity and trade categories are the same on every version. Your generated file is the authoritative list for your version.

Recipes for common tasks

Hide a whole category — set "hide": true on it. Doing this on a dedicated server also stops that data from being sent to players at all, which is the cheapest way to cut down what has to be transferred.

Give a category its own name — the displayed title is the translation of emi.category.<namespace>.<path> (the / in a path becomes .). The prefix is historical: all three viewers use it. So a category keyed examplepack:ore_loot is named from a resource pack with:

{
  "emi.category.examplepack.ore_loot": "Ore Drops"
}

Without a translation the raw key is shown.

Split a mod's blocks into their own tab — add a category above ali:block_loot listing that mod's blocks or a tag it provides.

Clone this wiki locally