LogoAraxer's Bestiary

Bestiary entity loot format

This article documents the JSON format Araxer's Bestiary reads from datapacks to provide or override loot information for entities.

The loader scans files under:

  • data/<your_datapack_namespace>/bestiary/<entity_namespace>/<entity_path>.json

The entity id becomes:

  • <entity_namespace>:<entity_path>

Example path → id:

  • data/my_pack/bestiary/minecraft/zombie.jsonminecraft:zombie

Top-level JSON

{
"lootOverride": false,
"loot": []
}

Fields:

  • lootOverride (boolean, optional):
    • When true, Bestiary treats this entity as fully overridden by the datapack. The loot shown in the Bestiary comes only from this file. Internal simulation and loot table sampling are skipped for this entity.
    • When false or omitted, Bestiary will combine the datapack entries with the game’s loot table results: loot table items have priority, datapack items are used to supplement missing items or as a fallback when no loot table data is available.
  • loot (array, optional): List of loot entries. If omitted or empty, there is nothing to add/override.

Important override note:

  • Even if lootOverride is false, setting override: true on any individual loot entry (see below) also enables the override mode for the entire entity. Use with care.

Loot entry object

Each entry in the loot array describes one item:

{
"item": "minecraft:rotten_flesh",
"displayNameKey": "",
"displayName": "(rare variant)",
"dropChance": 0.35,
"override": false
}

Fields:

  • item (string, required): Namespaced item id, e.g., minecraft:rotten_flesh or my_mod:gem_shard.
  • displayNameKey (string, optional): A translation key to display next to the item name in the Bestiary. If present and non-empty, Bestiary uses Component.translatable(displayNameKey). Define the translated text in your pack or mod’s language file (assets/<ns>/lang/en_us.json).
  • displayName (string, optional): Literal text appended to the item’s own display name, typically for clarifying notes such as “(rare)” or “(boss only)”. If displayName already contains the base item name, Bestiary uses it as-is to avoid duplication.
  • dropChance (number, optional): The item’s drop probability (0–1). Omit or set to -1 to leave it “unknown”. Bestiary may refine unknown chances using in-game loot tables or sampling when possible.
  • override (boolean, optional): Per-entry override flag. If any loot entry sets override: true, Bestiary enables override for the whole entity (equivalent to lootOverride: true) and uses only the datapack-provided entries.

Display name behavior

Bestiary constructs the display label for each item starting from the item’s own name and optionally appending your displayName or translated displayNameKey. Examples:

  • Base: "Rotten Flesh"
  • With displayName: "Rotten Flesh (from spawner rooms)"
  • With displayNameKey: Use a translation key like bestiary.note.rare and define it:

assets/my_pack/lang/en_us.json

{
"bestiary.note.rare": "(rare)"
}

Combining with loot tables (no override)

When lootOverride is false and no per-entry override is set:

  • Bestiary fetches the entity’s loot using the game’s loot tables (server-side).
  • If your datapack includes items that are not in the loot table results, Bestiary adds them as supplements.
  • If there are no loot table results (or running client-side where tables aren’t available), Bestiary falls back entirely to your datapack entries.

Validating item and entity ids

  • Ensure the entity path matches the real entity id (minecraft:zombie, minecraft:warden, or a mod id).
  • Ensure each item is a valid item id in the current modpack. Unknown items are ignored and logged.

Reloading and logs

  • Use /reload to re-read datapacks.
  • Watch the log for lines like:
    • "Loaded bestiary loot data for N entities"
    • "Using datapack override" or "Supplemented loot cache with datapack entries"

If you don’t see your entity counted, double-check your folder structure and file names.