Skip to content

Datapacks loot_table

Norevex edited this page Jul 29, 2026 · 1 revision

Datapacks-loot_table

Gym clear rewards are controlled by a Minecraft loot table.

Datapack Location

The default gym clear reward table is:

data/cobblebash/loot_table/rewards/gym_clear.json

To override it in a data pack, copy the file to the same path:

data/cobblebash/loot_table/rewards/gym_clear.json

Current Reward Behavior

CobbleBash currently uses one global gym clear loot table.

That means all normal gym clears pull from:

cobblebash:rewards/gym_clear

The loot table contains multiple pools such as common, uncommon, rare, and epic supplies, but those pools are still part of the same global reward table.

Basic Loot Table Shape

{
    "type": "minecraft:generic",
    "pools": [
        {
            "name": "common_supplies",
            "rolls": {
                "type": "minecraft:uniform",
                "min": 2,
                "max": 4
            },
            "entries": [
                {
                    "type": "minecraft:item",
                    "name": "cobblemon:potion",
                    "weight": 16,
                    "functions": [
                        {
                            "function": "minecraft:set_count",
                            "count": {
                                "type": "minecraft:uniform",
                                "min": 2,
                                "max": 4
                            }
                        }
                    ]
                }
            ]
        }
    ]
}

Common Edits

To add an item, add a new entry:

{
    "type": "minecraft:item",
    "name": "minecraft:golden_apple",
    "weight": 8
}

To make an item more common, increase weight.

To make an item less common, decrease weight.

To change stack size, add or edit a minecraft:set_count function.

Per-Gym Rewards

CobbleBash does not currently support separate reward tables for each gym type.

For example, there is not currently a separate built-in file for:

data/cobblebash/loot_table/rewards/fire.json
data/cobblebash/loot_table/rewards/water.json
data/cobblebash/loot_table/rewards/bug.json

That would require a code change so CobbleBash checks for a type-specific loot table and falls back to the global table when one is not present.

Clone this wiki locally