User Tools

Site Tools


tutorial:recipes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tutorial:recipes [2021/09/02 12:02] – Clarify meaning of recipe file name daomephstatutorial:recipes [2022/12/16 00:25] (current) solidblock
Line 6: Line 6:
 To make it available to survival players, we'll add a crafting recipe for the item.   To make it available to survival players, we'll add a crafting recipe for the item.  
  
-Create a file named ''fabric_item.json'' under ''resources/data/tutorial/recipes/'' (replace tutorial with your mod id if appropriate).\\+Create a file named ''custom_item.json'' under ''resources/data/tutorial/recipes/'' (replace tutorial with your mod id if appropriate).\\
 Recipe files are conventionally named after their output, but they can have any name. Recipe files are conventionally named after their output, but they can have any name.
-Here's an example recipe for the ''fabric_item'' we made: +Here's an example recipe for the ''custom_item'' we made: 
-<code javascript resources/data/tutorial/recipes/fabric_item.json>+<code javascript resources/data/tutorial/recipes/custom_item.json>
 { {
   "type": "minecraft:crafting_shaped",   "type": "minecraft:crafting_shaped",
Line 26: Line 26:
   },   },
   "result": {   "result": {
-    "item": "tutorial:fabric_item",+    "item": "tutorial:custom_item",
     "count": 4     "count": 4
   }   }
Line 33: Line 33:
 Breakdown of the recipe:   Breakdown of the recipe:  
   *  **type**: This is a shaped crafting recipe.    *  **type**: This is a shaped crafting recipe. 
-  *  **result**: This is a crafting recipe for 4 ''tutorial:fabric_item''. The ''count'' field is optional. If you don't specify a ''count'', it will default to 1.+  *  **result**: This is a crafting recipe for 4 ''tutorial:custom_item''. The ''count'' field is optional. If you don't specify a ''count'', it will default to 1.
   *  **pattern**: A pattern that represents the crafting recipe. Each letter represents one item. An empty space means that no item is required in that slot. What each letter represents is defined in **key**.   *  **pattern**: A pattern that represents the crafting recipe. Each letter represents one item. An empty space means that no item is required in that slot. What each letter represents is defined in **key**.
-  *  **key**:  What each letter in the pattern represents. ''W'' represents any item with the ''minecraft:logs'' tag (all logs). ''R'' represent the redstone item specificly.  For more information about tags see [[https://minecraft.gamepedia.com/Tag|here]]+  *  **key**:  What each letter in the pattern represents. ''W'' represents any item with the ''minecraft:logs'' tag (all logs). ''R'' represent the redstone item specificly.  For more information about tags see [[https://minecraft.gamepedia.com/Tag|here]]
 +  * **category**: The category of the item to display in the recipe book.
 In total, the crafting recipe would look like this: In total, the crafting recipe would look like this:
-^           Recipe for 4 fabric_item           ^^^+^           Recipe for 4 custom_item           ^^^
 |Any Log|Any Log|Any Log| |Any Log|Any Log|Any Log|
 |Any Log|Redstone|Nothing| |Any Log|Redstone|Nothing|
tutorial/recipes.1630584176.txt.gz · Last modified: 2021/09/02 12:02 by daomephsta