sH's Loot Refill
This mod adds random loot to chests, barrels, and shulker boxes around players, highlights them, and refills them after a configurable amount of time.
The mod is required on both the client and the server (highlighting and the editor communicate with the server through packets).
How It Works
- Every
scanIntervalTicksticks, the mod scans for containers within aradiusof each player. - Loot is assigned to each container. Items are generated when the container is opened (similar to dungeon chests).
- Containers with fresh loot are highlighted with a golden outline, visible through walls by default.
- After a container has been looted, a random timer between
refillMinSecondsandrefillMaxSecondsstarts. Once the timer expires, the container receives loot again (by default, only if it is empty).
Loot Editor (K Key)
An interface with three tabs: Chests / Barrels / Shulker Boxes. Each tab has its own loot list.
- Left side — Loot list. Each item has its own row containing an optional ID (for items such as TACZ weapons; see below), spawn chance (%), and minimum and maximum stack quantities (Min and Max). Each item is rolled independently. Click the X button to remove a row.
- Right side — All game items, including items from other mods. Weapons, ammunition, and attachments from TACZ and similar mods are also displayed. The arrows
<and>above the list let you browse items by mod. Hold>to view items from a specific mod, such as TACZ. The far-left position shows items from all mods. You can also enter@modidin the search field to filter by the beginning of a mod ID, and enter text to search by item name. - Drag an item from the right list to the left to add it. Alternatively, Shift-click an item on the right.
- The Settings... button opens the general settings, including radius, refill time, operating modes, highlight colors, and more.
- Operators (permission level 2) and single-player world owners can edit loot lists, even when cheats are disabled.
Weapons, Ammunition, and Attachments from TACZ and Similar Mods
TACZ does not register a separate item for every gun, ammunition type, or sight. Instead, it uses a single shared item for each category (tacz:modern_kinetic_gun, tacz:attachment, tacz:ammo), while the specific weapon or item variant is stored in a text field on the item itself. This means these items cannot simply be dragged into the loot list as-is. The loot list includes an ID column for this purpose.
- Drag the base item (or Shift-click it), such as
tacz:modern_kinetic_gun, into the loot list as usual. - Enter the ID of the specific weapon in the ID column, for example
tacz:m4a1ornitrogen:rsh_12. For attachments, enter the attachment ID; for ammunition, enter the ammunition ID. - The easiest way to find the exact ID is through TACZ itself. Enable "Display TACZ ID" in its settings (
config.tacz.client.render.enable_tooltip_id) and turn on advanced tooltips with F3+H. The item's ID will appear in its tooltip.
This functionality works out of the box for three TACZ items, which are already configured in variantItems (under radius/modes/etc. → press K → Settings...). You can also add similar items from other mods that use the same system without modifying the mod's code. Simply add a line containing <item id> <field name>.
If the ID field is left empty, the item can still be added, but the game will create it without a selected model or variant, resulting in the same "empty" item as before.
Container Modes
Each container type has its own mode: chestMode for chests, barrelMode for barrels, and shulkerMode for shulker boxes.
OFF— the mod completely ignores this container type.SELECTED— only containers configured with the Loot Wand are affected.AUTO— all containers within the configured radius are affected, except those placed by players ifignorePlayerPlacedis enabled. The Loot Wand also works in this mode.
Default settings: Chests and barrels use AUTO, while shulker boxes use SELECTED.
Highlighting
Each container type has its own highlight color for fresh loot:
- Chests — Gold (same as before).
- Barrels — Silver.
- Shulker Boxes — Blue.
The mod also supports containers from other mods. You just need to add the container ID
Colors can be configured separately using chestColor, barrelColor, and shulkerColor in the client settings. The color for containers waiting to be refilled and the Loot Wand selection color can also be configured there.
Additional Settings
- Gameplay settings are server-side and stored in
<world>/serverconfig/lootrefill-server.toml. They can be edited through the settings menu while in a world (single-player or as the host). - Highlight settings (colors for each container type, through-wall visibility, render distance, etc.) are client-side and stored in
config/lootrefill-client.toml. - H — quickly toggles highlighting on or off.
- Loot lists are stored in world data, not in TOML files.
Commands (Operators, Permission Level 2)
/lootrefill refill— immediately generates fresh loot in all eligible containers within the configured radius./lootrefill reset— resets the mod's internal tracking data for the current dimension. Containers configured with the Loot Wand retain their settings.
Important
The mod cannot distinguish between naturally generated chests and chests that were already in the world before the mod was installed. In AUTO mode, empty pre-existing chests will also receive loot.

