CONFIGURATION

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.

Configuration folder
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.

FilePurpose
settings.jsonGeneral settings and stored permission options.
rarities.jsonRarity names, IDs, colors, descriptions, and weights.
loot_tables/loot_tables.jsonLoot table definitions, item pools, selection systems, and odds.
loot_tables/container_assignments.jsonRules 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

SettingDefaultDescription
defaultRewardChance0.25Reserved for a future default reward chance feature. Not implemented yet.
enableRewardNotificationstrueReserved for future reward notification controls. Not implemented yet.
requireOptrueStored permission option. Not currently used by server-side authorization.
allowlistEnabledfalseStored option for enabling an allowlist. Allowlist enforcement is not implemented yet.
allowOpBypasstrueStored 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.
Implementation status

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

RarityIDDefault colorWeight
Commoncommon#55FF5560.0
Uncommonuncommon#AAFF5525.0
Rarerare#55AAFF10.0
Epicepic#AA55FF4.0
Legendarylegendary#FFAA001.0
Mythicmythic#35CFFF0.1

The default rarity weights add up to 100.1. These are relative weights, not guaranteed percentages.

Rarity properties

PropertyDefaultRequirements
idcommonRequired. Lowercase letters, numbers, underscores, and hyphens. Must be unique.
displayNameCommonRequired and cannot be blank.
color#55FF55Must be a six-digit hexadecimal color beginning with #.
description""Optional. Can be blank.
weight60.0Must 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.
Missing rarity definitions

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.

PropertyDefault value
idoverworld
displayNameOverworld Rewards
descriptionStarter rewards for overworld containers.
chanceSystemFIXED
selectionSystemRARITY
rewardChance0.25

Loot table properties

PropertyDefaultRequirements
iddefaultRequired. Lowercase letters, numbers, underscores, and hyphens. Must be unique.
displayNameDefault Loot TableRequired and cannot be blank.
description""Optional description.
chanceSystemFIXEDFIXED or PROGRESSIVE.
selectionSystemRARITYRARITY or INDIVIDUAL.
rewardChance0.25Must be between 0 and 1, inclusive. Not implemented in runtime reward calculations yet.
itemsDefault item poolRequired. Must contain at least one valid item with a positive weight.
fixedOddsDefault fixed oddsRequired and must pass fixed odds validation.
progressiveOddsDefault progressive oddsRequired and must pass progressive odds validation.
About rewardChance

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

PropertyDefaultDescription and validation
itemIdminecraft:diamondMinecraft item registry ID. Must use a valid namespace and item path.
rarityIdcommonRarity assigned to this item. Must reference an existing rarity when using RARITY selection.
weight1.0Item selection weight. Must be finite and greater than or equal to 0.
minCount1Minimum stack size. Must be at least 1.
maxCount1Maximum 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

ItemRarityWeightCount range
minecraft:diamondCommon10.01–2
minecraft:emeraldUncommon7.01–3
minecraft:diamond_swordRare4.01
minecraft:netherite_ingotLegendary1.01
minecraft:nether_starMythic0.11

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.
Item names

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:

  1. Select a rarity using the configured rarity weights.
  2. 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.

Choosing a selection system

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

PropertyDefaultDescription
formatRATIOChooses the fixed odds format.
percentage1.0Reward chance as a percentage when using PERCENTAGE.
numerator1Numerator of the reward chance ratio.
denominator100Denominator 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

PropertyDefaultDescription and validation
startingChance1.0Initial reward chance as a percentage. Range: 0–100.
increasePerFailure1.0Percentage points added for each eligible failure. Must be finite and nonnegative.
maximumChance100.0Maximum reward chance. Range: 0–100.
failuresBeforeIncrease0Number of failed attempts before increases begin. Must be nonnegative.
resetAfterRewardtrueWhether 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 attemptsReward chance
01%
12%
23%
56%
1011%
5051%
99100%

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 resetAfterReward is 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

PropertyDefaultDescription and validation
idoverworld_containersRequired unique identifier. Lowercase letters, numbers, underscores, and hyphens.
displayNameOverworld ContainersDisplay name for the assignment.
blockId""Optional single block registry ID.
blockTaglootcontainers:loot_containersOptional block tag used to match multiple blocks.
blockIds[]Optional list of individual block registry IDs.
lootTableIdoverworldRequired ID of an existing loot table.
enabledtrueWhether 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.

  1. The server finds the matching container assignment.
  2. The container's identity is retrieved or created.
  3. The server checks whether that player already has a reward result for that container.
  4. An item is selected using the loot table's selection system.
  5. The selected item stack is built using its configured count range.
  6. The configured fixed or progressive reward chance is rolled.
  7. If successful, the reward is delivered and the result is recorded.
  8. If unsuccessful, the failed attempt is recorded for progressive pity when applicable.
One attempt per player and container

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.