One Enough Enchantment
本模组允许你动态控制附魔的权重,甚至完全从游戏中移除附魔。
权重控制
有关原版附魔权重机制的详细信息,请参阅:
简而言之,权重决定了附魔出现的频率。在原版 Minecraft 中,权重由四种固定的稀有度控制:COMMON(权重 10)、UNCOMMON(5)、RARE(2)和 VERY_RARE(1)。
1.21 版本之后,附魔变为数据驱动,权重可以被修改,但这仍然不够方便。
本模组提供了在游戏内动态控制附魔权重的方法,并允许将权重设置为 0 以完全移除某个附魔。
在配置文件中,你可以在 "rules" 字段中输入格式化的规则来控制刷新权重。例如,输入 ["minecraft:knockback=100", "minecraft:sharpness=0"] 将会:
- 大幅增加击退(Knockback)附魔出现的概率。
- 完全从游戏中移除锋利(Sharpness)附魔。
- 其他附魔不受影响,使用其默认权重。
该模组还集成了 KubeJS 事件以实现动态权重修改,可以结合游戏阶段或其他设置使用。
OEEEvent.modifyWeight(event => {
event.getWeight("minecraft:sharpness");
event.setWeight("minecraft:knockback", 0);
});
移除附魔
默认情况下,本模组将权重设置为 0 的附魔不会以任何形式出现在游戏中。
以下配置选项默认启用。如果你希望保留某些功能,可以选择性地禁用它们。
配置选项 dropRecipe:
- 对于权重为 0 的附魔,相关的合成配方(如铁砧配方)将被移除。这意味着对应的附魔书无法使用,但可以通过指令施加附魔。
- 在 JEI 中,相应的配方(如铁砧配方)将无法查询。
配置选项 deepDelete:
- 对于权重为 0 的附魔,即使你通过指令强制给物品附魔,也无法解析附魔数据(尽管 NBT 数据会被保留)。通过将权重调回原值即可恢复。
- 在 JEI 或创造模式物品栏中,对应的附魔书将被移除,且完全无法查询。
其他
- 理论上,此模组仅安装在服务端即可。
- 使用
/oee all 命令查看关于所有附魔的信息,包括附魔 ID、本地化名称和权重。
- 如果你移除了许多 COMMON 稀有度的附魔,低等级的附魔台可能不会显示任何附魔。这是由于原版机制导致的,并非本模组的 Bug。
One Enough Enchantment
This mod allows you to dynamically control the weight of enchantments or even completely remove enchantments from the game.
Weight Control
For the vanilla enchantment weight mechanics, refer to:
In short, weight determines the frequency of enchantment appearance. In vanilla Minecraft, weight is controlled by four fixed rarities: COMMON (weight 10), UNCOMMON (5), RARE (2), and VERY_RARE (1).
After version 1.21, enchantments became data-driven, and weights can be modified, but this is still not convenient enough.
This mod provides an in-game method to dynamically control enchantment weights and allows setting the weight to 0 to completely remove an enchantment.
In the configuration file, you can input formatted rules in the "rules" field to control the refresh weight. For example, entering ["minecraft:knockback=100", "minecraft:sharpness=0"] will:
- Greatly increase the probability of the Knockback enchantment appearing.
- Completely remove the Sharpness enchantment from the game.
- Other enchantments remain unaffected and use their default weights.
The mod also integrates with KubeJS events for dynamic weight modification, which can be combined with game stages or other settings.
OEEEvent.modifyWeight(event => {
event.getWeight("minecraft:sharpness");
event.setWeight("minecraft:knockback", 0);
});
Removing Enchantments
By default, enchantments with weight set to 0 by this mod will not appear in the game in any form.
The following configuration options are enabled by default. You can disable them selectively if you want to retain some functionality.
Configuration option dropRecipe:
- For enchantments with weight 0, associated recipes (such as anvil recipes) are removed. This means the corresponding enchanted books cannot be used, but enchantments can still be applied via commands.
- In JEI, the corresponding recipes (e.g., anvil recipes) will not be queryable.
Configuration option deepDelete:
- For enchantments with weight 0, even if you force-enchant an item via commands, the enchantment data cannot be parsed (though the NBT is preserved). It can be restored by adjusting the weight back.
- In JEI or the creative inventory, the corresponding enchanted books are removed and cannot be queried at all.
Other
- Theoretically, this mod can be installed only on the server side.
- Use the
/oee all command to view information about all enchantments, including enchantment ID, localized name, and weight.
- If you remove many COMMON-rarity enchantments, the enchantment table at low levels might not show any enchantments. This is due to the vanilla mechanism and is not a bug in this mod.
评论 0
登录后参与评分
还没有评论,来抢沙发吧