Treasure bags is just another loot bag mod, but fully controlled by data packs. You can add any number of bags across any number of data packs. The mod includes no bag types by default, you must download a data pack or create your own.
Bag types allow you to set the bag's name, colors, and loot table. The items a treasure bag can contain is controlled by its loot table. This can be a preexisting loot table, or you can create you own. So, typically you will add a bag type JSON and a loot table for each bag.
At the moment, there is no easy way to add bag drops, it must be done through loot tables. I am looking into a couple options for this.
- Minecraft Forge for Minecraft 1.13.2+
- Silent Lib 4.x
To open a treasure bag, hold it in your hand and use it (right-click). The items will be added to your inventory, or dropped on the floor if there is not enough room. You can also sneak and right-click to open an entire stack at once.
Additional information can be seen in the treasure bag's tooltip by enabling advanced tooltips (F3+H). This includes the type ID and the loot table. The mod also adds some commands (/treasurebags) which can be used to give specific bag types or verify loaded types.
Creating a Data Pack
Please read the wiki for details. You will need to be familiar with JSON files and loot tables.