📖 Recipes

This page mainly explains how to add new recipes to your server.

The configuration section for recipe settings is named "recipes." Please ensure that all your recipe configurations are located within the "recipes" section under the root node of the YAML file.

Tags

In CraftEngine, the plugin allows you to use tags, and you can also create custom tags. To use a tag, simply follow this format: #namespace:tag .

In the following example, I have added two vanilla tags to palm_planks, allowing them to participate in all recipes within data packs that utilize these two tags.

items:
  default:palm_planks:
    material: paper
    custom-model-data: 1004
    settings:
      fuel-time: 300
      tags:
        - "minecraft:planks"
        - "minecraft:wooden_tool_materials"
    data:
      display-name: "<!i>Palm Planks"
    model:
      type: "minecraft:model"
      path: "minecraft:item/custom/palm_planks"
      generation:
        parent: "minecraft:block/custom/palm_planks"
    behavior:
      type: block_item
      block: default:palm_planks

Group / Category

recipes:
  default:palm_planks:
    type: shapeless
    category: building
    group: planks
    ingredients:
      A: "#default:palm_logs"
    result:
      id: default:palm_planks
      count: 4

The group determines which group this recipe belongs to after it is unlocked on the client side. The group can be any name you choose freely. However, please avoid using illegal characters.

The category determines which tab this recipe is located in within the recipe book. The category type is limited.

  • For cooking-type recipes, the options are food, blocks, and misc.

  • For crafting-type recipes, the options are building, redstone, equipment, and misc.

Shaped Crafting Recipe

recipes:
  default:topaz_shovel:
    type: shaped
    pattern:
      - "A"
      - "B"
      - "B"
    ingredients:
      A: "default:topaz"
      B: "minecraft:stick"
    result:
      id: default:topaz_shovel
      count: 1
recipes:
  default:chinese_lantern:
    type: shaped
    pattern:
      - "ABA"
      - "BCB"
      - "ABA"
    ingredients:
      A: "#minecraft:planks"
      B: "minecraft:stick"
      C: "minecraft:torch"
    result:
      id: default:chinese_lantern
      count: 1

Shapeless Crafting Recipe

recipes:
  default:palm_planks:
    type: shapeless
    category: building
    group: planks
    ingredients:
      A: "#default:palm_logs"
      # list is also supported
      # A:
      #   - ingredient_1
      #   - ingredient_2
    result:
      id: default:palm_planks
      count: 4

Cooking Recipe

Cooking Recipe includes smelting, blasting, smoking, and campfire_cooking. Regardless of the type, the configuration format remains the same.

recipes:
  default:topaz_from_smelting_topaz_ore:
    type: smelting
    experience: 1.0
    category: misc
    group: topaz
    time: 200
    ingredient: "default:topaz_ore"
    result:
      id: default:topaz
      count: 1
  default:topaz_from_smelting_deepslate_topaz_ore:
    type: smelting
    experience: 1.0
    category: misc
    group: topaz
    time: 200
    ingredient: "default:deepslate_topaz_ore"
    result:
      id: default:topaz
      count: 1

Stone Cutting Recipe

Stone Cutting Recipe is a somewhat unique recipe type. I do not recommend using custom items as ingredients, as this is highly likely to cause significant client-side visual issues.

recipes:
  default:stone_cutting_example:
    type: stone_cutting
    group: topaz
    ingredient: "minecraft:stone"
    result:
      id: default:topaz
      count: 1

Last updated