Adding your own custom research can be done with a single JSON file inside a data pack.
JSON Format
Research files are stored in the data/[your-mod-id]/research folder of a data pack.
TIP
All of these fields are optional!
#* Root tag #**
title: The title. Defaults to research.[your-mod-id].[research-id] #** description: The description. Defaults to research.[your-mod-id].[research-id].desc #** to_unlock: The requirements for unlocking the research. #*** criterion: The criterion that will be used to track progress. #**** trigger: The trigger for the criterion. #**** conditions: The conditions that need to be met when the trigger is activated. #*** count: The number of times the criterion must be triggered before the research is complete. #** prerequisites: A list of other researches that need to be completed before this can be unlocked. #** recipe_unlocks: A list of recipes that this research will unlock on completion. #** rewards: A list of rewards (loot, experience, fireworks, etc) that this research will grant on completion. #** display: The icon for the research. WARNING
Not all recipes can be locked! Because of how Minecraft works, only crafting_shaped, crafting_shapeless, and crafting_transmute recipes are supported. If your mod adds a custom recipe type and you would like to be compatible with Researcher, see Custom Recipe Types
WARNING
If your mod adds a custom CriteriaTrigger (which it probably doesn't), it will show an error in the UI. See Custom Criteria Triggers for more info.
An Example
json
{
"title": "My Custom Research",
"toUnlock": {
"count": 10,
"criterion": {
"trigger": "minecraft:slept_in_bed"
}
},
"recipeUnlocks": [
"minecraft:cookie",
"minecraft:golden_pickaxe",
"minecraft:brown_shulker_box",
"minecraft:detector_rail",
"minecraft:mangrove_hanging_sign"
]
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

