-
Notifications
You must be signed in to change notification settings - Fork 0
Datapacks loot_table
Gym clear rewards are controlled by a Minecraft loot table.
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
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.
{
"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
}
}
]
}
]
}
]
}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.
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.