Skip to content

Loot Items

fnar edited this page Dec 14, 2024 · 19 revisions

Loot is the value of the ''data'' field in a Weighted Loot object. These values may be basic items, or various kinds of specialized loot providers.

Basic Loot item

  • Object:
    • "name": String - Item/Block name
    • "meta": int - Item damage/metadata
    • "min": int - min stack size
    • "max": int - max stack size
    • "ench" : int - level of random enchants (same mechanism as enchanting table)
    • "nbt": Object or String

Example Basic Loot Item

{"name": "minecraft:wheat"}
{"name": "minecraft:stone", "meta": 0, "min": 4, "max": 16}
{"name": "minecraft:enchanted_book", "nbt": "{StoredEnchantments: [{lvl: 1, id: 34}]}"}
{"name": "minecraft:enchanted_book", "nbt": "{StoredEnchantments: [{lvl: 1, id: 16}]}"}
{"name": "minecraft:enchanted_book", "nbt": "{StoredEnchantments: [{lvl: 1, id: 0}]}"}
{"name": "minecraft:enchanted_book", "nbt": "{StoredEnchantments: [{lvl: 1, id: 32}]}"}

(for enchantment ID's refer to an enchantment id list -- thanks again @kameib !)

{"name": "minecraft:Paper", "nbt": "{display:{Name:\"Trading Card\",Lore:[\"Air\",\"Element\",\"Common\",\"#10\"]}}"}

Builtin Randomizers

These extend the regular loot items, providing some ease and sane defaults for accessing items.

Types: