Template:Health/doc

From Create: Minecraft Mod Wiki
Revision as of 21:33, 14 February 2025 by BoxWithout (talk | contribs) (3 revisions imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
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