Template:Crafting/doc: Difference between revisions

From Parallel Wiki
Jump to navigation Jump to search
m (shit meant to use in mc discontinued cuz nice template)
(No difference)

Revision as of 22:08, 13 April 2023

This is the documentation page. It should be transcluded into the main template page. See Template:Documentation for more information
Lua logo.svg
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.

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
  |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
}}

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
Invicon Coal.png: Inventory sprite for Coal in Minecraft as shown in-game linking to mcwiki:Coal with description: CoalInvicon Coal.png: Inventory sprite for Coal in Minecraft as shown in-game linking to mcwiki:Coal with description: CoalInvicon Coal.png: Inventory sprite for Coal in Minecraft as shown in-game linking to mcwiki:Coal with description: CoalInvicon Coal.png: Inventory sprite for Coal in Minecraft as shown in-game linking to mcwiki:Coal with description: CoalInvicon Coal.png: Inventory sprite for Coal in Minecraft as shown in-game linking to mcwiki:Coal with description: CoalInvicon Coal.png: Inventory sprite for Coal in Minecraft as shown in-game linking to mcwiki:Coal with description: CoalInvicon Coal.png: Inventory sprite for Coal in Minecraft as shown in-game linking to mcwiki:Coal with description: CoalInvicon Coal.png: Inventory sprite for Coal in Minecraft as shown in-game linking to mcwiki:Coal with description: CoalInvicon Coal.png: Inventory sprite for Coal in Minecraft as shown in-game linking to mcwiki:Coal with description: Coal
Invicon Block of Coal.png: Inventory sprite for Block of Coal in Minecraft as shown in-game linking to mcwiki:Block of Coal with description: Block of 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 mcwiki:Oak Planks with description: Oak PlanksInvicon Cobblestone.png: Inventory sprite for Cobblestone in Minecraft as shown in-game linking to mcwiki:Cobblestone with description: CobblestoneInvicon Iron Ingot.png: Inventory sprite for Iron Ingot in Minecraft as shown in-game linking to mcwiki:Iron Ingot with description: Iron IngotInvicon Gold Ingot.png: Inventory sprite for Gold Ingot in Minecraft as shown in-game linking to mcwiki:Gold Ingot with description: Gold IngotInvicon Diamond.png: Inventory sprite for Diamond in Minecraft as shown in-game linking to mcwiki:Diamond with description: DiamondInvicon Oak Planks.png: Inventory sprite for Oak Planks in Minecraft as shown in-game linking to mcwiki:Oak Planks with description: Oak PlanksInvicon Cobblestone.png: Inventory sprite for Cobblestone in Minecraft as shown in-game linking to mcwiki:Cobblestone with description: CobblestoneInvicon Iron Ingot.png: Inventory sprite for Iron Ingot in Minecraft as shown in-game linking to mcwiki:Iron Ingot with description: Iron IngotInvicon Gold Ingot.png: Inventory sprite for Gold Ingot in Minecraft as shown in-game linking to mcwiki:Gold Ingot with description: Gold IngotInvicon Diamond.png: Inventory sprite for Diamond in Minecraft as shown in-game linking to mcwiki:Diamond with description: DiamondInvicon Oak Planks.png: Inventory sprite for Oak Planks in Minecraft as shown in-game linking to mcwiki:Oak Planks with description: Oak PlanksInvicon Cobblestone.png: Inventory sprite for Cobblestone in Minecraft as shown in-game linking to mcwiki:Cobblestone with description: CobblestoneInvicon Iron Ingot.png: Inventory sprite for Iron Ingot in Minecraft as shown in-game linking to mcwiki:Iron Ingot with description: Iron IngotInvicon Gold Ingot.png: Inventory sprite for Gold Ingot in Minecraft as shown in-game linking to mcwiki:Gold Ingot with description: Gold IngotInvicon Diamond.png: Inventory sprite for Diamond in Minecraft as shown in-game linking to mcwiki:Diamond with description: DiamondInvicon Stick.png: Inventory sprite for Stick in Minecraft as shown in-game linking to mcwiki:Stick with description: StickInvicon Stick.png: Inventory sprite for Stick in Minecraft as shown in-game linking to mcwiki:Stick with description: Stick
Invicon Wooden Pickaxe.png: Inventory sprite for Wooden Pickaxe in Minecraft as shown in-game linking to mcwiki: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 mcwiki: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 mcwiki: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 mcwiki: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 mcwiki:Diamond Pickaxe with description: Diamond Pickaxe When in Main Hand:  5 Attack Damage  1.2 Attack Speed


de:Vorlage:Handwerksrezept/Dokumentation es:Plantilla:Fabricación/doc fr:Modèle:Fabrication/doc ko:틀:제작/설명문서 nl:Sjabloon:Verwerking/doc pt:Predefinição:Fabricação/doc ru:Шаблон:Крафт/док uk:Шаблон:Крафт/док zh:Template:Crafting/doc