ChestLootControl

ChestLootControl

Adds admin commands to clear all chests or fill them with customizable loot and probability in Minecraft worlds.

by
21 Downloads
fabricmanagementutility
Rent Server with this Mod

About this Mod

ChestLootControl - Chest Loot Control

📖 Introduction
ChestLootControl is a lightweight Fabric admin utility mod that gives you full control over the items inside all chests in the world through simple commands. Clear every container in one go, or randomly refill them with fully customizable items—including full NBT support. Perfect for map makers, server admins, and modpack testing.

✨ Features
One-click container clearing: Use /clearallchests to instantly remove all items from every loaded chest, trapped chest, barrel, and shulker box in the world.

Probability-based item filling: Use /fillchests to randomly fill containers with your choice of items at a custom probability.

Fully customizable items: Specify any vanilla item with a configurable quantity range (e.g., minecraft:diamond:1-3).

Full NBT support: Supports the same NBT format as the /give command—add enchantments, potion effects, custom names, and more.

Instant effect, no reloads: Commands take effect immediately; no server reload or chunk reloading required.

Low performance impact: Only iterates over currently loaded chunks, keeping things lightweight and efficient.

📋 Commands
Command Parameters Description
/clearallchests None Clears all items from every container in all loaded chunks
/fillchests Fills containers with random items at the specified probability
Permission required: Operator (level ≥ 2)

🎮 Usage
Clear all chests
text
/clearallchests
After execution, all loaded chests are emptied instantly. The chat will display the number of containers cleared.

Fill chests with items
Basic usage – plain items

text
/fillchests 0.8 minecraft:diamond:1-3, minecraft:iron_ingot:5-10
This means 80% of chests will randomly receive either diamonds (1–3) or iron ingots (5–10).

Advanced usage – items with NBT

text
/fillchests 0.5 minecraft:diamond_sword:1 {Damage:0,Enchantments:[{id:"minecraft:sharpness",lvl:3}]}, minecraft:potion:1 {Potion:"minecraft:strong_healing"}
This means 50% of chests will be filled with a Sharpness III diamond sword or an instant health II potion.

Parameter details
Probability: A float between 0.0 and 1.0

0.0 = no chests are modified

0.5 = roughly half of all chests

1.0 = every chest is filled

Item list format:

text
namespace:item_id:min-max [optional NBT]
Multiple items are separated by a comma ,

NBT follows the same syntax as the /give command

Quantities are rolled randomly within the given range

🎯 Use Cases
Adventure map creation – Quickly populate dungeon chests with loot

Server events – Refresh all chests across the server for limited-time events

Survival server management – Periodically clear public chests to prevent item hoarding

Modpack testing – Fill containers with test items without placing them manually

Minigame worlds – Randomize resource distribution for extra replayability

📦 Installation
Install Minecraft 1.20.1 and Fabric Loader 0.14.21 or newer

Install Fabric API

Place the mod's .jar file into your .minecraft/mods/ folder

Launch the game, enter a world, and use the commands

⚙️ Compatibility
Minecraft: 1.20.1

Mod loader: Fabric 0.14.21+

Required dependency: Fabric API

Dedicated server: ✅ Supported

Singleplayer: ✅ Supported (cheats must be enabled)

📝 Notes
Commands only affect containers in currently loaded chunks. Unloaded areas are not processed.

If the world contains a very large number of chests, consider running commands during low server activity to avoid brief lag.

/fillchests will clear the container's existing items before refilling it. Use with care.

When using NBT tags, make sure the format is correct; otherwise the item may fail to generate.

🖼️ Screenshots (Suggested)
Clear command feedback Fill command feedback
[Screenshot 1: /clearallchests result] [Screenshot 2: /fillchests result]
[Screenshot 3: Chest before/after clearing] [Screenshot 4: Chest containing NBT items]
❓ FAQ
Q: Some chests weren't cleared/filled. Why?
A: The command only processes loaded chunks. Move closer to the chests to load their chunks, or use a world preloader mod on servers.

Q: Can I target only a specific area instead of the whole world?
A: The current version works globally. Area-specific targeting is planned for a future update.

Q: Does it support loot tables?
A: Currently, items are defined directly in the command. Loot table integration is on the roadmap.

🔗 Links
Fabric API: https://modrinth.com/mod/fabric-api

📄 License
This project is licensed under the MIT License. You are free to use, modify, and distribute it, as long as you retain the original author notice and release your modifications under the same license.

Available Versions

ChestLootControl 1.0.1release
MC 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6fabric
May 1, 2026

How to Install ChestLootControl on Your Server

1

Order Server

Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).

2

Set fabric Loader

In the panel under "Egg", select the fabric loader and matching Minecraft version (1.20.6).

3

Install Mod

Open the mod browser in the dashboard and search for "ChestLootControl". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.

Compatibility

Mod Loaders

fabric

Minecraft Versions

1.20.6, 1.20.5, 1.20.4 (+3 more)

Server-side

Required

Recommended RAM

4 GB(min. 3 GB)

Frequently Asked Questions

ChestLootControl server crashes on startup – what to do?

Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.20.6). You can switch loaders with one click in the panel.

Is ChestLootControl compatible with fabric?

ChestLootControl officially supports fabric for Minecraft 1.20.6, 1.20.5, 1.20.4. The Mado dashboard automatically detects incompatible loader combinations.

Server lagging with ChestLootControl – how to optimize performance?

Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if ChestLootControl consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.

Rent Modded Server

Install ChestLootControl with just one click on your server.

Recommended RAM
4 GBab €8/mo
Min. 3 GB | +1 GB pro 8 Spieler
Create Server Now
1-Click Mod Install
NVMe SSD Storage
DDoS Protection included

Details

License
LicenseRef-MIT-License
Server-side
Required

Supported Versions

1.20.61.20.51.20.41.20.31.20.21.20.1