Skip to content
Ski-z edited this page Jul 27, 2025 · 2 revisions

Once you have a category created, you can link Recipes to that category!

Creating a Recipe Item

Start with:

mods.selectionguicrafting.recipe.recipeBuilder()
.register();

Link to a Category

.category(string categoryID) This must match an existing category ID string created previously. Example:

mods.selectionguicrafting.recipe.recipeBuilder()
.category("chopped_oak")
.register();

Recipe Requirements (Inputs)

Recipes can have multiple input requirements or just one.

  • .input(CT IItemStackInput) or .input(CT IItemStackInput, int damage) or .input(CT IItemStackInput, double chance) or .input(CT IItemStackInput, int damage, double chance) Sets a requirement/use of this item in the player's inventory, with optional chances to damage the item if it has durability, or a configurable chance it will be used as an input.
  • .mainhand(CT IItemStackInput) or .mainhand(CT IItemStackInput, int damage) or .mainhand(CT IItemStackInput, double chance) or .mainhand(CT IItemStackInput, double chance) This recipe item requires the player to be holding this in their mainhand when activating the trigger item/block, with optional amounts to damage the item or a chance it will be used.
  • .offhand(CT IItemStackInput) All methods available to mainhand are available to offhand.
  • .skill(string reskillableSkill, int reskillableLevel) Locks the recipe behind a Reskillable default skill or a Compatskill custom skill.
  • .advancement(string advancement) or .advancement(string advancement[])Locks the recipe behind an Advancement. Can use Triumph mod and its commands to find advancement locations easily.
  • .gamestage(string advancement) or .gamestage(string advancement[]) Allows one or multiple Gamestages to be added upon completion.

Example:

mods.selectionguicrafting.recipe.recipeBuilder()
.category("chopped_oak")
.input(<contenttweaker:chopped_oak>)
.register();

mods.selectionguicrafting.recipe.recipeBuilder()
.category("chopped_oak")
.input(<contenttweaker:chopped_oak>)
.mainhand(<minecraft:stone_axe>, 10) //10 damage per use
.register();

Recipe Outputs and Settings

Recipes can only have one output.

  • .output(CT IItemStackInput, float chance) Creates a recipe output with a float chance of success.
  • .time(int) Sets the default time (in ticks) that it takes to create this recipe. Can be affected by the Category Trigger settings.
  • .time(int) Sets the default experience granted upon completion. Can be affected by the Category Trigger settings.
  • .command(string command) or .command(String command[]) Allows one or multiple commands to be run upon completion.

Full Example:

//// Recipes for category chopped_oak ////

mods.selectionguicrafting.recipe.recipeBuilder()
.category("chopped_oak")
.input(<contenttweaker:chopped_oak>)
.output(<minecraft:log:0>)
.time(20)
.register();

mods.selectionguicrafting.recipe.recipeBuilder()
.category("chopped_oak")
.input(<contenttweaker:chopped_oak>)
.output(<minecraft:stick> * 4)
.time(20)
.register();


mods.selectionguicrafting.recipe.recipeBuilder()
.category("chopped_oak")
.input(<contenttweaker:chopped_oak>)
.output(<minecraft:planks> * 4)
.mainhand(<minecraft:stone_axe>, 10) //10 damage per use
.skill("compatskills.crafting", 4)
.time(30)
.register();

image

In this example, the previous category was created and then recipes were added to it. This particular recipe takes one of the trigger items and turns it into 4 planks, as long as the player has the custom Crafting skill from reskillable/compatskills. It takes 30 ticks to complete.

Clone this wiki locally