Warning: file_put_contents(/www/wwwroot/nmbt.106988770/cache/modrinth_versions_84H12Z4u.json): Failed to open stream: Permission denied in /www/wwwroot/nmbt.106988770/resource_detail.php on line 53
Entity Health Display - 墨喵 Minecraft 资源
Entity Health Display 图标

Entity Health Display

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 0.3.1+1.21.3
本资源为搬运资源,原资源地址: https://modrinth.com/mod/entity-health-display
资源信息

Minecraft 版本: 1.21.3

平台: fabric

标签: library

资源介绍

About

Entity Health Display is a fabric server-side library for displaying entities' health.

Installing

To use Entity Health Display in your project add the Modrinth repository to your build file and a mod dependency. Replace the VERSION_TAG with the latest version, for example 0.3.1+1.20.2

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

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;
});
下载与版本
评论(0)
请 登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

赞助作者

请 登录 后赞助作者。

🔥 相关推荐
PowerHeroes

价格:0 墨喵币
下载量:0

查看详情
Oooh, Pinky!

价格:0 墨喵币
下载量:0

查看详情
Mechanicals Lib

价格:0 墨喵币
下载量:0

查看详情
Dark Iron Dwarf Origin

价格:0 墨喵币
下载量:0

查看详情