
Inject excitement into MiguelEconomy with fully customizable, animated loot crates! creating a unique reward system for your server
MiguelCrates turns simple item giving into an event. It adds fully animated, exciting lootboxes to your world that hook into your economy and keep players coming back for "just one more spin."
You don't need to be a programmer to make your own crates. It’s as easy as writing a shopping list:
config/migueleconomy/crates).common.json) and copy it. Rename it to something like vip_crate.json."minecraft:diamond"), how many to give, and how rare they should be.MiguelCrates uses JSON configuration files to define crates. This allows you to easily create new crates or modify existing ones without changing the mod code.
Crate configuration files are located in the config/migueleconomy/crates/ directory of your Minecraft instance.
config/migueleconomy/crates/Each crate is a separate .json file. The file name determines the unique ID of the crate (e.g., common.json -> common).
The basic structure of a crate JSON file is as follows:
{
"display_name": "My Custom Crate",
"description": "A description of what's inside.",
"icon": "minecraft:chest",
"texture": "miguelcrates:block/common_crate",
"rewards": [
...
],
"obtain": {
"sources": [
...
]
}
}
| Field | Type | Description |
|---|---|---|
display_name |
String | The name shown in GUIs and items. |
description |
String | Description text shown in tooltips. |
icon |
String | The Item ID used to represent the crate (e.g., minecraft:chest). |
texture |
String | Path to the texture for the custom renderer (usually miguelcrates:block/<name>). |
rewards |
List | A list of possible rewards (see below). |
obtain |
Object | (Optional) Defines how players can get this crate (see below). |
Instead of using complex NBT strings, you can use the enchantments block to add enchantments to an item. This works for both books and tools.
{
"item": "minecraft:enchanted_book",
"quantity": 1,
"enchantments": {
"minecraft:sharpness": 5,
"minecraft:unbreaking": 3
},
"weight": 10
}
For more complex data (attributes, names, etc.), you can still use the nbt field.
{
"item": "minecraft:diamond_sword",
"nbt": "{display:{Name:'{\"text\":\"Excalibur\"}'}}",
"weight": 5
}
The rewards list contains objects defining what players can win.
"rewards": [
{
"item": "minecraft:diamond",
"quantity": 2,
"weight": 10
},
{
"command": "give @p minecraft:stone 64",
"weight": 50
},
{
"item": "minecraft:experience_bottle",
"command": "xp add @p 5 levels",
"weight": 10
},
{
"item": "migueleconomy:money",
"nbt": "{MoneyValue:100L}",
"weight": 20
}
]
item: Resource location of the item (e.g., minecraft:iron_sword). If used with command, it acts as the icon.command: Command to execute. Use @p for the player opening the crate.name: (Optional) Custom display name for the reward (e.g. "5 Levels of XP").quantity: (Optional, default 1) Number of items to give.nbt: (Optional) NBT data string for the item.weight: The chance weight. Higher weight = higher chance.weight / total_weight_of_all_rewardsThe obtain section defines how crates are generated in the world. It contains a list of sources.
craft)Allows players to craft the crate in a crafting table.
{
"type": "craft",
"recipe": {
"type": "minecraft:crafting_shaped",
"category": "misc",
"pattern": [
"AAA",
"ABA",
"AAA"
],
"key": {
"A": { "item": "minecraft:planks" },
"B": { "item": "minecraft:chest" }
},
"result": {
"id": "miguelcrates:crate",
"count": 1,
"components": {
"minecraft:custom_data": { "CrateId": "your_crate_id" }
}
}
}
}
kill)Drops when a specific entity is killed.
{
"type": "kill",
"entity": "minecraft:zombie",
"chance": 0.05
}
entity: Entity ID (e.g., minecraft:creeper, minecraft:ender_dragon).chance: Probability from 0.0 to 1.0 (0.05 = 5%).loot_table)Injects the crate into vanilla loot tables (chests).
{
"type": "loot_table",
"id": "minecraft:chests/simple_dungeon",
"chance": 0.1
}
id: The Loot Table ID to inject into.chance: Probability the crate will appear in the chest.example.json){
"display_name": "Example Crate",
"description": "An example configuration.",
"icon": "minecraft:barrel",
"texture": "miguelcrates:block/common_crate",
"rewards": [
{
"item": "minecraft:apple",
"quantity": 5,
"weight": 50
},
{
"item": "minecraft:golden_apple",
"weight": 10
}
],
"obtain": {
"sources": [
{
"type": "kill",
"entity": "minecraft:skeleton",
"chance": 0.02
}
]
}
}
Use these commands to manage crates.
/miguelcrates give <player> <crate_id> [amount]
/miguelcrates give @p rare/miguelcrates give PlayerName common 5/miguelcrates default <name|all>
/miguelcrates default all (Restores all 20+ themed crates)/miguelcrates default miner (Restores just the Miner crate)/miguelcrates reload
/crates, /crate, or /box
