Skip to content

Datapack Guide

MrSilly07 edited this page Mar 14, 2026 · 1 revision

Datapack Guide

Research Cube is fully datapack-driven. You can add new research definitions, add or modify Drive Crafting recipes, and add Processing recipes all without writing any Java code.


What You Can Do With a Datapack

  • Add custom research at any tier
  • Define item and fluid costs for your research
  • Build prerequisite trees (AND/OR chains) between research entries
  • Create weighted recipe pools so research randomly unlocks one of several recipes
  • Add Drive Crafting recipes (shapeless or shaped)
  • Add Processing Station recipes

File Locations

Place your datapack files in a standard Minecraft datapack structure:

Content type Path
Research definitions data/<namespace>/research/*.json
Drive Crafting recipes data/<namespace>/recipe/*.json with "type": "researchcube:drive_crafting"
Processing recipes data/<namespace>/recipe/*.json with "type": "researchcube:processing"

All other standard datapack content (vanilla recipes, advancements, loot tables, etc.) works alongside ResearchCube content in the same pack.


Namespace Convention

Use your pack's unique identifier as the namespace. For example, if your pack is called my_pack, all your research IDs become my_pack:<filename> and all your recipe IDs become my_pack:<filename>.

Avoid using the researchcube namespace for your own content that is reserved for the base mod.


Applying Changes

Run /reload on a running server (or reload the world in singleplayer) to pick up new or changed datapack files. No restart required for datapack content.

If a research definition fails to parse, the server log will show a [ResearchCube] WARN message describing the error and the affected file. Other valid definitions will still load.


Schema Pages

Page Description
Research Definition Schema All fields for data/<ns>/research/*.json, including prerequisites and recipe pools
Drive Crafting Recipe Schema Fields for researchcube:drive_crafting recipe JSONs
Processing Recipe Schema Fields for researchcube:processing recipe JSONs

Quick Example

A minimal research + recipe pair:

data/my_pack/research/copper_circuit.json

{
  "name": "Copper Circuit",
  "tier": "BASIC",
  "duration": 800,
  "item_costs": [{ "item": "minecraft:copper_ingot", "count": 6 }],
  "fluid_cost": { "fluid": "researchcube:thinking_fluid", "amount": 500 },
  "recipe_pool": ["my_pack:copper_circuit_recipe"]
}

data/my_pack/recipe/copper_circuit_recipe.json

{
  "type": "researchcube:drive_crafting",
  "recipe_id": "my_pack:copper_circuit_recipe",
  "ingredients": [
    { "item": "minecraft:copper_ingot" },
    { "item": "minecraft:redstone" }
  ],
  "result": { "id": "minecraft:comparator", "count": 2 }
}

For a full step-by-step walkthrough, see Example Datapack.


Related Pages

Clone this wiki locally