-
Notifications
You must be signed in to change notification settings - Fork 3
Rewards
Each time a player passes to the next level for a job, he receives items as rewards. You can customize precisely which items and in which quantities in the rewards.json file. The file has the following structure:
{
"miner":{
"3":[
{"item":"minecraft:diamond","count":2,"metadata":0},
{"item":"minecraft:emerald","count":10,"metadata":0},
{"item":"minecraft:iron_ingot","count":16,"metadata":0}
],
"5":[
{"item":"minecraft:diamond_block","count":1,"metadata":0},
{"item":"minecraft:emerald_block","count":1,"metadata":0},
{"item":"minecraft:stone","count":64,"metadata":0}
]
}
}
This file is probably the file with the most complicated structure, so be very careful when modifying it about the syntax ! In this file, for each job, you can add entries for levels. All jobs do not need to be in this file, and be careful to use levels that exist for that specific job (like configured in the levels.json file). For example, if the max level of Miner is 7, do not set rewards for level 8.
For each level, you can add as many rewards as you want. Rewards are basically item stacks : you can choose the item/block, the count and the metadata. (if you don't know what the metadata is or you don't want to use it, leave the metadata to 0). The count can be any number between 1 and 64 (or the max amount for your item, like 1 for any tool).
In this example configuration, when a player reaches Miner level 3, he will receive in his inventory 2 diamonds, 10 emeralds and 16 iron ingots. When he reaches Miner level 5, he will receive 1 diamond block, 1 emerald block and a full stack of stone blocks.
You can specify nbt tags for the reward items, by using the JSON structure of nbt tags. It is similar to how they work for the /give command in-game. This is an example with 3 items gained at Miner level 1:
- A Fortune III Diamond Pickaxe
- A rickroll book
- An enchanted book with all the best enchantments for a bow
This is the configuration file snippet to do that:
{
"miner":{
"1":[
{"item":"minecraft:diamond_pickaxe","count":1,"metadata":30, "tag": {"Enchantments":[{"id":"minecraft:fortune","lvl":3}]}},
{"item":"minecraft:written_book","count":1,"metadata":0, "tag": {"pages":["{\"text\":\"Never gonna give you up\"}"],"title":"Rickroll","author":"Rick Astley"}},
{"item":"minecraft:emerald","count":1,"metadata":0},
{
"item":"minecraft:enchanted_book",
"count":1,
"metadata":0,
"tag" :
{
"StoredEnchantments": [
{"id": "minecraft:power", "lvl": 5},
{"id": "minecraft:punch", "lvl": 2},
{"id": "minecraft:flame", "lvl": 1},
{"id": "minecraft:infinity", "lvl": 1}
],
"display": {
"Name": "{\"text\":\"Bow Enchantment Book\",\"color\":\"gold\",\"italic\":false}"
}
}
}
],
...
Note: This is only available from version 3.3.0.0 onwards. (currently only available for 1.18.2 and 1.20.1)
Don't forget to check your file syntax here: JSON Validator
Quick Links: Home --- Curseforge --- Patreon --- Templates