Community listing page, reviews here may not be monitored by the author.
Chest Loot Randomizer
No reviews yet
Quickly fill the chests within the designated area with random content from the config.
Community voices
Reviews
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
Resources
External Links
About
Description
Chest Loot Randomizer
Version: 1.0.0
Minecraft: 1.21.1
Loader: NeoForge 21.1.243+
Java: 21
Author: Sl0n1kNash
License: MIT
Quickly fill the chests within the designated area with random content from the config.
Purpose
Chest Loot Randomizer quickly replaces the contents of existing chests and other supported container blocks inside a designated square area. The search center and radius can be configured in JSON or changed directly with commands in the world.
The mod is intended for survival maps, PvP and extraction-style events, custom adventure maps, server scenarios, pre-generated worlds, and other setups where many existing containers need to be populated from one configurable random loot pool.
The randomizer does not place new chests. It searches for supported inventories that already exist, clears their current contents, and fills random slots according to the configured loot rules.
How it works
- Set the search center with
/clr center,/clr center <x> <z>, or the JSON configuration. - Set the search radius with
/clr radius <blocks>or the JSON configuration. - Run
/clr run. - Chest Loot Randomizer scans the square from
center - radiustocenter + radiuson X and Z. - Matching chest-like block entities are collected from the scanned chunks.
- Their previous contents are cleared.
- Every configured loot entry is rolled independently for each supported container.
- Successful entries are placed into random compatible slots with a random stack size between
stack_size_minandstack_size_max. - Missing or unavailable loot entries are reported after the run instead of silently replacing them with another item.
Container behavior
- Vanilla chest blocks are matched by the default
chestblock-id token. minecraft:barrelis supported by default through the exact-id list.- Typical modded chest ids containing
chestcan be detected automatically. - Additional exact block ids can be added through
additional_chest_ids. - Vanilla
Containerinventories are supported directly. - Compatible modded inventories can be accessed through NeoForge block item-handler capabilities when the handler is modifiable.
/clr runoverwrites existing contents; it is not an additive loot pass.
Loot rules
A normal loot entry uses this structure:
{
"item": "minecraft:iron_ingot",
"probability": 0.12,
"stack_size_min": 1,
"stack_size_max": 6
}
| Field | Description |
|---|---|
item |
Minecraft item registry id or item tag. Tags can use the #namespace:path form. |
probability |
Independent probability from 0.0 to 1.0 for this entry in each container. |
stack_size_min |
Minimum generated stack size. |
stack_size_max |
Maximum generated stack size. |
Generated stack sizes are still limited by the item and target slot limits.
Configuration
| Field | Default | Description |
|---|---|---|
center_x |
0 |
Search center X coordinate. |
center_z |
0 |
Search center Z coordinate. |
center_set |
false |
Whether the stored center is active. /clr center sets this to true. |
radius |
128 |
Search radius in blocks. The processed area is a square. |
load_chunks |
true |
Loads chunks while scanning. This can generate previously ungenerated terrain. |
chest_id_contains |
["chest"] |
Block-id path tokens treated as chest-like containers. |
additional_chest_ids |
["minecraft:barrel"] |
Exact additional container block ids. |
TaCZ support
Chest Loot Randomizer includes optional support for TaCZ data-driven content.
TaCZ guns, ammunition, and attachments use shared base Minecraft item ids with their concrete variant stored in item data. For these entries CLR supports two extra fields:
{
"item": "tacz:modern_kinetic_gun",
"tacz_type": "gun",
"tacz_id": "tacz:ak47",
"probability": 0.01,
"stack_size_min": 1,
"stack_size_max": 1
}
Supported values:
tacz_type |
Purpose |
|---|---|
gun |
Creates the requested TaCZ gun variant. Guns are forced to a stack size of 1. |
ammo |
Creates the requested TaCZ ammunition variant. |
attachment |
Creates the requested TaCZ attachment variant. |
If TaCZ is absent, incompatible, or a configured tacz_id cannot be created, that loot entry is skipped and reported after /clr run.
Commands
The /clr command requires permission level 2.
| Command | Description |
|---|---|
/clr center |
Uses the executing player's current X/Z as the search center. |
/clr center <x> <z> |
Sets the search center explicitly and also works from the server console. |
/clr radius <blocks> |
Sets the square search radius. |
/clr status |
Shows the current version, center, radius, chunk-loading mode, and loot-entry count. |
/clr reload |
Reloads config/chest_loot_randomizer.json. |
/clr run |
Clears and randomly refills all matching supported containers in the configured area. |
Alias: /chestloot.
Performance and safety
The scan is synchronous. Large search radii can temporarily stall the integrated or dedicated server while chunks and block entities are processed.
With load_chunks=true, CLR requests chunks across the whole configured square. This can generate terrain that did not previously exist. Set load_chunks=false when only currently loaded chunks should be processed.
Because /clr run clears previous container contents, make a backup before processing an important world or map.
Compatibility
- Minecraft 1.21.1
- NeoForge 21.1.243 or newer within the 1.21.1 branch
- Java 21
- Dedicated servers and integrated servers
- Compatible modded chest-like inventories
- Normal modded item registry ids and item tags
- Optional TaCZ data-driven guns, ammunition, and attachments
Screenshots
Gallery
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers
Statistics
Resources