
V2.0.0 重大更新!
我已成功将 Bloody Bits 移植到 Neoforge 1.21.1!此次更新带来了一系列新变化:
- 模组已完全重构!血液飞溅和溅射效果现在改为粒子系统而非实体,这意味着性能得到了巨大提升。
- 血液溅射在方块上的位置更加精准。特别感谢 Iron431 及其模组 Iron's Simple Blood。我得以借鉴他的一些代码,使我的粒子能够正确地在方块上渲染。
- 实体的出血颜色现在通过数据包(datapacks)和标签系统进行修改,这使得添加自定义模组实体出血颜色的方式更加条理清晰。此外,使用实体标签系统还有一个隐藏优势,即具有更好的性能表现。
- 配置文件现在使用 Neoforge 内置的菜单界面!无需再打开文件夹中的配置文件。
- 部分功能(如血液沿墙壁流淌)尚未实现。让相关数学逻辑生效颇具挑战性,可能需要更多时间。不过,血液仍会从天花板滴落!
由于粒子比实体(旧的血液飞溅效果)更易于处理,该模组现在发生崩溃错误的概率大幅降低,但新版本可能仍存在一些小问题需要解决。如果遇到任何问题,欢迎提交 错误报告。
血液飞溅与溅射

当实体受到攻击时,会根据伤害值产生特定数量的血液飞溅粒子,并以一定速度扩散。这些粒子会溅射到几乎所有表面上,无论其形状如何。
血液迷雾
当实体受到特定伤害类型(默认为箭矢,并支持 TACZ 和 Scorched Guns 模组)的攻击时,会产生血液迷雾。迷雾的大小是可配置的,如果使用带有血液迷雾伤害类型的致命一击造成伤害,则产生的迷雾大小将翻倍。我曾研究过一些更写实的战争电影,以及 BlockFront 如何实现其血液效果,希望模仿类似的效果。
上述 GIF 中使用的(1.20.1 - Forge)模组大多包括:
血液滴落
如果血液溅射位于天花板上,它们还会以随机间隔滴落。
数据驱动的血液颜色类型

数据包可以根据十六进制颜色值决定实体出血的颜色(或者是否出血)。这个 网站 可以帮助确定自定义的血液颜色。

游戏内配置
利用 Neoforge 的游戏内配置菜单系统,你现在无需打开配置文件目录中的实际文件即可编辑配置数值。

在客户端配置中,你可以设置诸如血液溅射持续时间和血液溅射音效音量等选项。
在通用配置中,你可以将某些伤害来源列入黑名单,使其不会导致任何实体出血。我已经预置了大多数不太可能导致出血的伤害源,例如 onFire(着火)和 starve(饥饿),但如果我遗漏了某些情况,玩家也可以根据需要轻松地将这些伤害源添加到列表中。
编辑血液颜色类型
要编辑血液颜色类型,只需添加一个自定义数据包以覆盖模组的现有数据包(我将提供现有数据包的副本供玩家下载)。该数据包包含两个文件夹:blood_colors 和 tags。

blood_colors 文件夹包含一系列 JSON 文件。这些文件的名称并不重要。每个文件仅包含一个具有两个属性的 JSON 对象:entity_tag 和 color。entity_tag 将引用 tags/entity_type 目录中所需的 JSON 文件。color 属性将引用你希望实体出血的所需十六进制颜色值。

tags 文件夹包含一个子文件夹 entity_type。这是 Minecraft 内置的结构,允许我们为实体添加特定的标签以供引用。在这里,我们只需创建充当标签名称的 JSON 文件,并在其中填充我们希望该标签适用的实体列表。

上面是 JSON 文件 bleeds_green.json 的一个示例,你会注意到它在 blood_colors/green.json 文件的 entity_tag 属性中被引用。此文件中仅有两个属性,但由于需要在此处设置实体列表,因此内容较多。
replace属性仅告知游戏该数据包是否会用此数据替换任何现有数据。由于这是一个我添加到这些实体的全新标签,我将此值设置为false;但如果制作了一个覆盖此数据包的数据包,则应将其设置为true。values属性将包含此标签应适用的所有实体列表。此外,JSON 对象也可以添加到此列表中。它们由大括号{}表示。其中的required属性确定此对象 ID 是否是标签成功加载所必需的。我使用这些对象作为模组实体的可选引用,因此将这些属性设置为false。id属性引用另一个文件位置,其中将包含我希望此标签适用的模组实体。

上面是一个标签应适用的模组实体示例。
默认支持的模组
- Iron's Spells & Spellbooks
- L_Ender's Cataclysm
默认数据包下载
注意:
随着未来的更新,我将在 Bloody Bits 的基础数据包中添加更多模组兼容项。如果你有希望添加的特定模组,请告诉我,我会看看能否将其加入!如果无法添加,你也可以通过自定义数据包自行添加。

V2.0.0 Major Update!
I've successfully ported Bloody Bits to Neoforge 1.21.1! With it comes a host of new changes:
- The mod has been completely refactored! Blood sprays and spatters are now particles instead of entities, which means a massive improvement on performance.
- Blood spatters are now a LOT more accurate with where they are placed on blocks. Special thanks to Iron431 and his mod Iron's Simple Blood. I was able to implement some of his code to get my particles to properly render on the blocks.
- Entity bleed colors are now modified via datapacks, and a tag system, which means a much more organized way of adding custom modded entity bleed colors. As well, using the entity tag system has another hidden benefit of being more performant.
- The configs now use Neoforge's built-in menu! No more needing to open up the config files in the folders.
- Some features such as blood sliding down walls have not been implemented yet. Getting the math to work for them is a bit tricky and will likely take some more time. However, blood still drips from the ceiling!
The mod should be way less prone to crashing errors now as particles are less troublesome to work with compared to entities (the old blood sprays), but there still may be some kinks to work out in the new version. If you encounter any issues, feel free to open up a bug report.
Blood Sprays & Spatters

When an entity is attacked, it will produce a certain amount blood spray particles at a certain velocity depending on attack damage. These particles will spatter onto almost all surfaces regardless of shape.
Blood Mist
When an entity is hit by a certain damage type (By default, this is arrows with mod support for TACZ and Scorched Guns), they will produce a blood mist. The size of the mist is configurable, and if the killing blow is dealt with a blood mist damage type then the mist produced will be double the size. I was looking into some more realistic war movies, and how BlockFront implements their blood, and wanted to emulate something similar.
Most of the (1.20.1 - Forge) mods used in the above gifs:
Blood Drip
The blood spatters will also drip at random intervals if on a ceiling.
Data Driven Blood Color Types

Datapacks can dictate what color entities bleed (or if they bleed at all) based on a hex code value. This website can help with determining a custom blood color.

In Game Configs
Using Neoforge's in-game config menu system, you're now able to edit config values without having to open up the actual file in the config directory.

In the Client Config you can set things like the Blood Spatter Lifetime and the Blood Spatter Sound Volume.
In the Common Config you can blacklist certain damage sources from causing bleed damage to any entities. I've already included most sources that wouldn't make sense to cause bleeding such as onFire and starve, but if I missed any, then players can easily add the source to the list if they desire.
Editing Blood Color Types
To edit the blood color types, simply add a custom datapack to override the mod's existing one (I will provide a copy of the existing datapack for players to download). The datapack consists of two folders: blood_colors and tags.

The blood_colors folder contains a list of JSON files. The names of these files don't matter. Each file simply contains a JSON object that has two properties: entity_tag and color. The entity_tag will references the desired JSON file in the tags/entity_type directory. The color property will reference the desired hex code color value that you want the entities to bleed.

The tags folder contains a subfolder entity_type. This is a built-in Minecraft structure that allows us to add certain tags to entities for reference. Here, we simply create the JSON file that will act as the tag's name, and populate it with a list of entities that we want this tag to apply to.

Above is an example of the JSON file bleeds_green.json, which you will notice is the one that is referenced in the blood_colors/green.json file's entity_tag property. In this file, there are only two properties, but a lot of content since this is where the list of entities will be set.
- The
replaceproperty simply tells the game that this datapack will, or will not, be replacing any preexisting data with this data. Since this is an entirely new tag that I am adding to these entities, I set this value tofalse, but if a datapack were made to override this one, then it would be set totrue. - The
valuesproperty will contain a list of all the entities that this tag should apply to. As well, JSON objects can be added to this list. These are denoted by the opening and closing curly braces{}. In here there the propertyrequiredproperty determines if this object ID is required for the tag to load successfully. I'm using these objects as optional references to mod entities, so I set those properties asfalse. Theidproperty references another file location that will contain the modded entities that I want this tag to apply to.

Above is an example of a mod's entity that a tag should apply to.
Supported Mods By Default
- Iron's Spells & Spellbooks
- L_Ender's Cataclysm
Default Datapack Downloads
NOTE:
With future updates I will add more mod compats to the base datapack of Bloody Bits. If you have a specific mod that you would like added, just let me know, and I'll see if I can get it added in! If I can't, then it's fully possible to add them in yourself via a custom datapack.
下载 CravenCraft's Bloody Bits
下载 CravenCraft's Bloody Bits
下载 CravenCraft's Bloody Bits
下载 CravenCraft's Bloody Bits
下载 CravenCraft's Bloody Bits
下载 CravenCraft's Bloody Bits
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 CravenCraft's Bloody Bits
下载 CravenCraft's Bloody Bits
下载 CravenCraft's Bloody Bits
下载 CravenCraft's Bloody Bits
V2.1.0 粒子更新
- 为投射物命中添加了血液冲击迷雾粒子,这些粒子会朝向伤害来源移动(带有一定随机偏差)。
- 默认情况下,减少了血液飞溅粒子的夸张程度。
- 使血液斑点略微变小。
- 血液飞溅方向现在与伤害方向相反(带有一定随机偏差)。
- 添加了用于伤害类型调试信息的通用配置选项。
- 添加了客户端配置选项,用于调整血液飞溅摩擦力和血液迷雾缩放比例。
- 添加了用于设置血液飞溅数量和伤害上限的通用配置选项。
- 血液飞溅现在类似于 V1.3.4 版本中的 3D 效果。
- 在致命一击时,血液迷雾粒子的大小将翻倍。
- 蠹虫现在默认注册为流出绿色血液。
- 修复了问题:#53
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
AE2:一款流行的自动化与存储模组
评论 0
登录后参与评分
还没有评论,来抢沙发吧