Configuration Reference
Learn how Loot Containers stores its configuration, what each setting controls, and how to customize loot tables, rarities, reward odds, and container assignments.
Configuration files are stored in your Minecraft configuration directory. Loot Containers creates its configuration folder and default files automatically when they are missing.
config/lootcontainers/On Windows, this folder is located inside your Minecraft instance directory.
Configuration files
Loot Containers uses separate files for general settings, rarity definitions, loot tables, and container assignments.
| File | Purpose |
|---|---|
settings.json | General settings and stored permission options. |
rarities.json | Rarity names, IDs, colors, descriptions, and weights. |
loot_tables/loot_tables.json | Loot table definitions, item pools, selection systems, and odds. |
loot_tables/container_assignments.json | Rules connecting blocks and dimensions to loot tables. |
All configuration files use JSON and are saved with pretty formatting to make manual editing easier.
General settings
General settings are stored in settings.json. These settings contain default values for reward behavior, notifications, and configuration permissions.
Default configuration
{
"defaultRewardChance": 0.25,
"enableRewardNotifications": true,
"requireOp": true,
"allowlistEnabled": false,
"allowOpBypass": true,
"allowedPlayers": []
}Setting reference
| Setting | Default | Description |
|---|---|---|
defaultRewardChance | 0.25 | Reserved for a future default reward chance feature. Not implemented yet. |
enableRewardNotifications | true | Reserved for future reward notification controls. Not implemented yet. |
requireOp | true | Stored permission option. Not currently used by server-side authorization. |
allowlistEnabled | false | Stored option for enabling an allowlist. Allowlist enforcement is not implemented yet. |
allowOpBypass | true | Stored permission option. Not currently used by server-side authorization. |
allowedPlayers | [] | Stores player entries for the allowlist interface. Entries are not currently enforced by server authorization. |
The general settings file is saved and loaded, but not every setting currently affects gameplay. The reward chance and notification settings are reserved for future functionality. The permission options are stored by the configuration screen, but do not replace the current server authorization checks.
Current server authorization
Server-side configuration synchronization and saving currently check whether a player has permission level 2 or higher. The stored permission options above do not change that check.
Rarity configuration
Rarity definitions are stored inloot_tables/../rarities.json, which resolves toconfig/lootcontainers/rarities.json.
Each rarity has an ID, display name, color, description, and selection weight. Rarity weights determine how likely each rarity is to be selected when a loot table uses the RARITY selection system.
Default rarities
| Rarity | ID | Default color | Weight |
|---|---|---|---|
| Common | common | #55FF55 | 60.0 |
| Uncommon | uncommon | #AAFF55 | 25.0 |
| Rare | rare | #55AAFF | 10.0 |
| Epic | epic | #AA55FF | 4.0 |
| Legendary | legendary | #FFAA00 | 1.0 |
| Mythic | mythic | #35CFFF | 0.1 |
The default rarity weights add up to 100.1. These are relative weights, not guaranteed percentages.
Rarity properties
| Property | Default | Requirements |
|---|---|---|
id | common | Required. Lowercase letters, numbers, underscores, and hyphens. Must be unique. |
displayName | Common | Required and cannot be blank. |
color | #55FF55 | Must be a six-digit hexadecimal color beginning with #. |
description | "" | Optional. Can be blank. |
weight | 60.0 | Must be finite and greater than or equal to 0. |
Rarity validation
- At least one rarity must exist.
- Rarity IDs must be unique, ignoring capitalization.
- At least one rarity must have a positive weight.
- Zero-weight rarities are valid but cannot be selected.
- Negative, infinite, and NaN weights are invalid.
- There is no configured upper limit for rarity weights.
When a valid rarity configuration is loaded, missing built-in rarity entries are added automatically. Existing entries are retained.
Loot table configuration
Loot tables are stored inconfig/lootcontainers/loot_tables/loot_tables.json. Each table defines its item pool, selection method, and reward chance system.
Default loot table
The default table created by the mod is namedoverworld and has the display nameOverworld Rewards.
| Property | Default value |
|---|---|
id | overworld |
displayName | Overworld Rewards |
description | Starter rewards for overworld containers. |
chanceSystem | FIXED |
selectionSystem | RARITY |
rewardChance | 0.25 |
Loot table properties
| Property | Default | Requirements |
|---|---|---|
id | default | Required. Lowercase letters, numbers, underscores, and hyphens. Must be unique. |
displayName | Default Loot Table | Required and cannot be blank. |
description | "" | Optional description. |
chanceSystem | FIXED | FIXED or PROGRESSIVE. |
selectionSystem | RARITY | RARITY or INDIVIDUAL. |
rewardChance | 0.25 | Must be between 0 and 1, inclusive. Not implemented in runtime reward calculations yet. |
items | Default item pool | Required. Must contain at least one valid item with a positive weight. |
fixedOdds | Default fixed odds | Required and must pass fixed odds validation. |
progressiveOdds | Default progressive odds | Required and must pass progressive odds validation. |
Although rewardChance is present in the loot table configuration and is validated, it is not currently used by the reward generator. Actual reward rolls use the selectedfixedOdds or progressiveOdds settings.
Loot item properties
Each loot table contains an items list. Every entry represents a possible reward.
Item properties
| Property | Default | Description and validation |
|---|---|---|
itemId | minecraft:diamond | Minecraft item registry ID. Must use a valid namespace and item path. |
rarityId | common | Rarity assigned to this item. Must reference an existing rarity when using RARITY selection. |
weight | 1.0 | Item selection weight. Must be finite and greater than or equal to 0. |
minCount | 1 | Minimum stack size. Must be at least 1. |
maxCount | 1 | Maximum stack size. Must be at least 1 and cannot be smaller than minCount. |
displayName | "" | Optional display name field. Custom item naming is not currently applied by the item builder. |
Default item pool
| Item | Rarity | Weight | Count range |
|---|---|---|---|
minecraft:diamond | Common | 10.0 | 1–2 |
minecraft:emerald | Uncommon | 7.0 | 1–3 |
minecraft:diamond_sword | Rare | 4.0 | 1 |
minecraft:netherite_ingot | Legendary | 1.0 | 1 |
minecraft:nether_star | Mythic | 0.1 | 1 |
Item validation
- Item IDs must contain a valid namespace and resource path.
- Item weights must be finite and cannot be negative.
- At least one item must have a positive weight.
- Minimum and maximum counts must both be at least 1.
- Minimum count cannot exceed maximum count.
- There is no configured maximum item weight or stack count.
- Items with zero weight are not selected.
The displayName field is accepted by the configuration validator, but the current item builder does not apply it to the resulting item stack.
Selection systems
Loot tables support two selection systems. The selected system determines how the item pool is evaluated before the reward chance is rolled.
RARITY
The RARITY system uses two weighted selection stages:
- Select a rarity using the configured rarity weights.
- Select an item from that rarity using the item weights.
A rarity is only eligible when it has at least one matching item with a finite positive item weight. Rarity weights and item weights serve different purposes.
INDIVIDUAL
The INDIVIDUAL system places all eligible items into one shared pool. It selects an item directly using that item's weight.
Rarity weights are ignored by this selection system. An item'srarityId may be blank, but if it is provided, it must reference an existing rarity.
Use RARITY when you want to control how often rarity tiers appear. Use INDIVIDUAL when you want every item to compete directly in one weighted pool.
Fixed odds
Fixed odds give every reward attempt the same chance. They are configured inside the loot table's fixedOdds object.
Default values
{
"format": "RATIO",
"percentage": 1.0,
"numerator": 1,
"denominator": 100
}Properties
| Property | Default | Description |
|---|---|---|
format | RATIO | Chooses the fixed odds format. |
percentage | 1.0 | Reward chance as a percentage when using PERCENTAGE. |
numerator | 1 | Numerator of the reward chance ratio. |
denominator | 100 | Denominator of the reward chance ratio. |
Supported formats
RATIO
The reward chance is calculated by dividing the numerator by the denominator.
{
"format": "RATIO",
"numerator": 1,
"denominator": 100
}This produces a 1% reward chance. The numerator and denominator must both be positive, and the numerator cannot exceed the denominator.
PERCENTAGE
The percentage field directly specifies the reward chance.
{
"format": "PERCENTAGE",
"percentage": 5.0
}This produces a 5% reward chance. The percentage must be between 0 and 100, inclusive.
Only the fields belonging to the selected format affect the calculated chance.
Progressive odds and pity
Progressive odds increase the reward chance after failed attempts. This system is commonly called a pity system.
Default values
{
"startingChance": 1.0,
"increasePerFailure": 1.0,
"maximumChance": 100.0,
"failuresBeforeIncrease": 0,
"resetAfterReward": true
}Properties
| Property | Default | Description and validation |
|---|---|---|
startingChance | 1.0 | Initial reward chance as a percentage. Range: 0–100. |
increasePerFailure | 1.0 | Percentage points added for each eligible failure. Must be finite and nonnegative. |
maximumChance | 100.0 | Maximum reward chance. Range: 0–100. |
failuresBeforeIncrease | 0 | Number of failed attempts before increases begin. Must be nonnegative. |
resetAfterReward | true | Whether the player's failure counter resets after a successful reward. |
How the chance increases
The chance begins at startingChance. After the configured number of initial failures, each additional failure addsincreasePerFailure percentage points.
Chance = startingChance
+ eligibleFailures * increasePerFailure
Chance = minimum(maximumChance, Chance)The final chance is capped by maximumChance. Negative failure counts are treated as zero.
Example using default values
| Failed attempts | Reward chance |
|---|---|
| 0 | 1% |
| 1 | 2% |
| 2 | 3% |
| 5 | 6% |
| 10 | 11% |
| 50 | 51% |
| 99 | 100% |
Failure delay example
If failuresBeforeIncrease is set to3, the initial chance remains unchanged for the first four attempts. The chance begins increasing after those failures.
Pity tracking
- Failure counters are tracked per player UUID and loot table ID.
- Failed progressive reward rolls increase the counter.
- Successful rolls do not increase the counter.
- When
resetAfterRewardis true, a successful reward resets the counter for that player and table. - When it is false, the existing counter is retained after a reward.
- Fixed odds do not use progressive failure tracking.
Pity information is stored using Minecraft's SavedData system and synchronized to the player when progressive odds are processed.
Container assignments
Container assignments connect blocks to loot tables. They are stored in config/lootcontainers/loot_tables/container_assignments.json.
Default assignment
{
"id": "overworld_containers",
"displayName": "Overworld Containers",
"blockId": "",
"blockTag": "lootcontainers:loot_containers",
"lootTableId": "overworld",
"enabled": true,
"blockIds": [],
"dimensionId": ""
}Assignment properties
| Property | Default | Description and validation |
|---|---|---|
id | overworld_containers | Required unique identifier. Lowercase letters, numbers, underscores, and hyphens. |
displayName | Overworld Containers | Display name for the assignment. |
blockId | "" | Optional single block registry ID. |
blockTag | lootcontainers:loot_containers | Optional block tag used to match multiple blocks. |
blockIds | [] | Optional list of individual block registry IDs. |
lootTableId | overworld | Required ID of an existing loot table. |
enabled | true | Whether the assignment is considered during matching. |
dimensionId | "" | Optional dimension registry ID. Blank means no dimension restriction. |
Block matching methods
Each assignment must use exactly one block matching method:
blockId— matches one specific block.blockIds— matches one of several specific blocks.blockTag— matches blocks belonging to a tag.
Dimension matching
A nonempty dimensionId restricts an assignment to that dimension. For example, minecraft:overworld matches the Overworld dimension.
Assignment priority
Assignments are checked in list order. The first enabled assignment that matches both the dimension and block is used. If multiple assignments match, earlier entries take priority.
Validation rules
- Assignment IDs must be unique, ignoring capitalization.
- Block IDs and block tags must be valid resource locations.
- Block ID lists cannot contain duplicate entries.
- Exactly one block matching method must be configured.
- The referenced loot table must exist.
- A nonempty dimension ID must be a valid resource location.
How reward attempts work
When a player interacts with an assigned container, the server processes the reward attempt.
- The server finds the matching container assignment.
- The container's identity is retrieved or created.
- The server checks whether that player already has a reward result for that container.
- An item is selected using the loot table's selection system.
- The selected item stack is built using its configured count range.
- The configured fixed or progressive reward chance is rolled.
- If successful, the reward is delivered and the result is recorded.
- If unsuccessful, the failed attempt is recorded for progressive pity when applicable.
Container reward results are tracked using container identities and player UUIDs. A recorded result prevents that player from rerolling the same container.
The selected item is built before the reward chance is rolled. If the chance fails, that item is discarded and no reward is delivered.
Configuration validation and saving
Loot Containers validates important configuration data before accepting changes.
- Rarity definitions are checked for valid IDs, colors, and weights.
- Loot tables are checked for valid odds, selection systems, and item entries.
- Container assignments are checked for valid matching rules and loot table references.
- Configuration changes submitted through the screen are validated on the server.
Loot table changes are validated before they are saved. The manager also restores the previous in-memory configuration if saving fails. The server configuration save process keeps backups and attempts to roll back files if a save operation fails.
Editing JSON manually
If you edit configuration files while the game is running, the current in-memory configuration may not immediately reflect those changes. Use the configuration screen or reload the relevant configuration through the appropriate mod workflow.
Recommended configuration practices
- Make a backup before manually editing configuration files.
- Keep rarity IDs consistent with the IDs referenced by loot items.
- Use positive weights for items and rarities you want to be selectable.
- Use the RARITY system when rarity-level balancing matters.
- Use the INDIVIDUAL system when all items should compete in one pool.
- Test reward odds with a small loot table before applying major changes.
- Check assignment order when multiple rules can match the same block.
