Use Vanilla health determining code.

Changes the code to determine max health to match the code used in Vanilla Minecraft.