Apothic 类别兼容

Apothic 类别兼容

为Cataclysm、Twilight Forest、Epic Fight、Forbidden Arcanus、Traveloptics、Lands of Icaria等添加Apotheosis战利品类别兼容。

冒险

Apothic 类别兼容

一个小型服务端模组,适用于 Forge 和 NeoForge,为那些未设置或设置错误的武器和盔甲模组填充 Apotheosis 战利品类别分配。在 Forge 上,它通过 Apotheosis 的 IMC 覆盖 API 发送类别;在 NeoForge 1.21.1 上,它通过 Apotheosis 数据映射添加类别。

版本

1.20.1 和 1.19.2(Forge):通用攻击速度和伤害规则,加上按模组划分的模块,通过 IMC 发送。1.19.2 的模组列表较短。 1.21.1(NeoForge):数据映射。Apotheosis 8.x 自身对大多数装备进行分类,并合并了其类别(一个近战武器类别,采矿工具使用 breaker),因此此构建填补了 Apotheosis 留下的空白。

功能(Forge)

Apotheosis 使用战利品类别来决定物品可以随机到哪些词缀和宝石插槽。许多模组武器要么没有类别,要么类别错误,因此词缀永远不会出现在它们上面。它在加载时发送正确的类别。

通用规则按攻击速度将近战武器分为 sword 或 heavy_weapon(1.0 或更慢视为 heavy,或 10.0+ 伤害提升为 heavy)。弓、弩、三叉戟、镐、锹、盾牌和盔甲来自原版类层次结构。属性是实时读取的,因此如果模组在运行时更改它们,仍然有效。读取还会回退到堆叠级属性,因此 Epic Fight 风格的武器(Weapons of Miracles 巨斧)也会被捕获。

第二遍在模组加载后运行,以捕获属性在延迟初始化期间确定的武器。

Apotheosis 硬编码了一些默认值,这些默认值优先于此处设置的类别(minecraft:iron_sword 作为 sword,minecraft:shulker_shell 作为 none)。

按模组模块

将这些模组中的物品路由到正确的类别(sword、heavy weapon、bow、crossbow、trident、shield、none,以及存在 Fallen Gems & Affixes 时的 staffs 或 sword):L'Ender's Cataclysm、Twilight Forest、Epic Fight(base、Nightfall、Resurrection)、Weapons of Miracles、Tetra、Marium's Soulslike Weaponry、Meet Your Fight、Dungeons and Combat、Alex's Caves、Alex's Mobs、Aquamirae、Born in Chaos、Forbidden and Arcanus、Traveloptics、Celestisynth、The Undergarden。

1.19.2 覆盖的列表较短,包含 Epic Samurai 而不是一些仅限 1.20.1 的模组。

由通用规则处理

这些模组扩展了正确的原版类或带有真实的攻击属性:Simply Swords、Integrated Simply Swords、Spartan Weaponry、Spartan Shields、Epic Knights、Samurai Dynasty、Dread Steel、Iron's Spellbooks、Mowzie's Mobs、Bosses of Mass Destruction、Deeper and Darker、Knight Quest、Enigmatic Legacy、Malum、RPG Style More Weapons、Cataclysm 自身的近战武器和盾牌,以及任何其他具有原版类武器或攻击伤害属性的物品,加上盔甲。

分类设置

apothic_category_compat-common.toml 中有两个开关。编辑并重启以应用。

name_based_heavy_override(自 v2.1.0 起默认开启):包含重型武器名称(greatsword、claymore、zweihander、warhammer、halberd、glaive、battleaxe、lance、scythe 等)的 id 会归入 heavy_weapon,以 "sword" 结尾的 id 会归入 sword。现有配置保留其先前的值,因此请将其设置为 true 或删除配置以采用新的默认值。 weapon_pickaxes_as_heavy(默认开启):Cataclysm Void Forge 和 Infernal Forge、Forbidden and Arcanus 各等级的 blacksmith gavels,以及 Twilight Forest Cube of Annihilation 会归入 heavy_weapon。禁用后会将它们归类为 pickaxe。

配置

配置文件位于 config/apothic_category_compat-common.toml。在 v2.1.0 或更高版本首次启动时,它会从旧的 apothic_compat-common.toml 迁移过来,因此你的设置会保留。按物品和按标签覆盖:

[item_overrides] "ruins:greatsword" = "heavy_weapon"

[tag_overrides] "simplyswords:greathammers" = "heavy_weapon"

有效类别:sword、heavy_weapon、trident、bow、crossbow、shield、helmet、chestplate、leggings、boots、pickaxe、shovel、none。将物品设置为 none 可以阻止其随机到任何词缀。其他模组注册的类别(例如来自 Fallen Gems & Affixes 的 staffs)也被接受。

1.21.1 NeoForge(Apotheosis 8.x)

通过位于 data/apotheosis/data_maps/item/loot_category_overrides.json 的 NeoForge 数据映射进行覆盖。

将这些模组中的物品路由到正确的类别(远程武器归入 bow,双叉戟归入 trident,法杖和镰刀归入 Apothic Compats 的 staff 和 scythe 类别,后两者仅在同时加载 Apothic Compats 和 Malum 时生效):L'Ender's Cataclysm、Alex's Caves、Alex's Mobs、Born in Chaos、The Undergarden、Twilight Forest、Lands of Icaria、Iron's Spellbooks、Ice and Fire、Ice and Fire Spellbooks、Forbidden and Arcanus、Mahoutsukai、Deeper Darker、the Aether 和 Traveloptics。

双用途镐(Cataclysm 锻造台和 Forbidden Arcanus blacksmith gavels)通过 #apothic_category_compat:weapon_pickaxes 物品标签归入近战武器。weapon_pickaxes_as_melee 配置开关(默认开启)通过数据映射条件控制此行为;将其设置为 false 以让它们保持为 breaker。从你自己的数据包扩展该标签以覆盖更多内容。

词缀黑名单

阻止特定词缀随机到新生成的装备上。在 affix_blacklist 数组中列出词缀 id:

affix_blacklist = ["apotheosis:sword/attribute/vampiric", "apotheosis:heavy_weapon/attribute/berserking"]

词缀 id 与 JSON 文件路径匹配,例如 data/apotheosis/affixes/sword/attribute/vampiric.json 对应 apotheosis:sword/attribute/vampiric。在 1.21.1 上,路径顺序改为 attribute//,因此同一词缀在那里是 apotheosis:attribute/sword/vampiric。

仅阻止未来的随机;已经带有黑名单词缀的物品会保留它。在服务器启动、数据包重载和 /acc reload 时重新应用。

重载命令

/apothiccategorycompat reload 或 /acc reload(op 等级 2)在 Forge 上重新读取配置并重新应用。在 1.21.1 上它会重新读取词缀黑名单;数据映射遵循常规数据包 /reload。

要求

1.20.1:Forge 47.x、Apotheosis 7.4.x。 1.19.2:Forge 43.x、Apotheosis 6.5.x。 1.21.1:NeoForge 21.1.x、Apotheosis 8.5 或更高版本。

在客户端和服务器上都安装,以便在 Forge 上正确显示词缀属性和宝石插槽加成。在 1.21.1 上,数据映射和词缀黑名单在服务端运行,Apotheosis 会将类别同步到客户端。

许可证

MIT