Ouvrir le menu principal

Modifications

Modèle:Crafting/doc

3 646 octets ajoutés, 28 avril 2019 à 11:57
aucun résumé de modification
{{documentation header}}
{{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 {{tl|Crafting Table}}, except it creates the table for you.

By default, the table generates with 3 columns: Name, Ingredients, and the main column containing {{tl|Crafting Table}}. You can set the parameter <code><nowiki>{{{showname=1}}}</nowiki></code> or <code><nowiki>{{{showname=0}}}</nowiki></code> 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 <code><nowiki>{{{head=1}}}</nowiki></code> in the first template of the table, and <code><nowiki>{{{foot=1}}}</nowiki></code> in the last. A 4th column called Description can be added with <code><nowiki>{{{showdescription=1}}}</nowiki></code> and <code><nowiki>{{{description=The description for the recipe}}}</nowiki></code>.

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.

Example usage:
<pre>
{{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
|upcoming=Java Edition 1.6.1
}}
{{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
}}
</pre>
produces:

{{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
|upcoming=Java Edition 1.6.1
}}
{{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
}}

<includeonly>
[[Category:Inventory templates]]
[[Category:Table templates]]

[[de:Vorlage:Handwerksrezept]]
[[es:Plantilla:Fabricación]]
[[fr:Modèle:Fabrication]]
[[ko:틀:제작]]
[[nl:Sjabloon:Verwerking]]
[[ru:Шаблон:Крафт]]
[[zh:Template:Crafting]]
</includeonly>
<noinclude>
[[de:Vorlage:Handwerksrezept/Dokumentation]]
[[es:Plantilla:Fabricación/doc]]
[[fr:Modèle:Fabrication/doc]]
[[ko:틀:제작/설명문서]]
[[nl:Sjabloon:Verwerking/doc]]
[[ru:Шаблон:Крафт/док]]
[[zh:Template:Crafting/doc]]
</noinclude>
Utilisateur anonyme