Skip to content

Reward Datapacks

fantastruco edited this page Aug 15, 2026 · 3 revisions

Reward Datapacks

Reward Bag contents use normal Minecraft 1.21.1 loot tables. The datapack does not change rarity chances, pity or anti-farm settings.

Download and install

Place the ZIP directly inside:text<world>/datapacks/

Then run:

/reload
/datapack list enabled

Included files

data/cobblecoop/loot_table/cobblecoop/rewards/|-- common/basic.json
|-- uncommon/basic.json
|-- rare/basic.json
|-- epic/basic.json
`-- legendary/basic.json

These use the same IDs as CobbleCoop, so the template replaces the five default basic.json pools.

Edit an item

{
  "type": "minecraft:item",
  "name": "minecraft:diamond",
  "weight": 5,
  "quality": 2,
  "functions": [
    {
      "function": "minecraft:set_count",
      "count": {
        "min": 1,
        "max": 3
      }
    }
  ]
}
Value Meaning
name Complete registered item ID.
weight Relative chance inside this JSON pool.
quality Optional influence from the Player's Minecraft Luck.
min / max Minimum and maximum item amount.
rolls Number of entries the pool tries to select.

Any registered modded item can be used when the mod that owns it is installed on the server.

Several JSON files in one rarity

CobbleCoop first selects one JSON file with equal probability. Minecraft then rolls entries and weights inside that selected file.

For example, these files each have a one-in-three selection chance:

common/basic.json
common/berries.json
common/balls.json

An item's weight does not change which JSON file is selected. Keep one basic.json per rarity when you want every item to share the same weighted pool.

Add a pool instead of replacing one

Use another namespace or file name:

data/myserver/loot_table/cobblecoop/rewards/rare/berries.json

No TOML registration is required. Subfolders below a valid rarity are also allowed. CobbleCoop rebuilds its in-memory pool list after /reload.

Replace one default pool

Use the original namespace and exact resource path:

data/cobblecoop/loot_table/cobblecoop/rewards/rare/basic.json

A higher-priority world datapack then replaces only the included Rare pool.

Test changes

Test one loot table directly:

/loot give @s loot cobblecoop:cobblecoop/rewards/common/basic

Test the complete bag opening process:

/give @s cobblecoop:common_reward_bag

Replace common with another rarity when needed.

Common mistakes

  1. Use loot_table, singular, for Minecraft 1.21.1.
  2. Use only common, uncommon, rare, epic, or legendary as tier folders.
  3. Keep namespaces and file names lowercase.
  4. Check commas, brackets and every item ID.
  5. Confirm the datapack appears in /datapack list enabled.
  6. Run normal /reload and check the server log for Loaded ... automatic reward pool(s).

Use /reload for datapacks. The /cobblecoop reload command only reloads TOML configuration.

Clone this wiki locally