recipes - lpsmods/lps-recipe-core GitHub Wiki
Create your own NBT recipes using LPS Rcore API.
Recipes are stored in rcore:register recipes
.
Create
- Create a MCFUNCTION file in your datapack called
recipes.mcfunction
. This file can be located anywhere in your datapack. - Now using the NBT Schema and examples from below you can add all your recipes to the created recipes.mcfunction.
- You now need to create a function tag located
data/rcore/tags/functions/register_recipes.json
and enter the path to your recipes function. - Now in-game run
/reload
to reload your datapack. Then run/function rcore:reload
to reload all recipes
NBT Schema
Name | Type | Description |
---|---|---|
id |
String | ID of the recipe. should be unique between recipes |
tags |
Array[String] | List of table tags that this recipe should work for |
type |
RecipeType | shaped All items need to be in these exact slots. shapeless - Any item in this table |
Example
Shapeless recipe
data modify storage rcore:register recipes append value {tags: ['example'], id: "my_shapeless_recipe", type: 'shapeless', ingredients: [{id: "minecraft:flint"}, {id: "minecraft:iron_ingot"}], result: {id: "minecraft:flint_and_steel"}}
Shaped recipe
data modify storage rcore:register recipes append value {tags: ['example'], id: 'my_shaped_recipe', type: 'shaped', pattern: ["d ", " d ", " s"], keys: {d: {id: "minecraft:diamond"}, s: {id: "minecraft:stick"}}, result: {id: "minecraft:diamond_sword"}}
Minecraft Recipes
To register a Minecraft recipe (Recipe hidden behind a settings toggle.) follow all the steps above but instead of adding the recipes function in register_recipes.json
you add it to register_minecraft_recipes.json
in the same folder.