Skip to content

Pool Entry

fzzyhmstrs edited this page Nov 20, 2024 · 2 revisions

Rolls a vanilla loot pool and supplies the item drops from that.

JSON Definition

Key Type Value Example Note
"type" String
"lootables:pool"
"pool" Object

Vanilla Loot Pool

Required

Loot Pool to roll when this entry is chosen.
"drop_items" Boolean
true
Optional, default false

When false (default) the items are added to the player inventory, when true the items are scattered on the ground.

Examples

Entry that drops items from one of the Desert Pyramid loot pools. The items will scatter on the ground.

{
  "type": "lootables:pool",
  "drop_items": "true",
  "pool": {
    "bonus_rolls": 0.0,
    "entries": [
      {
        "type": "minecraft:item",
        "functions": [
          {
            "add": false,
            "count": {
              "type": "minecraft:uniform",
              "max": 3.0,
              "min": 1.0
            },
            "function": "minecraft:set_count"
          }
        ],
        "name": "minecraft:diamond",
        "weight": 5
      },
      {
        "type": "minecraft:item",
        "functions": [
          {
            "add": false,
            "count": {
              "type": "minecraft:uniform",
              "max": 5.0,
              "min": 1.0
            },
            "function": "minecraft:set_count"
          }
        ],
        "name": "minecraft:iron_ingot",
        "weight": 15
      },
      {
        "type": "minecraft:item",
        "functions": [
          {
            "add": false,
            "count": {
              "type": "minecraft:uniform",
              "max": 7.0,
              "min": 2.0
            },
            "function": "minecraft:set_count"
          }
        ],
        "name": "minecraft:gold_ingot",
        "weight": 15
      },
      {
        "type": "minecraft:item",
        "functions": [
          {
            "add": false,
            "count": {
              "type": "minecraft:uniform",
              "max": 3.0,
              "min": 1.0
            },
            "function": "minecraft:set_count"
          }
        ],
        "name": "minecraft:emerald",
        "weight": 15
      },
      {
        "type": "minecraft:item",
        "functions": [
          {
            "add": false,
            "count": {
              "type": "minecraft:uniform",
              "max": 6.0,
              "min": 4.0
            },
            "function": "minecraft:set_count"
          }
        ],
        "name": "minecraft:bone",
        "weight": 25
      },
      {
        "type": "minecraft:item",
        "functions": [
          {
            "add": false,
            "count": {
              "type": "minecraft:uniform",
              "max": 3.0,
              "min": 1.0
            },
            "function": "minecraft:set_count"
          }
        ],
        "name": "minecraft:spider_eye",
        "weight": 25
      },
      {
        "type": "minecraft:item",
        "functions": [
          {
            "add": false,
            "count": {
              "type": "minecraft:uniform",
              "max": 7.0,
              "min": 3.0
            },
            "function": "minecraft:set_count"
          }
        ],
        "name": "minecraft:rotten_flesh",
        "weight": 25
      },
      {
        "type": "minecraft:item",
        "name": "minecraft:saddle",
        "weight": 20
      },
      {
        "type": "minecraft:item",
        "name": "minecraft:iron_horse_armor",
        "weight": 15
      },
      {
        "type": "minecraft:item",
        "name": "minecraft:golden_horse_armor",
        "weight": 10
      },
      {
        "type": "minecraft:item",
        "name": "minecraft:diamond_horse_armor",
        "weight": 5
      },
      {
        "type": "minecraft:item",
        "functions": [
          {
            "function": "minecraft:enchant_randomly",
            "options": "#minecraft:on_random_loot"
          }
        ],
        "name": "minecraft:book",
        "weight": 20
      },
      {
        "type": "minecraft:item",
        "name": "minecraft:golden_apple",
        "weight": 20
      },
      {
        "type": "minecraft:item",
        "name": "minecraft:enchanted_golden_apple",
        "weight": 2
      },
      {
        "type": "minecraft:empty",
        "weight": 15
      }
    ],
    "rolls": {
      "type": "minecraft:uniform",
      "max": 4.0,
      "min": 2.0
    }
  }
}

Clone this wiki locally