Template:Hotbar: Difference between revisions

From Create: Minecraft Mod Wiki
Jump to navigation Jump to search
Create: Minecraft Mod Wiki>Joker876
Created page with "<includeonly><div><span class="mcui pixel-image" style=" background: {{FileUrl|{{#if: {{{hotbar|}}} | {{{hotbar}}} | Hotbar.png }}}} no-repeat; border: 0; width: 352px; he..."
 
BoxWithout (talk | contribs)
m 3 revisions imported
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
<includeonly><div><span class="mcui pixel-image" style="
<includeonly><div><span class="mcui pixel-image mcui-hotbar" style="
background: {{FileUrl|{{#if: {{{hotbar|}}} | {{{hotbar}}} | Hotbar.png }}}} no-repeat;
border: 0;
border: 0;
width: 352px;
width: 352px;
Line 7: Line 6:
">{{
">{{
#if: {{{selected|}}} | {{#ifexpr: {{{selected}}} >= 1 and {{{selected}}} <= 9 |
#if: {{{selected|}}} | {{#ifexpr: {{{selected}}} >= 1 and {{{selected}}} <= 9 |
<span style="
<span class="mcui-hotbar-selected" style="
position: absolute;
position: absolute;
display: block;
display: block;
width: 48px;
width: 48px;
height: 48px;
height: 48px;
background: {{FileUrl|{{#if: {{{selector|}}} | {{{selector}}} | Hotbar selector.png }}}} no-repeat;
top: -2px;
top: -2px;
left: {{#expr: ({{{selected}}} - 1) * 40 }}px;
left: {{#expr: ({{{selected}}} - 1) * 40 }}px;

Latest revision as of 21:33, 14 February 2025

[view | edit | history | purge]Documentation
Template shortcut

This template is used to create an interface that looks similar to the Hotbar.

See Template:Inventory slot for basic slot usage, this documentation page will cover additional or different functions.

Usage[edit source]

{{hotbar
|Slot 1
|Slot 2
|Slot 3
|Slot 4
|Slot 5
|Slot 6
|Slot 7
|Slot 8
|Slot 9
|selected=Selected slot, 1-9
|hotbar=Hotbar img
|selector=Selection img
}}

Any empty slots can be left blank.

Examples[edit source]

Blank slots

{{hotbar|Grass Block|||Dirt|Wheat,2}}


Direct slot specification

{{hotbar|1=Grass Block|4=Dirt|5=Wheat,2}}


Selected slot

{{hotbar|Grass Block|||Dirt|Wheat,2|selected=4}}

File usage[edit source]

See also[edit source]

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