Reward Box Core - Technical Documentation
reward_box is a data-driven chest framework for Minecraft 1.20.1 (Forge). DataPacks control chest contents, textures, block-break drops, and player ownership locks.
1. Overview & Architecture
- Client/Server Separation: Server processes chest logic and loot generation. Client processes chest textures and 3D item rendering.
- Lazy Loot Generation: Loot generates only when a player opens the chest for the first time.
2. JSON Configuration
Store chest definitions in the following DataPack path:
data/<namespace>/reward_boxes/<box_name>.json
{
"box_id": "stones:resonance_box",
"texture": "stones:textures/entity/chest/resonance_chest.png",
"lock_duration_seconds": 300,
"break_drop_item": "minecraft:lapis_lazuli",
"break_drop_count": 1,
"guaranteed_items": [
{
"item": "minecraft:diamond",
"count": 2
}
],
"vanilla_loot_pools": [
{
"loot_table": "minecraft:chests/simple_dungeon",
"rolls": 3
}
]
}
Parameter Specification
| Key | Type | Description | Default |
|---|---|---|---|
box_id |
String | Unique identifier of the chest. | (Required) |
texture |
ResourceLocation | Path to the 64x64.png texture in mod resources. |
Default texture |
lock_duration_seconds |
Integer | Lock duration in seconds. Set to 0 to disable locks. |
300 |
break_drop_item |
ResourceLocation | Item ID dropped when the block is broken. | reward_box:reward_chest |
break_drop_count |
Integer | Quantity of items dropped when the block is broken. | 1 |
guaranteed_items |
Array | List of items that always generate in the chest. | [] |
vanilla_loot_pools |
Array | List of Vanilla loot tables to roll for chest loot. | [] |
###3. Mechanics & Permission System -Player Lock: The BlockEntity saves player UUID and name on block placement. Other players receive an action bar message with remaining lock time.
-Admin Bypass: Players in Creative mode or with permission level 2+ can open locked chests at any time.
-Item NBT Data: Chest items read properties from NBT tags BoxId (String) and RewardTier (Integer).
-Creative Tab & JEI/EMI: The Creative Tab dynamically lists all loaded JSON configurations with example tiers.

