When you generate a structure, every chest, or for that matter, any tile entity with inventory contents, will keep their current inventory. That, of course, is not very practical for randomized loot.
Recurrent Complex provides a simple solution for that, though: Inventory Generators.
A complete inventory generator consists of multiple components, brought together by the same 'Group ID'. These inventory generators are then used, for example, by Inventory Generation Tags and Single Item Generation Tags, which you place in inventories, randomizing their contents on structure generation.
To create a new inventory generator, follow these steps:
- Grab an empty ('Create New Generator') inventory generation component (or an existing one if you want to edit or copy another).
- Fill your inventory with items you want to randomly generate. You can also use other inventory generation tags to randomly generate those recursively.
- Right click it when it's in your hand. A GUI will pop up.
- Enter an ID in the topmost text field - if you want to overwrite another component, choose one that already exists.
- Enter a group ID in the text field below - if you want to add to an existing inventory generator, choose its ID rather than a new one.
- Move the items into the appropriate slots, assigning their weights and min-max item counts.
- Click save, which will close the GUI.
- You will now find your component and the appropriate and Inventory Generation Tags and Single Item Generation Tags in the creative menu. Place them in your inventory.
- Go to a chest or other tile entity inventory, and place your desired inventory generation tags inside.
That is everything! Upon generation, your chests will now contain randomized loot. You can also instantly test your tags by shift right-clicking the chests, and then right clicking the component again to make adjustments.
Keep in mind that every inventory generation component is represented by a single file. If you want to share your structure, you have to add your components to the download, too.