Skip to content

maxPlayerHealth

uniform float maxPlayerHealth;

This value stores the maximum player health value, which is twice the number of maximum hearts (one value for each half-heart). This value is 0 in modes without player health, such as creative and spectator modes. In a default survival world this value is 20 unless changed by mods or effects like potions or golden apples.