跳到正文

AttributesLib

作者:hhoao

The attributesLib module offers an attribute interface, modifies the original armor reduction calculation formula, provides enchantment tooltip, attribute formatting and attribute expansion.

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

Overview

AttributesLib is a library mod, derived from Apothic Attributes. Its functionality is primarily related to attributes.

Attributes Screen

AttributesLib provides an attributes GUI, accessible via the sword button in the character inventory. This GUI displays all attributes attached to the player.

You can filter the displayed attributes to show only modified ones — that is, attributes that differ from vanilla. Hovering over an attribute shows its description and detailed information.

Armor Calculation

To support armor penetration, armor shredding, protection penetration, and protection shredding, AttributesLib changes the way armor and protection damage reduction is calculated.

In vanilla, armor determines the amount of damage reduction based on your armor toughness value and the incoming damage value, which makes damage reduction a non-linear function of armor. The mod restores the formula to a linear one, namely DR = 50 / (50 + armor), where the denominator (50 + armor) is the part that has been made linear.

However, the formula as a whole is not linear — in fact, it is not even inversely proportional.

The armor toughness attribute reduces the effectiveness of enemy armor shredding and armor penetration, but does not reduce the damage taken.

Enchantment Tooltips

Another feature is the change to enchantment tooltips. Descriptions are added to potion items that provide potion effects rather than simply providing attribute modifiers. When you hover your cursor over a potion effect’s icon, these descriptions (along with the attribute modifiers — that is, the resulting attribute changes) are shown in the tooltip.

Attribute Formatting

AttributesLib allows attributes to set a custom format for their own tooltips. The most notable examples of attributes with custom formats are percentage-based attributes, which always display their values as percentages regardless of their modifier type. For example, the vanilla attributes movement speed and knockback resistance are displayed in a percentage-based format.

Another part of this feature is additional tooltip information. Enabling advanced tooltips (F3+H) will display additional information about modifier types and base values.

Attribute Expansion

AttributesLib expands many attributes, including but not limited to dodge chance, armor penetration, life steal, and more. All of these can be seen in the in-game attributes screen.

If developers want to use these attributes, they can depend on this library and reference the relevant attributes; see GitHub for details.

常见问题

AttributesLib 支持哪些 Minecraft 版本?

AttributesLib 支持 Minecraft Java 版 1.12.2–1.20.1,共 4 个版本,可用的加载器:Forge。下载时注意选择和你游戏版本一致的文件。

AttributesLib 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Forge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。

评论

登录后评论和评分

hhoao 的其他作品

查看全部 →