Template:Health/doc: Difference between revisions

From Create: Minecraft Mod Wiki
Jump to navigation Jump to search
Create: Minecraft Mod Wiki>Joker876
Created page with "{{Documentation subpage}} {{Shortcut|hp}} {{lua|Iconbar}} This template displays health points and visualizes these with the help of a health bar. For..."
 
BoxWithout (talk | contribs)
m 3 revisions imported
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}
{{Shortcut|hp}}
{{Ts|hp}}
{{lua|Iconbar}}
{{lua|Iconbar}}


Line 26: Line 26:
| <code>freezing</code> || Show blue freezing heart icons. || ''None''
| <code>freezing</code> || Show blue freezing heart icons. || ''None''
|-
|-
| <code>hardcore</code> || Show [[hardcore]] heart icon variation. || ''None''
| <code>hardcore</code> || Show {{MC|hardcore}} heart icon variation. || ''None''
|-
|-
| <code>mob</code> || Show mob heart icons, aligned to the right. || ''None''
| <code>mob</code> || Show mob heart icons, aligned to the right. || ''None''

Latest revision as of 21:33, 14 February 2025

This is a documentation subpage for Template:Health.
It contains usage information, categories and other content that is not part of the original template page.
Template shortcut

Lua error in package.lua at line 80: module 'Dev:Arguments' not found.

This template displays health points and visualizes these with the help of a health bar.

For a more compact display, all health point values above 10 (5 hearts) are replaced by ♥ × [hp / 2].

All health point values which are not whole numbers are also replaced by ♥ × [hp / 2].

Parameter Function Default value
1 Amount of hearts to show. 0
2 Size of hearts in pixels. 9
poisoned Show yellow-green heart icons. None
withered Show black withered heart icons. None
absorption Show absorption heart icons. None
freezing Show blue freezing heart icons. None
hardcore Show hardcore heart icon variation. None
mob Show mob heart icons, aligned to the right. None
notag Remove number and parenthesis. None
total Total or minimum amount of hearts to show, any more than the set amount in {{{1}}} are shown as empty. 0
Code Result
{{hp}} 0♥
{{hp|<0>}} 0♥
{{hp|<4>}} 4♥♥
{{hp|<4>|<total=20>}} 4♥♥♥♥♥♥♥♥♥♥
{{hp|<7>|<poisoned=1>}} 7♥♥♥♥
{{hp|<7>|<withered=1>}} 7♥♥♥♥
{{hp|<7>|<freezing=1>}} 7♥♥♥♥
{{hp|<7>|<absorption=1>}} 7♥♥♥♥
{{hp|<7>|<hardcore=1>}} 7♥♥♥♥
{{hp|<7>|<hardcore=1>|<poisoned=1>}} 7♥♥♥♥
{{hp|<7>|<hardcore=1>|<withered=1>}} 7♥♥♥♥
{{hp|<7>|<hardcore=1>|<absorption=1>}} 7♥♥♥♥
{{hp|<7>|<mob=1>}} 7♥♥♥♥
{{hp|<4>|<18px>}} 4♥♥
{{hp|<20>|<notag=1>}} ♥ × 10
{{hp|<26>|<notag=1>}} ♥ × 13
{{hp|<10>}} 10♥♥♥♥♥
{{hp|<2.5>}} 2.5♥ × 1.25
{{hp|<41>}} 41♥ × 20.5