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

Template:Crafting: Difference between revisions

Template page
Create Template:Crafting, replicating minecraft.wiki's crafting-grid style without Lua
 
m Create Template:Crafting, replicating minecraft.wiki's crafting-grid style without Lua
Line 1: Line 1:
<includeonly><templatestyles src="Template:Crafting/styles.css" /><span class="mcui mcui-Crafting_Table pixel-image"><span class="mcui-input"><span class="mcui-row"><span class="invslot">{{#if:{{{A1|}}}|<span class="invslot-item invslot-item-image">[[File:{{{A1|}}}|32px|link={{{A1link|}}}]]{{#if:{{{A1amount|}}}|{{#if:{{{A1name|}}}|<span class="invslot-stacksize" title="{{{A1name|}}}">|<span class="invslot-stacksize">}}{{{A1amount|}}}</span>}}</span>}}</span><span class="invslot">{{#if:{{{B1|}}}|<span class="invslot-item invslot-item-image">[[File:{{{B1|}}}|32px|link={{{B1link|}}}]]{{#if:{{{B1amount|}}}|{{#if:{{{B1name|}}}|<span class="invslot-stacksize" title="{{{B1name|}}}">|<span class="invslot-stacksize">}}{{{B1amount|}}}</span>}}</span>}}</span><span class="invslot">{{#if:{{{C1|}}}|<span class="invslot-item invslot-item-image">[[File:{{{C1|}}}|32px|link={{{C1link|}}}]]{{#if:{{{C1amount|}}}|{{#if:{{{C1name|}}}|<span class="invslot-stacksize" title="{{{C1name|}}}">|<span class="invslot-stacksize">}}{{{C1amount|}}}</span>}}</span>}}</span></span><span class="mcui-row"><span class="invslot">{{#if:{{{A2|}}}|<span class="invslot-item invslot-item-image">[[File:{{{A2|}}}|32px|link={{{A2link|}}}]]{{#if:{{{A2amount|}}}|{{#if:{{{A2name|}}}|<span class="invslot-stacksize" title="{{{A2name|}}}">|<span class="invslot-stacksize">}}{{{A2amount|}}}</span>}}</span>}}</span><span class="invslot">{{#if:{{{B2|}}}|<span class="invslot-item invslot-item-image">[[File:{{{B2|}}}|32px|link={{{B2link|}}}]]{{#if:{{{B2amount|}}}|{{#if:{{{B2name|}}}|<span class="invslot-stacksize" title="{{{B2name|}}}">|<span class="invslot-stacksize">}}{{{B2amount|}}}</span>}}</span>}}</span><span class="invslot">{{#if:{{{C2|}}}|<span class="invslot-item invslot-item-image">[[File:{{{C2|}}}|32px|link={{{C2link|}}}]]{{#if:{{{C2amount|}}}|{{#if:{{{C2name|}}}|<span class="invslot-stacksize" title="{{{C2name|}}}">|<span class="invslot-stacksize">}}{{{C2amount|}}}</span>}}</span>}}</span></span><span class="mcui-row"><span class="invslot">{{#if:{{{A3|}}}|<span class="invslot-item invslot-item-image">[[File:{{{A3|}}}|32px|link={{{A3link|}}}]]{{#if:{{{A3amount|}}}|{{#if:{{{A3name|}}}|<span class="invslot-stacksize" title="{{{A3name|}}}">|<span class="invslot-stacksize">}}{{{A3amount|}}}</span>}}</span>}}</span><span class="invslot">{{#if:{{{B3|}}}|<span class="invslot-item invslot-item-image">[[File:{{{B3|}}}|32px|link={{{B3link|}}}]]{{#if:{{{B3amount|}}}|{{#if:{{{B3name|}}}|<span class="invslot-stacksize" title="{{{B3name|}}}">|<span class="invslot-stacksize">}}{{{B3amount|}}}</span>}}</span>}}</span><span class="invslot">{{#if:{{{C3|}}}|<span class="invslot-item invslot-item-image">[[File:{{{C3|}}}|32px|link={{{C3link|}}}]]{{#if:{{{C3amount|}}}|{{#if:{{{C3name|}}}|<span class="invslot-stacksize" title="{{{C3name|}}}">|<span class="invslot-stacksize">}}{{{C3amount|}}}</span>}}</span>}}</span></span></span><span class="mcui-arrow">[[File:Crafting arrow.png|32px|link=]]</span><span class="mcui-output"><span class="invslot invslot-large">{{#if:{{{Output|}}}|<span class="invslot-item invslot-item-image">[[File:{{{Output|}}}|32px|link={{{Outputlink|}}}]]{{#if:{{{Outputamount|}}}|{{#if:{{{Outputname|}}}|<span class="invslot-stacksize" title="{{{Outputname|}}}">|<span class="invslot-stacksize">}}{{{Outputamount|}}}</span>}}</span>}}</span></span></span></includeonly><noinclude>
<includeonly><templatestyles src="Template:Crafting/styles.css" /><span class="mcui mcui-Crafting_Table pixel-image"><span class="mcui-input"><span class="mcui-row"><span class="invslot">{{#if:{{{A1|}}}|<span class="invslot-item invslot-item-image" data-tooltip="{{{A1name|{{{A1|}}}}}}">[[File:{{{A1|}}}.{{{A1ext|png}}}|32px|link={{{A1link|}}}]]{{#if:{{{A1amount|}}}|<span class="invslot-stacksize">{{{A1amount|}}}</span>}}</span>}}</span><span class="invslot">{{#if:{{{B1|}}}|<span class="invslot-item invslot-item-image" data-tooltip="{{{B1name|{{{B1|}}}}}}">[[File:{{{B1|}}}.{{{B1ext|png}}}|32px|link={{{B1link|}}}]]{{#if:{{{B1amount|}}}|<span class="invslot-stacksize">{{{B1amount|}}}</span>}}</span>}}</span><span class="invslot">{{#if:{{{C1|}}}|<span class="invslot-item invslot-item-image" data-tooltip="{{{C1name|{{{C1|}}}}}}">[[File:{{{C1|}}}.{{{C1ext|png}}}|32px|link={{{C1link|}}}]]{{#if:{{{C1amount|}}}|<span class="invslot-stacksize">{{{C1amount|}}}</span>}}</span>}}</span></span><span class="mcui-row"><span class="invslot">{{#if:{{{A2|}}}|<span class="invslot-item invslot-item-image" data-tooltip="{{{A2name|{{{A2|}}}}}}">[[File:{{{A2|}}}.{{{A2ext|png}}}|32px|link={{{A2link|}}}]]{{#if:{{{A2amount|}}}|<span class="invslot-stacksize">{{{A2amount|}}}</span>}}</span>}}</span><span class="invslot">{{#if:{{{B2|}}}|<span class="invslot-item invslot-item-image" data-tooltip="{{{B2name|{{{B2|}}}}}}">[[File:{{{B2|}}}.{{{B2ext|png}}}|32px|link={{{B2link|}}}]]{{#if:{{{B2amount|}}}|<span class="invslot-stacksize">{{{B2amount|}}}</span>}}</span>}}</span><span class="invslot">{{#if:{{{C2|}}}|<span class="invslot-item invslot-item-image" data-tooltip="{{{C2name|{{{C2|}}}}}}">[[File:{{{C2|}}}.{{{C2ext|png}}}|32px|link={{{C2link|}}}]]{{#if:{{{C2amount|}}}|<span class="invslot-stacksize">{{{C2amount|}}}</span>}}</span>}}</span></span><span class="mcui-row"><span class="invslot">{{#if:{{{A3|}}}|<span class="invslot-item invslot-item-image" data-tooltip="{{{A3name|{{{A3|}}}}}}">[[File:{{{A3|}}}.{{{A3ext|png}}}|32px|link={{{A3link|}}}]]{{#if:{{{A3amount|}}}|<span class="invslot-stacksize">{{{A3amount|}}}</span>}}</span>}}</span><span class="invslot">{{#if:{{{B3|}}}|<span class="invslot-item invslot-item-image" data-tooltip="{{{B3name|{{{B3|}}}}}}">[[File:{{{B3|}}}.{{{B3ext|png}}}|32px|link={{{B3link|}}}]]{{#if:{{{B3amount|}}}|<span class="invslot-stacksize">{{{B3amount|}}}</span>}}</span>}}</span><span class="invslot">{{#if:{{{C3|}}}|<span class="invslot-item invslot-item-image" data-tooltip="{{{C3name|{{{C3|}}}}}}">[[File:{{{C3|}}}.{{{C3ext|png}}}|32px|link={{{C3link|}}}]]{{#if:{{{C3amount|}}}|<span class="invslot-stacksize">{{{C3amount|}}}</span>}}</span>}}</span></span></span><span class="mcui-arrow">[[File:Crafting arrow.png|32px|link=]]</span><span class="mcui-output"><span class="invslot invslot-large">{{#if:{{{Output|}}}|<span class="invslot-item invslot-item-image" data-tooltip="{{{Outputname|{{{Output|}}}}}}">[[File:{{{Output|}}}.{{{Outputext|png}}}|32px|link={{{Outputlink|}}}]]{{#if:{{{Outputamount|}}}|<span class="invslot-stacksize">{{{Outputamount|}}}</span>}}</span>}}</span></span></span></includeonly><noinclude>
== Usage ==
== Usage ==


<pre>
<pre>
{{Crafting
{{Crafting
|A1=Gold Ingot.png |B1=Gold Ingot.png |C1=Gold Ingot.png
|A1=Gold Ingot |B1=Gold Ingot |C1=Gold Ingot
|A2=Gold Ingot.png |B2=Diamond.png   |C2=Gold Ingot.png
|A2=Gold Ingot |B2=Diamond    |C2=Gold Ingot
|A3=Gold Ingot.png |B3=Gold Ingot.png |C3=Gold Ingot.png
|A3=Gold Ingot |B3=Gold Ingot |C3=Gold Ingot
|Output=Lapis Lazuli Block.png |Outputamount=1 |Outputname=Example Output
|Output=Lapis Lazuli Block |Outputamount=1
}}
}}
</pre>
</pre>


Renders as: {{Crafting
Renders as: {{Crafting
|A1=Gold Ingot.png |B1=Gold Ingot.png |C1=Gold Ingot.png
|A1=Gold Ingot |B1=Gold Ingot |C1=Gold Ingot
|A2=Gold Ingot.png |B2=Diamond.png   |C2=Gold Ingot.png
|A2=Gold Ingot |B2=Diamond    |C2=Gold Ingot
|A3=Gold Ingot.png |B3=Gold Ingot.png |C3=Gold Ingot.png
|A3=Gold Ingot |B3=Gold Ingot |C3=Gold Ingot
|Output=Lapis Lazuli Block.png |Outputamount=1 |Outputname=Example Output
|Output=Lapis Lazuli Block |Outputamount=1
}}
}}


Replicates the visual style of [https://minecraft.wiki/w/Template:Crafting minecraft.wiki's Template:Crafting] &mdash; a beveled 3&times;3 grid of recessed item slots, an arrow, and a larger output slot &mdash; without Lua/Scribunto, which this wiki doesn't have. The trade-off: nothing is looked up automatically from an item name, so every slot needs its own filename (and optionally a link and stack-size label) spelled out.
Replicates the visual style of [https://minecraft.wiki/w/Template:Crafting minecraft.wiki's Template:Crafting] &mdash; a beveled 3&times;3 grid of recessed item slots, an arrow, a larger output slot, and hover tooltips &mdash; without Lua/Scribunto, which this wiki doesn't have. The trade-off: nothing is looked up automatically from an item name, so every slot needs its own filename (and optionally a link and stack-size label) spelled out, and the hover tooltip is a pure-CSS box anchored above the slot rather than minecraft.wiki's own cursor-following JS gadget.


== Parameters ==
== Parameters ==
Line 27: Line 27:
|-
|-
| <code>A1</code>&ndash;<code>C3</code>
| <code>A1</code>&ndash;<code>C3</code>
| Filename of the icon shown in that grid position (no <code>File:</code> prefix, e.g. <code>Gold Ingot.png</code>). Left blank for an empty slot.
| The icon shown in that grid position, as its filename '''without''' the extension (e.g. <code>Gold Ingot</code> for <code>File:Gold Ingot.png</code>). Left blank for an empty slot. Also becomes the default hover-tooltip text for that slot.
|-
| <code>A1ext</code>&ndash;<code>C3ext</code>
| Overrides the assumed <code>.png</code> extension (e.g. <code>jpg</code>, <code>svg</code>) for that slot's file, for the rare icon that isn't a PNG.
|-
|-
| <code>A1link</code>&ndash;<code>C3link</code>
| <code>A1link</code>&ndash;<code>C3link</code>
Line 36: Line 39:
|-
|-
| <code>A1name</code>&ndash;<code>C3name</code>
| <code>A1name</code>&ndash;<code>C3name</code>
| Optional tooltip text for the stack-size label (only shown if <code>amount</code> is also set).
| Overrides the hover-tooltip text for that slot (e.g. <code>A1name=Gold Ingot (any)</code>) instead of using <code>A1</code> itself.
|-
|-
| <code>Output</code>, <code>Outputlink</code>, <code>Outputamount</code>, <code>Outputname</code>
| <code>Output</code>, <code>Outputext</code>, <code>Outputlink</code>, <code>Outputamount</code>, <code>Outputname</code>
| Same four options as a grid slot, for the larger output slot on the right.
| Same five options as a grid slot, for the larger output slot on the right.
|}
|}


[[Category:Templates]]
[[Category:Templates]]
</noinclude>
</noinclude>

Revision as of 09:06, 24 August 2026

Usage

{{Crafting
|A1=Gold Ingot |B1=Gold Ingot |C1=Gold Ingot
|A2=Gold Ingot |B2=Diamond    |C2=Gold Ingot
|A3=Gold Ingot |B3=Gold Ingot |C3=Gold Ingot
|Output=Lapis Lazuli Block |Outputamount=1
}}

Renders as: 1

Replicates the visual style of minecraft.wiki's Template:Crafting — a beveled 3×3 grid of recessed item slots, an arrow, a larger output slot, and hover tooltips — without Lua/Scribunto, which this wiki doesn't have. The trade-off: nothing is looked up automatically from an item name, so every slot needs its own filename (and optionally a link and stack-size label) spelled out, and the hover tooltip is a pure-CSS box anchored above the slot rather than minecraft.wiki's own cursor-following JS gadget.

Parameters

Parameter Description
A1C3 The icon shown in that grid position, as its filename without the extension (e.g. Gold Ingot for File:Gold Ingot.png). Left blank for an empty slot. Also becomes the default hover-tooltip text for that slot.
A1extC3ext Overrides the assumed .png extension (e.g. jpg, svg) for that slot's file, for the rare icon that isn't a PNG.
A1linkC3link Optional page the slot's icon links to. Left blank, the icon isn't clickable.
A1amountC3amount Optional stack-size number shown in the slot's corner (e.g. 4).
A1nameC3name Overrides the hover-tooltip text for that slot (e.g. A1name=Gold Ingot (any)) instead of using A1 itself.
Output, Outputext, Outputlink, Outputamount, Outputname Same five options as a grid slot, for the larger output slot on the right.