render(net.minecraft.client.gui.GuiGraphics context,
net.minecraft.world.entity.player.Player player,
org.joml.Vector2i[] heartPositions,
int displayHealth,
int maxDisplayHealth)
Note that displayHealth and maxDisplayHealth are not always the same as health and max health.
Method Details
render
voidrender(net.minecraft.client.gui.GuiGraphics context,
net.minecraft.world.entity.player.Player player,
org.joml.Vector2i[] heartPositions,
int displayHealth,
int maxDisplayHealth)
Note that displayHealth and maxDisplayHealth are not always the same as health and max health. Mods that
override the health bar rendering like Colorful Hearts may change these values.
Parameters:
context - DrawContext for the HUD
player - The player rendering hearts for
heartPositions - An array of heart positions on the HUD. Elements may be null, indicating that a heart
should not be rendered at this index.
displayHealth - How many half hearts are to be displayed
maxDisplayHealth - The maximum number of half hearts to be displayed