7 days to mine minecraft mod Wiki
Advertisement
This is the documentation page. It should be transcluded into the main template page. See Template:Documentation for more information

Shortcut

{{ #vardefine: $fullurl-url | https://7-days-to-mine-mod.fandom.com/wiki/Template:Hp?redirect=no

}}[{{ #var: $fullurl-url }} hp]

Lua logo.svg
This template uses Module:Iconbar, a script written in Lua.

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 ( File:Poisoned Heart (icon).pngFile:Poisoned Heart (icon).pngFile:Poisoned Heart (icon).pngFile:Half Poisoned Heart (icon).png)
{{hp|<7>|<withered=1>}} 7 ( File:Withered Heart (icon).pngFile:Withered Heart (icon).pngFile:Withered Heart (icon).pngFile:Half Withered Heart (icon).png)
{{hp|<7>|<freezing=1>}} 7 ( File:Freezing Heart (icon).pngFile:Freezing Heart (icon).pngFile:Freezing Heart (icon).pngFile:Half Freezing Heart (icon).png)
{{hp|<7>|<absorption=1>}} 7 ( File:Absorption Heart (icon).pngFile:Absorption Heart (icon).pngFile:Absorption Heart (icon).pngFile:Half Absorption Heart (icon).png)
{{hp|<7>|<hardcore=1>}} 7 ( File:Hardcore Heart (icon).pngFile:Hardcore Heart (icon).pngFile:Hardcore Heart (icon).pngFile:Half Hardcore Heart (icon).png)
{{hp|<7>|<hardcore=1>|<poisoned=1>}} 7 ( File:Poisoned Hardcore Heart (icon).pngFile:Poisoned Hardcore Heart (icon).pngFile:Poisoned Hardcore Heart (icon).pngFile:Half Poisoned Hardcore Heart (icon).png)
{{hp|<7>|<hardcore=1>|<withered=1>}} 7 ( File:Withered Hardcore Heart (icon).pngFile:Withered Hardcore Heart (icon).pngFile:Withered Hardcore Heart (icon).pngFile:Half Withered Hardcore Heart (icon).png)
{{hp|<7>|<hardcore=1>|<absorption=1>}} 7 ( File:Absorption Hardcore Heart (icon).pngFile:Absorption Hardcore Heart (icon).pngFile:Absorption Hardcore Heart (icon).pngFile:Half Absorption Hardcore Heart (icon).png)
{{hp|<7>|<mob=1>}} 7 ( File:Half Mob Heart (icon).pngFile:Mob Heart (icon).pngFile:Mob Heart (icon).pngFile:Mob Heart (icon).png)
{{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)


Advertisement