Loot

This page will go over Basics in Loot

Topics

Every setting with a * is mandatory for this file

Introduction

Loot are json files and they are placed in the loot folder. Loot tables can be referenced when defining loot in different dimensions, biomes, regions and even structures. They decide which items spawn in the chests they are assigned to.

Note that loottables are somewhat sensitive and can quite easily be broken by, for example, placing the minimal amount of items higher than the maximal amount the chest can actually hold.

Make sure the settings you make are possible beforehand.

Check out Loot in Biomes to add the loot table you configure using this page to biomes.

Default in the example

The Loot file is called loot1.json and can be found in the loot folder:

{
    "name": "loot1",
    "loot": [
        {
            "type": "wooden_sword",
            "rarity": 3,
            "slotTypes": "STORAGE"
            "minAmount": 1,
            "maxAmount": 3,
            "displayName": "Le Slap",
            "enchantments": [
                {
                    "enchantment": "KNOCKBACK",
                    "chance": 0.2,
                    "minLevel": 1,
                    "maxLevel": 2
                }
            ],
        },
        {
            "type": "fishing_rod",
            "rarity": 11,
            "slotTypes": "STORAGE"
            "maxAmount": 1,
            "minDurability": 0.5,
        },
        {
            "type": "sugar",
            "rarity": 4,
            "slotTypes": "STORAGE"
            "maxAmount": 3,
        }
    ]
    "minPicked": 3,
    "maxPicked": 30,
    "rarity": 2
}

General Explanation

Loot tables have many different RNG based rolls.

Settings

1 - Name *

"name": "loot1"

This is the name of the loot table which does not affect anything other than the result of getting area information with the Statistics command.

To make sure you don't confuse yourself or Iris, name this the exact same as the file name.

2 - Loot *

"loot": [
    {
        "type": "wooden_sword",
        "rarity": 3,
        "slotTypes": "STORAGE"
        "minAmount": 1,
        "maxAmount": 3,
        "displayName": "Le Slap",
        "enchantments": [
            {
                "enchantment": "KNOCKBACK",
                "chance": 0.2,
                "minLevel": 1,
                "maxLevel": 2
            }
        ],
    },
    {
        "type": "fishing_rod",
        "rarity": 11,
        "slotTypes": "STORAGE"
        "maxAmount": 1,
        "minDurability": 0.5,
    },
    {
        "type": "sugar",
        "rarity": 4,
        "slotTypes": "STORAGE"
        "maxAmount": 3,
    }
]

The loot array contains all types of loot that can spawn using this loot configuration.

Each element contains the following:

"type": "wooden_sword"

The item

There are far more settings under loot which do stuff like add lore, durability and more. All these settings (with a short explanation, hopefully) are findable with the ctrl + space keycombination in VSCode.

3 - Min- & MaxPicked

"minPicked": 3,
"maxPicked": 30

Respectively the minimal and maximal boundary on the amount of times this loot tree that is picked

4 - Rarity

"rarity": 2

The overall chance a container this loot table is assigned to gets loot from this. This is absolute chance, meaning if this random roll fails, nothing will come from this table.

Mastering

If you cannot find the settings you're looking for here, check out the Template Mastering Page

Last updated