我一直在寻找一种方法,让快捷栏上方的每一颗心显示不同的颜色,但并未找到具备该功能的模组。经过对自定义血条模组的深入搜索,我发现了由 Lanfix8 制作的 Simple Health Bar (Forge/Fabric),这正符合我最初设想的起点。只需稍作调整即可实现我的构想。
你可以在此处找到本模组所基于的原始模组:
在获得原作者许可后,我对模组代码进行了修改,现在增加了彩虹心效果等功能。
功能特性:
-
彩虹血条模式:
带有/不带速度可调动画的彩虹心
-
自定义颜色模式:
为所有心脏设置默认颜色
-
不变模式:
不应用任何颜色到心脏上。它将仅显示心脏的默认纹理(你可以通过自己的资源包更改此纹理,详见下文)
-
生命值指示文本:
显示当前 HP 的文本,支持自定义颜色、位置和对齐方式(左/右)选项
-
吸收心、中毒心、凋蚀心和冰冻心的纹理
-
可调节高度的护甲条:
允许你调整护甲条的 Y 轴高度
所有这些设置都可以在模组的配置文件中进行调整(位于 .minecraft > config > rainbow-health-bar.properties)。
这里有一段视频,展示了彩虹动画的效果:
关于想要修改心脏纹理的人的信息:
你可以通过将模组的文件扩展名从 .jar 改为 .zip 来实现这一点,这样你就可以看到制作纹理包所需的文件结构(assets > rainbow-health-bar > textures > gui > healthbars)。然后,你只需要常规的 pack.mcmeta 文件以及放置在 healthbars 文件夹中的纹理文件,文件名需与模组中的 .png 文件一致。
注意: 当你在纹理包中更改心脏形状时,彩虹着色可能无法正确覆盖心脏。
I have searched for a way to have each of the hearts above the hotbar a different color and didn't find any mod with that functionality. After a deeper search for custom health bar bods, I have come across "Simple Health Bar (Forge/Fabric)" by Lanfix8, which was the perfect starting point for what I had in mind. Just needed some tweaking to achieve what I had in mind.
You can find the mod that this is based on here:
With consent by the creator of the original mod, I have modified the mod's code, which now adds rainbow hearts and more.
Features:
-
Rainbow health bar mode:
Rainbow hearts with/without a speed-adjustable animation
-
Custom color mode:
Set a default color for all of the hearts
-
Unchanged mode:
There is no color applied to the hearts. It will just show the default texture for the hearts (which you could change via your own resource pack, more on that below)
-
Health Indicator Text:
Text, which shows your current HP with custom color, positioning and alignment (left/right) options
-
Textures for Absorption hearts, poison hearts, wither hearts and frozen hearts
-
Height-adjustable armor bar:
Lets you adjust the y-height of the armor bar
All of those settings can be adjusted in the mod's config file (in .minecraft > config > rainbow-health-bar.properties).
Here's a video, showing what the rainbow animation looks like:
Information for people who want to modify the heart textures:
You can do that by changing the mod's file extension from .jar to .zip, which lets you be able to see the file structure you'll need for your texture pack (assets > rainbow-health-bar > textures > gui > healthbars). Then you just need your usual pack.mcdata file and your textures in the healthbars folder, named like the .png files in the mod.
Note: The rainbow coloration won't cover the hearts correctly when changing the hearts shape in your texture pack
评论 0
登录后参与评分
还没有评论,来抢沙发吧