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
m 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" 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>
<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>{{#if:{{{shapeless|}}}|<span class="mcui-icons"><span class="mcui-shapeless" title="This recipe is shapeless; the inputs may be placed in any arrangement in the crafting grid.">[[File:Shapeless crafting icon.png|19x15px|link=]]</span></span>}}</span></includeonly><noinclude>
== Usage ==
== Usage ==


Line 43: Line 43:
| <code>Output</code>, <code>Outputext</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 five 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.
|-
| <code>shapeless</code>
| Set to <code>1</code> (or any non-empty value) to show the shapeless-recipe badge in the top-right corner &mdash; hovering it explains what it means, same as on minecraft.wiki.
|}
|}


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

Revision as of 09:19, 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.
shapeless Set to 1 (or any non-empty value) to show the shapeless-recipe badge in the top-right corner — hovering it explains what it means, same as on minecraft.wiki.