π Recipes
In LiteCooking, recipes define how a custom crafting process works β from input ingredients to step-by-step actions, to the final reward.
Recipes are stored in the folder:
plugins/LiteCooking/recipes_config/
Each recipe is a standalone .json
file that can be written or generated manually.
π§© Recipe Structure
Each recipe contains:
Title | Title | Title |
---|---|---|
|
| (Optional) Required permission to access this recipe |
|
| Icon shown in the GUI for this recipe |
|
| Message shown upon successful completion |
|
| Items given to the player as output |
|
| Sequence of crafting steps |
π Stages
A stage represents a single crafting action the player must complete (e.g. add ingredient, stir, pour, etc.).
Each stage contains an items
array β but only one of those items will be chosen randomly at runtime.
This prevents automation and adds unpredictability to the crafting process.
"stages": [
{
"items": [ ... ] // one will be picked randomly
},
...
]
Think of it like: βin this step, add one of the following β but you donβt know which one until the process starts.β
π§ RecipeItem Fields
Each object in items
is a RecipeItem
with the following structure:
Field | Type | Description |
---|---|---|
item | LiteItem | The required item to use during this step |
mini_game | MiniGameConfig | The minigame to complete for this action |
tooltip | String | Tooltip shown in the GUI for this step |
animation | String | Animation ID to play on success |
time | int | Delay before the step becomes available (in ticks) |
reload_time | int | Cooldown after a failed attempt |
reload_tooltip | String | Message shown during reload |
π§ͺ Example Recipe
{
"permission": "litecooking.recipe.steel_sword",
"stages": [
{
"items": [
{
"item": {
"material": "IRON_INGOT"
},
"tooltip": "%time%\n{#C2C2C2}Add iron",
"time": 30,
"reload_time": 0
}
]
},
{
"items": [
{
"item": {
"material": "IRON_INGOT"
},
"tooltip": "%time%\n{#C2C2C2}Add iron",
"time": 30,
"reload_time": 0
}
]
},
{
"items": [
{
"mini_game": {
"type": "base",
"size": 10,
"speed": 5,
"health": 3,
"target_score": 3,
"animation_fail": "fail",
"animation_use": "anvil_use"
},
"tooltip": "%time%\n{#FFED8D}Forge the steel!",
"time": 30,
"reload_time": 0
}
]
},
{
"items": [
{
"item": {
"material": "STICK"
},
"tooltip": "%time%\n{#C2C2C2}Add stick",
"time": 30,
"reload_time": 5,
"reload_tooltip": "%time%\n{#C2C2C2}The sword is tempered...",
"animation": "stick_use"
}
]
}
],
"rewards": [
{
"material": "IRON_SWORD",
"display_name": "{#C2C2C2}Steel sword"
}
],
"reward_message": "{#C2C2C2}The Steel sword is ready"
}
In this example:
- The player sees a stage with the tooltip "Add a vegetable"
- Either a carrot or a potato will be required (chosen randomly)
- The player doesnβt know which until the moment arrives
- After success, the defined reward is granted
π‘οΈ Why Use Randomized Inputs?
This system:
- Prevents macro scripts and automation
- Keeps gameplay dynamic
- Allows multiple recipe variants using shared logic
You can even create stages that mix different mini-games and items for added variety.
β Summary
- Each recipe is a sequence of stages (one per step)
- Each stage randomly selects one item from its
items
list - This makes recipes non-deterministic and harder to script
- Every step can have a mini-game, tooltip, cooldown, animation, and delay
- Rewards and messages are fully configurable
π‘οΈ Example Recipe: Steel Sword
This is a full working example of a multi-stage recipe that guides the player through crafting a Steel Sword using step-by-step interactions and a forging minigame.
{
"permission": "litecooking.recipe.steel_sword",
"stages": [
{
"items": [
{
"item": {
"material": "IRON_INGOT"
},
"tooltip": "%time%\n{#C2C2C2}Add iron",
"time": 30,
"reload_time": 0
}
]
},
{
"items": [
{
"item": {
"material": "IRON_INGOT"
},
"tooltip": "%time%\n{#C2C2C2}Add iron",
"time": 30,
"reload_time": 0
}
]
},
{
"items": [
{
"mini_game": {
"type": "base",
"size": 10,
"speed": 5,
"health": 3,
"target_score": 3,
"animation_fail": "fail",
"animation_use": "anvil_use"
},
"tooltip": "%time%\n{#FFED8D}Forge the steel!",
"time": 30,
"reload_time": 0
}
]
},
{
"items": [
{
"item": {
"material": "STICK"
},
"tooltip": "%time%\n{#C2C2C2}Add stick",
"time": 30,
"reload_time": 5,
"reload_tooltip": "%time%\n{#C2C2C2}The sword is tempered...",
"animation": "stick_use"
}
]
}
],
"rewards": [
{
"material": "IRON_SWORD",
"display_name": "{#C2C2C2}Steel sword"
}
],
"reward_message": "{#C2C2C2}The Steel sword is ready"
}
π Breakdown of Each Stage
π¨ Stage 1 & 2 β Add Iron
"material": "IRON_INGOT"
- The player must add an iron ingot.
- Tooltip:
Add iron
- Time:
30 ticks
(1.5 seconds) - No cooldown or reload.
This step is repeated twice to simulate stacking ingots.
π§ͺ Stage 3 β Forge Steel (Minigame)
"mini_game": {
"type": "base",
"size": 10,
"speed": 5,
"health": 3,
"target_score": 3,
"animation_fail": "fail",
"animation_use": "anvil_use"
}
- A forging minigame must be completed.
- The player must score 3 hits without losing all 3 health points.
- Tooltip:
Forge the steel!
anvil_use
animation plays on success,fail
on mistake.
πͺ΅ Stage 4 β Add Stick (Handle)
"material": "STICK"
- The player must add a stick.
- Tooltip:
Add stick
- Cooldown:
5 ticks
(0.25 seconds) with custom reload tooltip - Animation:
stick_use
when successful
π Final Reward
{
"material": "IRON_SWORD",
"display_name": "{#C2C2C2}Steel sword"
}
- The player receives a renamed iron sword.
- Reward message shown in chat:
The Steel sword is ready
π§ Why It Works
- Step-by-step interaction keeps the process immersive.
- Minigame adds player engagement and skill.
- Cooldowns prevent spam-clicking or scripting.
- Tooltips and animations improve feedback.
- The recipe is fully customizable and expandable.