Custom Containers and Maps - LootrMinecraft/Lootr GitHub Wiki
Lootr works by detected loot tables in eligible blocks. (To read more about how it works, please check the How Lootr works page on this Wiki).
The location of custom chests is extremely important. If you place it within spawn chunks, be aware that spawn protection may prevent non-operators from opening the container.
In recent versions for 1.21.1 (100 and later), Lootr contains a configurable (default true) option that allows players to interact with Lootr containers, bypassing spawn protection. Please note that this feature is new and hasn't been ported beyond 1.21.1.
If you wish to create a "spawn" chest, for example, and you do not wish to spend the time to create a data pack with a custom loot table, you can use the simpler method with the /lootr custom (in 1.21.1, 100 and later, this is now /lootr custom-chest) command.
To use this method, ensure you have the correct permissions, spawn an eligible block (currently minecraft:barrel and minecraft:chest) and place the specific items you want to be generated for your players inside it.
Then, stand on the container and execute /lootr custom (or /lootr custom-chest). This will convert it into a lootr:lootr_inventory.
Inventories function exactly the same as other Lootr containers: each player who opens the container will have loot specifically generated for them.
However, unlike other Lootr containers, this loot will not be based off a loot table, but be a copy of all of the items originally placed in the container before the /lootr custom (or /lootr custom-chest) command was executed.
The /lootr convert (in 1.21.1, 100 and later, this is now /lootr custom-area) accepts and positions similar to the /fill command. It will attempt to convert all eligible containers found in that area into lootr:lootr_inventorys as per the /lootr custom (or /lootr custom-chest) command.
Some custom maps may add "loot chests" with specifically selected items in them, rather than using loot tables. In 1.21.1 100 and later, there is a /lootr custom-map <level> command.
This command slowly converts all containers in the specified dimension which are a) not empty, and b) do not have a loot table associated with them and c) eligible to be converted as per /lootr custom (or /lootr custom-chest) into lootr:lootr_inventorys.
This force-loads all generated chunks within that dimension.