Entity Health Display Mod (1.21.11, 1.21.1) – Show Custom Mob Health Bars
Entity Health Display Mod provides a server-side library for displaying the health of mobs in Minecraft. It runs on Fabric servers to show custom health text and heart icons for different mobs. Other projects can use this library to format how mob names, current health numbers, and maximum health values appear in the world.
![]()
Features:
- Server-Side Library: Works on Fabric servers as a foundation for showing mob health information.
- Custom Health Formatting: Uses the
FORMAT_HEALTH_DISPLAYevent to customize how the mob name, current health, maximum health, and heart symbols look. - Color-Coded Health Text: Changes the health number color based on the mob’s remaining health, such as turning yellow when health drops to half or lower and staying green when above half.
- Display Conditions: Uses the
SHOULD_DISPLAY_HEALTHevent to control when a mob’s health appears in the world.
Configuration:
Projects using this library can add the repository and dependencies to their build file:
repositories {
maven {
url "https://api.modrinth.com/maven"
content { includeGroup "maven.modrinth" }
}
maven { url "https://maven.nucleoid.xyz" }
}
dependencies {
modImplementation include("maven.modrinth:entity-health-display:VERSION_TAG")
modImplementation include("eu.pb4:placeholder-api:${project.placeholder_api}")
modImplementation include("eu.pb4:polymer-virtual-entity:${project.polymer_version}")
}
Example code for registering health display formatting and visibility conditions:
HealthDisplayEvents.FORMAT_HEALTH_DISPLAY.register((entity, world) -> {
String color = (entity.getMaxHealth() / 2) >= entity.getHealth() ? "<yellow>" : "<green>";
var text = TextParserUtils.formatText("<red>" + entity.getName().getString() + " " + color + String.format("%.1f", entity.getHealth()) + "<white>/<green>" + (int)entity.getMaxHealth() + "<red>❤");
return text;
});
HealthDisplayEvents.SHOULD_DISPLAY_HEALTH.register((entity, world) -> {
return true;
});
How to Install:
New to Minecraft? Follow our step-by-step guide to install Mods on your PC.View Guide
Requirements:
Entity Health Display Mod Download Links
0



















This post has no comments yet. Be the first — your comment will appear here.