Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Crafting/doc

Template page
Revision as of 13:12, 11 October 2024 by Scyu (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This is the documentation page. It should be transcluded into Template:Crafting. See Template:Documentation for more information.
This template uses Module:Crafting, a script written in Lua.

Using this template, you can create tables like those commonly used in the “Crafting” and “Crafting ingredient” sections of articles about blocks and items. It can be used similarly to {{Crafting Table}}, except it creates the table for you.

By default, the table generates with 3 columns: Name, Ingredients, and the main column containing {{Crafting Table}}. You can set the parameter {{{showname=1}}} or {{{showname=0}}} in the first template of the table to show or hide the Name column. To group multiple crafting templates into one table, you also need to set {{{head=1}}} in the first template of the table, and {{{foot=1}}} in the last. A 4th column called Description can be added with {{{showdescription=1}}} and {{{description=The description for the recipe}}}.

Displaying a shapeless recipe can be accomplished by simply leaving out the grid positions for all ingredients. If the recipe is shapeless and uses less than 5 slots, the template will automatically arrange the items into the bottom-left square, indicating that the recipe can be used in the inventory crafting area.

If using this template outside of the “Crafting” section (e. g. instead of {{Crafting usage}} or together with it), it is highly important that the {{{ignoreusage}}} parameter must be set to 1. This will ensure that the template would not be tracked by {{Crafting usage}} which could lead to issues with that template on other articles.

Example usage:

{{Crafting
  |head=1
  |B2=Coal
  |B3=Stick
  |Output=Torch,4
  |showdescription=1
  |description=The description cell can contain ''formatted'' text.
}}
{{Crafting
  |Blaze Powder
  |Gunpowder
  |Coal
  |Output=Fire Charge,3
  }}
{{Crafting
  |A1= Coal |B1= Coal |C1= Coal
  |A2= Coal |B2= Coal |C2= Coal
  |A3= Coal |B3= Coal |C3= Coal
  |Output=Block of Coal
}}
{{Crafting
  |name=[[Pickaxe]]
  |ingredients=[[Stick]]s +<br>[[Planks]] or<br> [[Cobblestone]] or<br>[[Iron Ingot]]s or<br>[[Gold Ingot]]s or<br>[[Diamond]]s
  |A1=Oak Planks; Cobblestone; Iron Ingot; Gold Ingot; Diamond 
  |B1=Oak Planks; Cobblestone; Iron Ingot; Gold Ingot; Diamond 
  |C1=Oak Planks; Cobblestone; Iron Ingot; Gold Ingot; Diamond 
  |B2=Stick
  |B3=Stick
  |Output=Wooden Pickaxe; Stone Pickaxe; Iron Pickaxe; Golden Pickaxe; Diamond Pickaxe
  |foot=1
}}

produces:

Name Ingredients Crafting recipe Description
Torch Coal +
Stick
The description cell can contain formatted text.
Fire Charge Blaze Powder +
Gunpowder +
Coal
Block of Coal Coal
Pickaxe Sticks +
Planks or
Cobblestone or
Iron Ingots or
Gold Ingots or
Diamonds
Invicon Oak Planks.png: Inventory sprite for Oak Planks in Minecraft as shown in-game linking to Oak Planks with description: Oak PlanksInvicon Cobblestone.png: Inventory sprite for Cobblestone in Minecraft as shown in-game linking to Cobblestone with description: CobblestoneInvicon Iron Ingot.png: Inventory sprite for Iron Ingot in Minecraft as shown in-game linking to Iron Ingot with description: Iron IngotInvicon Gold Ingot.png: Inventory sprite for Gold Ingot in Minecraft as shown in-game linking to Gold Ingot with description: Gold IngotInvicon Diamond.png: Inventory sprite for Diamond in Minecraft as shown in-game linking to Diamond with description: DiamondInvicon Oak Planks.png: Inventory sprite for Oak Planks in Minecraft as shown in-game linking to Oak Planks with description: Oak PlanksInvicon Cobblestone.png: Inventory sprite for Cobblestone in Minecraft as shown in-game linking to Cobblestone with description: CobblestoneInvicon Iron Ingot.png: Inventory sprite for Iron Ingot in Minecraft as shown in-game linking to Iron Ingot with description: Iron IngotInvicon Gold Ingot.png: Inventory sprite for Gold Ingot in Minecraft as shown in-game linking to Gold Ingot with description: Gold IngotInvicon Diamond.png: Inventory sprite for Diamond in Minecraft as shown in-game linking to Diamond with description: DiamondInvicon Oak Planks.png: Inventory sprite for Oak Planks in Minecraft as shown in-game linking to Oak Planks with description: Oak PlanksInvicon Cobblestone.png: Inventory sprite for Cobblestone in Minecraft as shown in-game linking to Cobblestone with description: CobblestoneInvicon Iron Ingot.png: Inventory sprite for Iron Ingot in Minecraft as shown in-game linking to Iron Ingot with description: Iron IngotInvicon Gold Ingot.png: Inventory sprite for Gold Ingot in Minecraft as shown in-game linking to Gold Ingot with description: Gold IngotInvicon Diamond.png: Inventory sprite for Diamond in Minecraft as shown in-game linking to Diamond with description: DiamondInvicon Stick.png: Inventory sprite for Stick in Minecraft as shown in-game linking to Stick with description: StickInvicon Stick.png: Inventory sprite for Stick in Minecraft as shown in-game linking to Stick with description: Stick
Invicon Wooden Pickaxe.png: Inventory sprite for Wooden Pickaxe in Minecraft as shown in-game linking to Wooden Pickaxe with description: Wooden Pickaxe When in Main Hand:  2 Attack Damage  1.2 Attack SpeedInvicon Stone Pickaxe.png: Inventory sprite for Stone Pickaxe in Minecraft as shown in-game linking to Stone Pickaxe with description: Stone Pickaxe When in Main Hand:  3 Attack Damage  1.2 Attack SpeedInvicon Iron Pickaxe.png: Inventory sprite for Iron Pickaxe in Minecraft as shown in-game linking to Iron Pickaxe with description: Iron Pickaxe When in Main Hand:  4 Attack Damage  1.2 Attack SpeedInvicon Golden Pickaxe.png: Inventory sprite for Golden Pickaxe in Minecraft as shown in-game linking to Golden Pickaxe with description: Golden Pickaxe When in Main Hand:  2 Attack Damage  1.2 Attack SpeedInvicon Diamond Pickaxe.png: Inventory sprite for Diamond Pickaxe in Minecraft as shown in-game linking to Diamond Pickaxe with description: Diamond Pickaxe When in Main Hand:  5 Attack Damage  1.2 Attack Speed

Details

This template uses TemplateData for its description as well as compatibility with visual template tools.

Builds a table that lists crafting recipes. Slot/ingredient parameters use the same syntax as Inventory slot.

Template parameters

This template has custom formatting.

ParameterDescriptionTypeStatus
Top left slotA1

Specifies ingredients in the top left slot

Example
{Any Planks}; {Any stone-tier block}; Iron Ingot; Gold Ingot; Diamond
Stringsuggested
Top slotB1

Specifies ingredients in the top slot

Example
{Any Planks}; {Any stone-tier block}; Iron Ingot; Gold Ingot; Diamond
Stringsuggested
Top right slotC1

Specifies ingredients in the top right slot

Example
{Any Planks}; {Any stone-tier block}; Iron Ingot; Gold Ingot; Diamond
Stringsuggested
Left slotA2

Specifies ingredients in the left slot

Stringsuggested
Middle slotB2

Specifies ingredients in the middle slot

Example
Stick
Stringsuggested
Right slotC2

Specifies ingredients in the right slot

Stringsuggested
Bottom left slotA3

Specifies ingredients in the bottom left slot

Stringsuggested
Bottom slotB3

Specifies ingredients in the bottom slot

Example
Stick
Stringsuggested
Bottom right slotC3

Specifies ingredients in the bottom right slot

Stringsuggested
First ingredient1

First ingredient in a shapeless recipe

Example
Flint
Stringoptional
Second ingredient2

Second ingredient in a shapeless recipe

Example
Iron Ingot
Stringoptional
Third ingredient3

Third ingredient in a shapeless recipe

Stringoptional
Fourth ingredient4

Fourth ingredient in a shapeless recipe

Stringoptional
Fifth ingredient5

Fifth ingredient in a shapeless recipe

Stringoptional
Sixth ingredient6

Sixth ingredient in a shapeless recipe

Stringoptional
Seventh ingredient7

Seventh ingredient in a shapeless recipe

Stringoptional
Eighth ingredient8

Eighth ingredient in a shapeless recipe

Stringoptional
Ninth ingredient9

Ninth ingredient in a shapeless recipe

Stringoptional
Recipe outputOutput

Sets the recipe's output. If multiple blocks or items are crafted simultaneously, make sure to specify the number after a comma.

Example
Wooden Pickaxe; Stone Pickaxe; Iron Pickaxe; Gold Pickaxe; Diamond Pickaxe
Stringsuggested
Ignored by Crafting usageignoreusage

Sets the template to be ignored by the Crafting usage template. This means the recipe will not appear in the "Crafting ingredient" subsection of "Usage" on other articles. When not using the template inside the "Crafting" subsection of "Obtaining", this parameter is mandatory to avoid issues with Crafting usage.

Suggested values
1
Auto value
1
Unknownoptional
Recipe typetype

Sets the category for this recipe. If set, the recipe will be automatically added to the corresponding subsection in the Crafting article's "Complete recipe list" section. Has no effect if "ignoreusage" parameter is active.

Suggested values
Building blocks Decoration blocks Redstone Transportation Foodstuffs Tools Utilities Combat Brewing Materials Miscellaneous
Example
Combat
Stringoptional
Shapeless recipe overrideshapeless

Forces shapeless recipe mode if "top left slot" and similar parameters are used.

Suggested values
1
Default
Shapeless mode is automatically enabled when "first ingredient" parameter is used.
Auto value
1
Unknownoptional
Fixed recipe modefixed

Enables fixed recipe mode for cases when ingredient layout cannot be mirrored (usually for banners)

Suggested values
1
Auto value
1
Unknownoptional
Ingredient that is not fixednotfixed

For fixed recipes, describes the ingredient that can be placed in any free slot as an exception.

Example
the banner
Unknownoptional
Table headerhead

Sets this template instance as the first one in a sequence.

Suggested values
1
Auto value
1
Unknownoptional
Table footerfoot

Sets this template instance as the last one in a sequence.

Suggested values
1
Auto value
1
Unknownoptional
Description column controlshowdescription

Controls whether to display the description column. Value of 1 makes it show, any other values disable it. For multi-template tables, only set this parameter in the first template (which as the "head" parameter set).

Suggested values
1
Default
The column is not shown by default. In template sequences, templates use the same value as the first template.
Auto value
1
Unknownoptional
Additional desciptiondescription

Provides an additional description to the recipe, such as edition exclusivity or upcoming version which will add the recipe. Make sure to set the "showdescription" parameter, or it will not show.

Contentoptional
Name column controlshowname

Controls whether to display the "name" column which lists what block(s) or item(s) is/are made by the recipe. Value of 1 makes the column show, any other values disable it. For multi-template tables, only set this parameter in the first template (which as the "head" parameter set).

Suggested values
0 1
Default
The name column is shown by default when the template has the "head" parameter set to 1; subsequent templates in the sequence use the first one's value. The column is not shown when the template is standalone.
Auto value
1
Unknownoptional
Name overridename

Overrides what is displayed in the Name cell.

Default
The name is inferred automatically from the output slot.
Example
Any Pickaxe (except Netherite)
Contentoptional
Ingredients overrideingredients

Overrides what is displayed in the Ingredients cell.

Default
The ingredients are inferred automatically.
Contentoptional
Disable categoriesnocat

Sets the template to not add the page to any category. For technical reasons, this will also imply "ignoreusage" because Crafting usage relies on hidden categories set by this template.

Suggested values
1
Default
Categories are not added on subarticles or outside of the article namespace.
Auto value
1
Unknownoptional

See also


cs:Šablona:Crafting/doc de:Vorlage:Handwerksrezept/Dokumentation es:Plantilla:Fabricación/doc fr:Modèle:Fabrication/doc it:Template:Fabbricazione/doc ja:テンプレート:Crafting/doc ko:틀:제작/설명문서 lzh:模板:Crafting/doc nl:Sjabloon:Verwerking/doc pt:Predefinição:Fabricação/doc ru:Шаблон:Крафт/док th:แม่แบบ:Crafting/doc uk:Шаблон:Майстрування/док zh:Template:Crafting/doc