Back to 9Minecraft
Wiki 9Minecraft Wiki 9Minecraft
Loot Integrations Towns And Towers Wiki › Guides › Adding or Removing Specific Items From Towns and Towers Chests

Adding or Removing Specific Items From Towns and Towers Chests

Working Within the Loot Table System

Because Loot Integrations: Towns And Towers routes chests through vanilla loot tables, you cannot simply delete one item from a chest. You have to change the table the chest points at, or edit that vanilla table's own JSON if you are running a datapack. The cleanest approach is to create your own loot table and point the structure's pool at it.

Creating a Custom Table

1. In your datapack, create a loot_tables folder under your namespace.

2. Copy an existing vanilla table JSON that is close to what you want and paste it into a new file with your own name.

3. In the entries list, remove the item entries you do not want and adjust the weight values of the ones you keep. Higher weight means it appears more often.

4. If you want an item to be rarer, lower its weight rather than deleting it.

5. Save the file and point the Towns and Towers chest pool at your new table's ID.

Verifying the Result

Run /reload, then open a chest in the affected structure. If your item is missing or too common, recheck the weight numbers and the table ID. Remember that weights are relative to each other, so changing one entry shifts the odds of everything else in that pool.