craftRecipe#
Defines a crafting recipe.
This block can be soft overridden in scripts.
Hierarchy#
Valid Parent Blocks:
Required Child Blocks:
Possible Child Blocks:
ID Properties#
This block should have an ID.
Parameters#
- AllowBatchCraft π
Type:
booleanThe AllowBatchCraft parameter is used to allow the recipe to be crafted in batches. This will make a slider appear on the crafting to craft multiple ones at once. Needs to be a boolean and default is true, set to false to disable batch craft.
Default:
True
- AutoLearnAll π
Type:
AnyThe
autoLearnAllparameter specifies that all the provided skills and their associated level need to be reached to learn the recipe. The parameter should be formated this way:/* a single skill */ autoLearnAll = <skill name>:<level amount>, /* multiple skills */ autoLearnAll = <skill1 name>:<level amount>;<skill2 name>:<level amount>,format
For the list of available skills, see this.
For example:
autoLearnAll = Carving:3;Maintenance:2,
- AutoLearnAny π
Type:
AnyThe autoLearnAny parameter specifies that at least one of the skills and its associated level need to be reached to learn the recipe. The parameter should be formated this way:
/* a single skill */ autoLearnAny = <skill name>:<level amount>, /* multiple skills */ autoLearnAny = <skill1 name>:<level amount>;<skill2 name>:<level amount>,format
For the list of available skills, see this.
For example:
autoLearnAny = Carving:3;Maintenance:2,
- category π
Type:
AnyThe category under which the recipe will be listed in the crafting menu. Helps to organize and identify recipes in the crafting menu. Currently doesnβt support translations (confirmed last 42.15).
- Icon π
Type:
AnySpecifies the icon associated with this crafting recipe. The icon needs to be located in
media/textures, for examplemedia/textures/myIcon.pngwill be refered to asIcon = myIcon,.This seems to be used only once in the vanilla recipes with the entry Icon = βItem_WaterDropβ, as the icon usually defaults to the items that will be crafted.
- MetaRecipe π
Type:
AnyA meta recipe is used to link two recipes so that if the meta recipe is known then this recipe will be known.
- NeedToBeLearn π
Type:
AnyWhether the recipe needs to be learned before it can be crafted.
- OnCreate π
Type:
AnyThe OnCreate parameter allows the referencing of a Lua function that will be called when the crafting recipe is finished. This can be used to add custom behavior to the crafting recipe when it gets finished. The Lua function needs to be a global function#Local_and_global), it can also be in a global table. The vanilla game OnCreateβs are stored in the Java.
The function should have the following structure:
function MyOnCreateFunction(craftRecipeData, character) -- your custom code here end
The
craftRecipeDatais a java object that contains the data of the crafting recipe. Thecharacteris the player character who is crafting the recipe.
- OnTest π
Type:
AnyThe OnTest parameter is used to define a Lua function that will be called to verify if the recipe can be crafted. If the function returns true, the recipe can be crafted but if the function returns false, the recipe cannot be crafted. The Lua function needs to be a global function#Local_and_global), it can also be in a global table. The vanilla game OnTestβs are stored in the Java.
The function should have the following structure:
function MyOnTestFunction(item, character) -- your custom code here return logicTestResult -- based on your logic test above end
itemis an InventoryItem whilecharacteris the player trying to craft this recipe.
- overlayStyle π
Type:
AnyNo description
- recipeGroup π
Type:
AnyNo description
- ResearchAny π
Type:
AnyNo description
- ResearchSkillLevel π
Type:
AnyNo description
- SkillRequired π
Type:
AnySpecifies the skill level required to perform this crafting action. It should be formated this way:
/* a single skill */ skillRequired = <skill name>:<level>, /* multiple skills */ skillRequired = <skill1 name>:<level>;<skill2 name>:<level>,
For the list of available skills, see this.
For example:
skillRequired = Blacksmith:3;Tailoring:2,
- time π
Type:
AnyThe time it takes to craft the item, not using a specific unit of time.
Default:
50
- timedAction π
Type:
AnyRefers to a timed action script block, used to trigger during the crafting process, for animations and/or sounds but also the calories burned and body heat generation.
- Tooltip π
Type:
AnyDescription of the crafting which is shown in the crafting menu.
- xpAward π
Type:
AnySpecifies the experience points awarded for crafting this item. The parameter should be formated this way:
/* a single skill */ xpAward = <skill name>:<xp amount>, /* multiple skills */ xpAward = <skill1 name>:<xp amount>;<skill2 name>:<xp amount>,format
For the list of available skills, see this.
For example:
xpAward = Blacksmith:10;Tailoring:5,