This page will go over Basics in Loot
Every setting with a *
is mandatory for this file
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.
The Loot file is called loot1.json
and can be found in the loot
folder:
Loot tables have many different RNG based rolls.
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.
The loot array contains all types of loot that can spawn using this loot configuration.
Each element contains the following:
The item
The chance this item is picked on each iteration. Always 1 / x chance if this element is picked.
The type of the slot the item can spawn in. Types:
STORAGE
Most used, simple slot like in a chest, barrel, etc.
FUEL
Fuel slot of any type of furnace
FURNACE
Furnace slot of a normal furnace
SMOKER
Furnace slot of a smoker
BLAST_FURNACE
Furnace slot of a blast furnace
Respectively the minimal and maximal boundary on the amount of this type of item that is / are picked
The name of the item
The (possible) enchantments applied to the item.
This should only work on items that can actually get that enchantment but that may not always be the case.
Option
Setting
Effect
"enchantment":
"KNOCKBACK"
Applied enchantment
"chance":
0.2
Chance of application
"minLevel":
1
Minimal level
"maxLevel":
2
Maximal level
Note that the minimal and maximal level are equally distributing all levels inbetween and including themselves after chance is picked. This means that if the enchantment is applied, the chance of all levels of the enchantment is equal.
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.
Respectively the minimal and maximal boundary on the amount of times this loot tree that is picked
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.
If you cannot find the settings you're looking for here, check out the Template Mastering Page