MaxEnchantStar
当附魔达到其有效最高等级时,在附魔名称后添加一个 ⭐。
解决的问题
原版工具提示仅显示附魔名称和等级,但从不表明该等级是否已达到上限。对于已满级的装备,你仍需记忆(或查阅)每种附魔的上限。在使用提升附魔上限的模组(例如 NoMaxEnchant)或添加了自定义附魔的数据包时,有效最高等级可能与客户端假设的不同,或者客户端根本不知道最高等级是多少。
MaxEnchantStar 会在所有已达到有效最高等级的附魔行末尾附加一颗星,以便一眼就能看出哪些附魔已满级。
环境
仅客户端。
MaxEnchantStar 无需安装在服务器上。当可用时,它会读取来自 NoMaxEnchant 提供的有效最高附魔等级。
如果没有 NoMaxEnchant 提供有效最高等级,MaxEnchantStar 将回退到使用本地附魔注册表中的最大等级。
星星仅为视觉效果。它不会改变铁砧行为、附魔台结果或任何游戏规则。
已知限制
- 有效最高等级来源。 如果没有提升最高等级的来源,客户端只能使用注册表最大值。如果另一个模组在不更改注册表的情况下提升了 铁砧 上限,除非该模组也使用 MaxEnchantStar 支持的协议发布其有效最高等级,否则星星仍将停留在原版最大值上。
- 其他工具提示重构模组。 完全替换附魔工具提示文本的模组仍可能产生干扰。MaxEnchantStar 使用了方法包装(method wrap),因此通常仍能获取其最终文本;如果一个模组根本不经过
Enchantment.getName,则该路径下不会出现星星。
机制
- 目标:
Enchantment.getName(RegistryEntry, int),进行包装以将星星应用于生成的任何文本(原版或其他模组的替换文本)。
- 条件:当
level >= effectiveMax(即等级大于等于有效最高等级)时添加星星。
- 有效最高等级解析:
- 如果 NoMaxEnchant 提供了有效最高等级,则使用该附魔的值。
- 否则,回退到本地注册表中的
entry.value().getMaxLevel()。
- 格式化:星星作为单独的样式片段附加,以保留名称原有的颜色/样式。
兼容性
NoMaxEnchant
MaxEnchantStar 与 NoMaxEnchant 配合效果极佳。
NoMaxEnchant 向 MaxEnchantStar 提供服务器使用的有效最高附魔等级。这允许 MaxEnchantStar 在有效最高等级高于原版注册表最大值时,也能正确识别已满级的附魔。
NoMaxEnchant 不是 MaxEnchantStar 的依赖项。 如果未安装 NoMaxEnchant,MaxEnchantStar 将简单地回退到本地注册表最大值。
Enchantments Normalizer
MaxEnchantStar 与 Enchantments Normalizer 兼容,后者会更改附魔等级的显示方式,例如将原始文本 enchantment.level.155 显示为 CLV(对应等级 155)。
MaxEnchantStar 会在最终的附魔文本中添加 ⭐,而不会替换等级格式化内容,因此这两个模组可以一起使用。
例如:
Sharpness CLV ⭐
NBT Editor
MaxEnchantStar 与 NBT Editor 兼容。
NBT Editor 可以在当前等级之后显示附魔的最高等级,例如:
Sharpness 7/7
MaxEnchantStar 会保留额外的 /7 信息,并且仅在当前等级达到有效最高等级时才添加 ⭐。
因此,这些模组可以组合使用,例如:
Sharpness VII/7 ⭐
配置
默认行为无需配置。
MaxEnchantStar 在可用时使用 NoMaxEnchant 提供的有效最高等级,否则使用本地注册表最大值。
许可证
Apache 2.0 Licence
MaxEnchantStar
Adds a ⭐ after an enchantment's name when that enchantment is at its effective maximum level.
The problem this solves
Vanilla tooltips show the enchantment name and level, but never whether that level is the max. On a maxed piece of gear, you still have to remember (or look up) each enchantment's cap. With mods that raise enchantment caps (e.g. NoMaxEnchant) or datapacks that add custom enchantments, the effective maximum canalso differ from what the client assumes or the client can simply be ignorant of the maximum level.
MaxEnchantStar appends a star to every enchantment line that is already at its effective maximum, so maxed enchants are visible at a glance.
Environment
Client-side only.
MaxEnchantStar does not need to be installed on the server. It reads the effective maximum enchantment levels provided by NoMaxEnchant when available.
Without NoMaxEnchant providing effective maximum levels, MaxEnchantStar falls back to the maximum level from the local enchantment registry.
The star is purely visual. It does not change anvil behaviour, enchanting table results, or any gameplay rule.
Known limitations
- Effective max source. Without a source of raised maximum levels, the client can only use the registry maximum. If another mod raises the anvil cap without changing the registry, the star stays on the vanilla maximum unless that mod also publishes its effective maximum levels using the protocol supported by MaxEnchantStar.
- Other tooltip rebuilders. Mods that fully replace enchantment tooltip text can still interfere. MaxEnchantStar uses a method wrap so it usually still sees their final text; if a mod never goes through
Enchantment.getName at all, the star will not appear for that path.
Mechanics
- Target:
Enchantment.getName(RegistryEntry, int), wrapped so the star is applied to whatever text was produced (vanilla or another mod's replacement).
- Condition: star is added when
level >= effectiveMax for that enchantment.
- Effective max resolution:
- If effective maximum levels have been provided by NoMaxEnchant, then use that value for the enchantment.
- Otherwise, fall back to
entry.value().getMaxLevel() from the local registry.
- Formatting: the star is appended as a separate styled fragment so existing colour / style on the name is preserved.
Compatibility
NoMaxEnchant
MaxEnchantStar works particularly well with NoMaxEnchant.
NoMaxEnchant provides MaxEnchantStar with the effective maximum enchantment levels used by the server. This allows MaxEnchantStar to correctly identify maxed enchantments even when their effective maximum is higher than the vanilla registry maximum.
NoMaxEnchant is not a dependency of MaxEnchantStar. If NoMaxEnchant is not installed, MaxEnchantStar simply falls back to the local registry maximum.
Enchantments Normalizer
MaxEnchantStar is compatible with Enchantments Normalizer, that changes how high enchantment levels are displayed, for example displaying CLV instead of the raw enchantment.level.155 text for level 155.
MaxEnchantStar adds the ⭐ to the resulting enchantment text without replacing the level formatting, so the two mods can be used together.
For example:
Sharpness CLV ⭐
NBT Editor
MaxEnchantStar is compatible with NBT Editor.
NBT Editor can display the enchantment's maximum level after the current level, for example:
Sharpness 7/7
MaxEnchantStar preserves the additional /7 information and only adds the ⭐ when the current level has reached the effective maximum.
These mods can therefore be combined, for example:
Sharpness VII/7 ⭐
Configuration
None required for the default behaviour.
MaxEnchantStar uses the effective maximum provided by NoMaxEnchant when available, otherwise it uses the local registry maximum.
Licence
Apache 2.0 Licence
评论 0
登录后参与评分
还没有评论,来抢沙发吧