KubeJS Kitchen
KubeJS Kitchen lets scripts control Farmer’s Delight-style food systems, including cutting, cooking, skillet recipes, custom foods, feasts, servings, knife interactions and eating events.
About
KubeJS Kitchen is a KubeJS addon for food progression and Farmer’s Delight compatibility.
It helps modpack developers connect custom crops, foods, tools and cooking machines through scripts instead of creating large sets of recipe JSON files.
Features
- Create cutting board recipes
- Create cooking pot and skillet recipes
- Create and modify food properties
- Add custom knife interactions
- Create feasts and plated servings
- Add compatibility for custom crops
- React to eating, cutting, cooking and serving events
- Remove existing kitchen recipes through scripts
Script Bindings
Kitchen
KitchenEvents
Events
Food Eaten
Runs when a player eats a tracked food.
KitchenEvents.foodEaten(event => {
if (event.item === "minecraft:pumpkin_pie") {
event.player.tell("Sweet and filling")
}
})
Knife Used
Runs when a knife interaction is used.
KitchenEvents.knifeUsed(event => {
if (event.target === "minecraft:melon") {
event.player.give("minecraft:melon_slice")
}
})
Cutting
Runs when a cutting board recipe is processed.
KitchenEvents.cutting(event => {
if (event.input === "minecraft:carrot") {
event.player.tell("Chopped carrot")
}
})
Cooking
Runs when a cooking pot or skillet recipe completes.
KitchenEvents.cooking(event => {
if (event.result === "farmersdelight:vegetable_soup") {
event.level.server.tell("Soup is ready")
}
})
Serving
Runs when a feast or plated food is served.
KitchenEvents.serving(event => {
if (event.feast === "modpack:harvest_feast") {
event.player.tell("Feast served")
}
})
Methods
Cutting Recipes
Kitchen.cutting("modpack:cut_tomato", recipe => {
recipe.input("modpack:tomato")
recipe.tool("#forge:tools/knives")
recipe.output("modpack:tomato_slice", 3)
})
Cooking Pot Recipes
Kitchen.cookingPot("modpack:tomato_soup", recipe => {
recipe.input("modpack:tomato_slice")
recipe.input("minecraft:bowl")
recipe.container("minecraft:bowl")
recipe.output("modpack:tomato_soup")
recipe.cookTime(200)
recipe.experience(1.0)
})
Skillet Recipes
Kitchen.skillet("modpack:fried_egg", recipe => {
recipe.input("minecraft:egg")
recipe.output("modpack:fried_egg")
recipe.cookTime(100)
})
Custom Foods
Kitchen.food("modpack:energizing_stew", food => {
food.nutrition(8)
food.saturation(0.8)
food.effect("minecraft:speed", 600, 1, 1.0)
})
Modify Existing Foods
Kitchen.modifyFood("minecraft:bread", food => {
food.nutrition(6)
food.saturation(0.7)
})
Knife Interactions
Kitchen.knifeInteraction("modpack:strip_cactus", interaction => {
interaction.target("minecraft:cactus")
interaction.tool("#forge:tools/knives")
interaction.output("minecraft:green_dye", 2)
})
Custom Feasts
Kitchen.feast("modpack:harvest_feast", feast => {
feast.block("modpack:harvest_feast_block")
feast.servings(6)
feast.servingItem("modpack:harvest_plate")
})
Plated Servings
Kitchen.plate("modpack:harvest_plate", plate => {
plate.food("modpack:harvest_plate")
plate.servingsFrom("modpack:harvest_feast", 6)
})
Crop Compatibility
Kitchen.cropCompat("modpack:onion", crop => {
crop.cuttingOutput("modpack:onion_slice", 2)
crop.soupIngredient(true)
crop.skilletIngredient(true)
})
Remove Recipes
Kitchen.removeRecipe("farmersdelight:cooking/tomato_sauce")
Requirements
- KubeJS
- Farmer’s Delight or a supported loader-specific port
Compatibility
Builds are only provided for Minecraft versions and mod loaders where KubeJS and the required food mod are available.
Unsupported loader and version combinations are skipped instead of being presented as working.