đĄī¸ Your First Item
You created the tutorial pack last chapter. Now make your first custom item inside it.
Open configuration/items.yml (if you haven't created it yet, go back to Project Structure step 2). Open it with VS Code or any text editor, and copy the examples below exactly as written.
Step 1: three lines, one itemâ
Write this into items.yml:
items:
tutorial:diamond:
material: diamond
Save the file. In-game, run:
/ce reload config
Once you see the green success message, then run:
/ce item get tutorial:diamond
A diamond appears in your inventory. đ That's your first custom item!
What each line meansâ
Line by line:
items:â "I'm about to define items"tutorial:diamond:â "This item is calledtutorial:diamond."tutorialis your namespace (your pack name),diamondis the item name. Everything after the colon must be indentedmaterial: diamondâ "This item is based on a vanilla diamond." Based on diamond means it looks and behaves like a diamond (no right-click action, stacks to 64)
â ī¸ The most common beginner mistake: incorrect indentation. YAML uses spaces for indentation, not tabs. Line two is 2 more spaces than line one; line three is 2 more spaces than line two. If you use the Tab key, CraftEngine will throw an error.
Step 2: give it a nameâ
Right now the item is called "Diamond" â just like the vanilla one. Let's give it a proper name:
items:
tutorial:diamond:
material: diamond
data:
item_name: "<blue>Shiny Diamond"
lore:
- "<!i><gray>Blessed by the CraftEngine magic"
Save, then:
/ce reload config
/ce item get tutorial:diamond
Hover over the item â a blue "Shiny Diamond" with a gray description line beneath it.
What the new lines meanâ
data:â "I'm defining how this item displays"item_name:â the item's name.<blue>makes it bluelore:â description lines below the name.-marks a list item, one per line<!i>â turns off italics. Minecraft renders all lore text as purple italic by default. Add<!i>and it goes back to normal. You'll want it at the start of almost every lore line<gray>â gray text
These <blue>, <gray> tags are called MiniMessage â Paper's standard text format. It uses angle-bracket tags to control color and style.
Common MiniMessage tagsâ
| You write | Effect |
|---|---|
<red> <blue> <green> <yellow> | basic colors |
<#FF8C00> | custom hex color |
<bold> | bold |
<!i> | remove italics |
<underlined> | underline |
Full reference: MiniMessage docs.
Step 3: make it craftableâ
Right now you can only get this item via command. Let players craft it instead.
In the same items.yml file, continue writing below:
items:
tutorial:diamond:
material: diamond
data:
item_name: "<blue>Shiny Diamond"
lore:
- "<!i><gray>Blessed by the CraftEngine magic"
recipes:
tutorial:diamond:
type: shaped
pattern:
- "AAA"
- "AAA"
- "AAA"
ingredients:
A: minecraft:diamond_block
result:
id: tutorial:diamond
count: 9
Important: recipes: is at the same level as items: â don't indent it inside. Both are flush left.
Save, then /ce reload recipe. Open a crafting table, place one diamond block in the 3Ã3 grid â you get 9 "Shiny Diamonds."
What the recipe meansâ
recipes:â "I'm about to define crafting recipes"type: shapedâ shaped crafting (ingredients must be placed in a specific pattern)patternâ the 3Ã3 crafting grid. Each row is 3 characters.Amarks the ingredient, spaces are emptyingredients.A: minecraft:diamond_blockâ theAin the pattern stands for a vanilla diamond blockresultâ what you get.id: tutorial:diamondis the product ID,count: 9means 9 items per craft
Common recipe typesâ
| Type | When to use |
|---|---|
shaped | Shaped crafting â ingredients must match the pattern |
shapeless | Shapeless crafting â ingredients anywhere, just have the right ones |
smelting | Furnace â one ingredient gets smelted |
â ī¸ Ingredients can use tags instead of specific items. For example
#minecraft:planksmatches any kind of plank. Tags are more flexible than hardcoding specific items.
â ī¸ Recipe changes need
/ce reload recipe, notconfig. Also, if your server has other datapack plugins or you manually run/minecraft:reload, you'll need to run/ce reload recipeagain afterwards or your recipes may stop working.
What you've learnedâ
- Define an item with 3 lines of YAML
- Add a name and lore with
data - Add a crafting recipe with
recipes - Run
/ce reload configfor config changes,/ce reload recipefor recipe changes
The item works â but it still looks exactly like a vanilla diamond. Next chapter: give it a completely custom appearance.