Backhand

[!INFO] Git Commit: e794e2e | Updated: 2026-09-28

1.7.10 的副手(offhand)实现,modid 为 backhand。把原版 1.9 才有的副手系统完整回移植到 1.7.10, 并对外提供 xonin.backhand.api.core 供下游模组接入。

[!IMPORTANT] 定位:本体,不是 Battlegear2 的附属 本仓库是 Backhand 本体 + API 提供方。方向已实测确认: battlegear2(battlegear2-for-backhand) 在其 dependencies.gradle 中写有 api('com.github.GTNewHorizons:Backhand:1.8.8:dev'), 并 import xonin.backhand.api.core.BackhandUtils / IOffhandInventory。 反向看,本仓库只在 runtimeOnlyNonPublishable 里拉 Battlegear2, 且带 exclude module: "Backhand"——即为了避免自依赖而排除。 所以 Backhand 是上游,battlegear2 才是附属。

[!NOTE] 分类名 ≠ modid 下游那个仓库的 wiki 分类名是 battlegear2-for-backhand(relation.md), 但它的实际 modid 是 battlegear2。 引用时用分类名链接,不要拿 modid 当分类名。 本仓库自身分类名与 modid 均为 backhand。

依赖关系(实测 dependencies.gradle)

依赖 作用域 说明
GTNHLib api 唯一硬依赖(required-after:gtnhlib@[0.6.34,)),提供配置系统
TinkersConstruct / Thaumcraft / IC2 / Draconic Evolution / Galacticraft / Et-Futurum-Requiem / inventory-tweaks / Minecraft-Backpack-Mod / Baubles-Expanded / IndustrialCraft-2 compileOnly 仅为 late mixin 与 compat 提供编译期类型
WirelessCraftingTerminal compileOnly 注释写明「pulls in ae2 for the mixin dep」
Battlegear2-for-Backhand runtimeOnlyNonPublishable 仅开发运行时,且排除 Backhand
Curse 上的 TFC / TFC+ / Bibliocraft / Extra Utilities / Witchery compileOnly (deobfCurse) curse.maven 坐标

除 GTNHLib 外没有任何 mod 进入 FML 依赖串——第三方适配全部由 mixin 按目标是否存在动态开关,见 TargetedMod。

结构特征

72 个 Java 文件中 42 个是 mixin,分 early(原版类,21+6)与 late(第三方 mod,15)两组, 由 BackhandLoadingPlugin 在 coremod 阶段控制。 真正的业务代码只有 28 个文件。

配置项默认值一律读自 @Config.Default* 注解, 见 BackhandConfig 与 BackhandConfigClient。

源码:/Users/evlos/a/mirror/Backhand/ 关系登记:见 data/relation.md(全局 Wiki 分类映射表)

核心

API(对外)

Coremod

Mixin 清单

  • Mixins - early / late 两组 mixin 的类名清单
  • TargetedMod - late mixin 的目标 mod 枚举(11 项)

Mixin(early)

Mixin(late)

兼容层

客户端

网络包

配置

钩子