Template:Crafting: Difference between revisions

From BTA-Mirror
imported>Ttv pedro270707
m (Made the number of result items into a letter. Still need to add a link to the letter if page name is different from result item.)
imported>Ttv pedro270707
m (Added title to shapeless icon)
 
(38 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><div style="position: relative;">
<includeonly><div class="crafting-table-ui pixelated"><div style="display: inline-grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);">{{Inventory slot|item={{{1|}}}}}{{Inventory slot|item={{{2|}}}}}{{Inventory slot|item={{{3|}}}}}{{Inventory slot|item={{{4|}}}}}{{Inventory slot|item={{{5|}}}}}{{Inventory slot|item={{{6|}}}}}{{Inventory slot|item={{{7|}}}}}{{Inventory slot|item={{{8|}}}}}{{Inventory slot|item={{{9|}}}}}</div><span style="margin-left: 6px; margin-right: 6px; pointer-events: none; user-select: none;">[[File:Result arrow.png|link=]]</span>{{Inventory slot|item={{{RESULT|}}}|width=44|height=44}}{{#ifeq: {{bl|{{{shapeless|}}}}} | y | <div style="position: absolute; bottom: 4px; right: 4px; cursor: help; user-select: none;" title="This recipe is shapeless, the inputs may be placed in any arrangement in the crafting grid.">[[File:Shapeless.png|link=]]</div> | }}</div></includeonly><noinclude>
<div class="pixelated">[[File:Crafting_GUI.png|link=]]</div>
{{Documentation}}
 
<!-- Put categories on the documentation page -->
{{#if: {{{1|}}}
</noinclude>
|<div style="position: absolute; left: 14px; top: 14px;" data-mctitle="{{#if: {{{name1|}}} | {{{name1|}}} | {{{1}}} }}" class="minecraft-item">{{ItemToImageMap|key={{{1}}}|width=32|height=32|link={{#ifeq: {{PAGENAME}} | {{{1}}} | |{{{1}}}}}}}</div>
|<div></div>
}}
{{#if: {{{1B|}}}
|<div style="position: absolute; left: 17px; top: 15px;" data-mctitle="{{#if: {{{name1B|}}} | {{{name1B|}}} | {{{1B}}} }}" class="minecraft-item">{{ItemToImageMap|key={{{1B}}}|width=32|height=32|link={{#ifeq: {{PAGENAME}} | {{{1B}}} | |{{{1B}}}}}}}</div>
|<div></div>
}}
{{#if: {{{2|}}}
|<div style="position: absolute; left: 50px; top: 14px" data-mctitle="{{#if: {{{name2|}}} | {{{name2|}}} | {{{2}}} }}" class="minecraft-item">{{ItemToImageMap|key={{{2}}}|width=32|height=32|link={{#ifeq: {{PAGENAME}} | {{{2}}} | |{{{2}}}}}}}</div>
|<div></div>
}}
{{#if: {{{2B|}}}
|<div style="position: absolute; left: 53px; top: 15px"data-mctitle="{{#if: {{{name2B|}}} | {{{name2B|}}} | {{{2B}}} }}" class="minecraft-item">{{ItemToImageMap|key={{{2B}}}|width=32|height=32|link={{#ifeq: {{PAGENAME}} | {{{2B}}} | |{{{2B}}}}}}}</div>
|<div></div>
}}
{{#if: {{{3|}}}
|<div style="position: absolute; left: 86px; top: 14px" data-mctitle="{{#if: {{{name3|}}} | {{{name3|}}} | {{{3}}} }}" class="minecraft-item">{{ItemToImageMap|key={{{3}}}|width=32|height=32|link={{#ifeq: {{PAGENAME}} | {{{3}}} | |{{{3}}}}}}}</div>
|<div></div>
}}
{{#if: {{{3B|}}}
|<div style="position: absolute; left: 89px; top: 15px" data-mctitle="{{#if: {{{name3B|}}} | {{{name3B|}}} | {{{3B}}} }}" class="minecraft-item">{{ItemToImageMap|key={{{3B}}}|width=32|height=32|link={{#ifeq: {{PAGENAME}} | {{{3B}}} | |{{{3B}}}}}}}</div>
|<div></div>
}}
{{#if: {{{4|}}}
|<div style="position: absolute; left: 14px; top: 50px" data-mctitle="{{#if: {{{name4|}}} | {{{name4|}}} | {{{4}}} }}" class="minecraft-item">{{ItemToImageMap|key={{{4}}}|width=32|height=32|link={{#ifeq: {{PAGENAME}} | {{{4}}} | |{{{4}}}}}}}</div>
|<div></div>
}}
{{#if: {{{4B|}}}
|<div style="position: absolute; left: 17px; top: 51px" data-mctitle="{{#if: {{{name4B|}}} | {{{name4B|}}} | {{{4B}}} }}" class="minecraft-item">{{ItemToImageMap|key={{{4B}}}|width=32|height=32|link={{#ifeq: {{PAGENAME}} | {{{4B}}} | |{{{4B}}}}}}}</div>
|<div></div>
}}
{{#if: {{{5|}}}
|<div style="position: absolute; left: 50px; top: 50px" data-mctitle="{{#if: {{{name5|}}} | {{{name5|}}} | {{{5}}} }}" class="minecraft-item">{{ItemToImageMap|key={{{5}}}|width=32|height=32|link={{#ifeq: {{PAGENAME}} | {{{5}}} | |{{{5}}}}}}}</div>
|<div></div>
}}
{{#if: {{{5B|}}}
|<div style="position: absolute; left: 53px; top: 51px" data-mctitle="{{#if: {{{name5B|}}} | {{{name5B|}}} | {{{5B}}} }}" class="minecraft-item">{{ItemToImageMap|key={{{5B}}}|width=32|height=32|link={{#ifeq: {{PAGENAME}} | {{{5B}}} | |{{{5B}}}}}}}</div>
|<div></div>
}}
{{#if: {{{6|}}}
|<div style="position: absolute; left: 86px; top: 50px" data-mctitle="{{#if: {{{name6|}}} | {{{name6|}}} | {{{6}}} }}" class="minecraft-item">{{ItemToImageMap|key={{{6}}}|width=32|height=32|link={{#ifeq: {{PAGENAME}} | {{{6}}} | |{{{6}}}}}}}</div>
|<div></div>
}}
{{#if: {{{6B|}}}
|<div style="position: absolute; left: 89px; top: 51px"data-mctitle="{{#if: {{{name6B|}}} | {{{name6B|}}} | {{{6B}}} }}" class="minecraft-item">{{ItemToImageMap|key={{{6B}}}|width=32|height=32|link={{#ifeq: {{PAGENAME}} | {{{6B}}} | |{{{6B}}}}}}}</div>
|<div></div>
}}
{{#if: {{{7|}}}
|<div style="position: absolute; left: 14px; top: 86px" data-mctitle="{{#if: {{{name7|}}} | {{{name7|}}} | {{{7}}} }}" class="minecraft-item">{{ItemToImageMap|key={{{7}}}|width=32|height=32|link={{#ifeq: {{PAGENAME}} | {{{7}}} | |{{{7}}}}}}}</div>
|<div></div>
}}
{{#if: {{{7B|}}}
|<div style="position: absolute; left: 17px; top: 87px" data-mctitle="{{#if: {{{name7B|}}} | {{{name7B|}}} | {{{7B}}} }}" class="minecraft-item">{{ItemToImageMap|key={{{7B}}}|width=32|height=32|link={{#ifeq: {{PAGENAME}} | {{{7B}}} | |{{{7B}}}}}}}</div>
|<div></div>
}}
{{#if: {{{8|}}}
|<div style="position: absolute; left: 50px; top: 86px" data-mctitle="{{#if: {{{name8|}}} | {{{name8|}}} | {{{8}}} }}" class="minecraft-item">{{ItemToImageMap|key={{{8}}}|width=32|height=32|link={{#ifeq: {{PAGENAME}} | {{{8}}} | |{{{8}}}}}}}</div>
|<div></div>
}}
{{#if: {{{8B|}}}
|<div style="position: absolute; left: 53px; top: 87px" data-mctitle="{{#if: {{{name8B|}}} | {{{name8B|}}} | {{{8B}}} }}" class="minecraft-item">{{ItemToImageMap|key={{{8B}}}|width=32|height=32|link={{#ifeq: {{PAGENAME}} | {{{8B}}} | |{{{8B}}}}}}}</div>
|<div></div>
}}
{{#if: {{{9|}}}
|<div style="position: absolute; left: 86px; top: 86px" data-mctitle="{{#if: {{{name9|}}} | {{{name9|}}} | {{{9}}} }}" class="minecraft-item">{{ItemToImageMap|key={{{9}}}|width=32|height=32|link={{#ifeq: {{PAGENAME}} | {{{9}}} | |{{{9}}}}}}}</div>
|<div></div>
}}
{{#if: {{{9B|}}}
|<div style="position: absolute; left: 89px; top: 87px" data-mctitle="{{#if: {{{name9B|}}} | {{{name9B|}}} | {{{9B}}} }}" class="minecraft-item">{{ItemToImageMap|key={{{9B}}}|width=32|height=32|link={{#ifeq: {{PAGENAME}} | {{{9B}}} | |{{{9B}}}}}}}</div>
|<div></div>
}}
{{#if: {{{RESULT|}}}
|<div style="position: absolute; left: 202px; top: 50px" data-mctitle="{{#if: {{{nameRESULT|}}} | {{{nameRESULT|}}} | {{{RESULT}}} }}" class="minecraft-item">{{ItemToImageMap|key={{{RESULT}}}|width=32|height=32|link={{#ifeq: {{PAGENAME}} | {{{RESULT}}} | |{{{RESULT}}}}}}}</div>
|<div></div>
}}
{{#if: {{{RESULTB|}}}
|<div style="position: absolute; left: 205px; top: 51px" data-mctitle="{{#if: {{{nameRESULTB|}}} | {{{nameRESULTB|}}} | {{{RESULTB}}} }}" class="minecraft-item">{{ItemToImageMap|key={{{RESULTB}}}|width=32|height=32|link={{#ifeq: {{PAGENAME}} | {{{RESULTB}}} | |{{{RESULTB}}}}}}}</div>
|<div></div>
}}
{{#if:{{{AMOUNT|}}}
|
<div style="left:222px; top:64px; width:16px; height:21px; position:absolute;user-select:none;" data-mctitle="{{#if: {{{nameRESULT|}}} | {{{nameRESULT|}}} | {{{RESULT}}} }}" class="minecraft-item">
<div class="pixelated c-f" style="right:2px; bottom:-10px; position:absolute; text-shadow: 0.125em 0.125em 0 #404040">
{{{AMOUNT}}}
</div>
</div>
|
}}
</div></includeonly><noinclude>{{Crafting|4=Crude Steel|5=Crude Steel|6=Crude Steel|RESULT=Steel Ingot|AMOUNT=4}}</noinclude>

Latest revision as of 02:43, 30 March 2023

[view | edit | history | purge]Documentation

This template allows for the creation of a crafting interface.

Arguments[edit source]

Argument Note
1 Top left slot.
2 Top center slot.
3 Top right slot.
4 Middle left slot.
5 Middle center slot.
6 Middle right slot.
7 Bottom left slot.
8 Bottom center slot.
9 Bottom right slot.
RESULT Result slot.
shapeless If the recipe is shapeless or not.

Usage[edit source]

{{Crafting|4=Crude Steel|5=Crude Steel|6=Crude Steel|RESULT=Steel Ingot}} gives:

{{Crafting|1=Any Planks|4=Any Planks|5=Any Planks|7=Any Planks|8=Any Planks|9=Any Planks|RESULT=Any Wooden Stairs,6}} gives:

Note that, unlike the Minecraft Wiki, "Matching [item]" does not exist here, and instead "Any [item]" is used. "Any [item]" is not in a random order; its order is specified in Module:Inventory slot.

{{Crafting|1=Steel Ingot|2=Flint|RESULT=Steel Fire Striker|shapeless=y}} gives:

This template's items use {{Inventory slot}}, which means they follow the same formatting.

See also[edit source]

[view | edit | history | purge]The above documentation is transcluded from Template:Crafting/doc.