Special
基本信息
| 属性 | 值 |
|---|---|
| 本地化名 | key.special=Special(en_US.lang) |
| 分类 | key.categories.battlegear=Battlegear(en_US.lang) |
| 注册位置 | BattlegearClientTickHandeler 私有构造函数(BattlegearClientTickHandeler.java:42-43) |
| 默认按键 | Keyboard.KEY_NONE(未绑定) |
| 触发 | TickEvent.ClientTickEvent,phase == START(BattlegearClientTickHandeler.java:48-53) |
功能
本模组只注册了这一个键位。
special 键在 BattlegearClientTickHandeler 的单例构造函数中创建并通过 ClientRegistry.registerKeyBinding 注册,是全仓库唯一的 registerKeyBinding 调用点:
special = new KeyBinding(I18n.format("key.special"), Keyboard.KEY_NONE, "key.categories.battlegear");
ClientRegistry.registerKeyBinding(special);
(BattlegearClientTickHandeler.java:42-43)
数值
| 数值 | 值 | 来源 |
|---|---|---|
| 键位判定前置条件 | mc.thePlayer != null && mc.theWorld != null && mc.currentScreen == null |
BattlegearClientTickHandeler.java:50 |
| 触发冷却 | battlegear2$getSpecialActionTimer() == 0 |
BattlegearClientTickHandeler.java:54 |
| 盾牌分支的冷却 | 设为 IShield.getBashTimer(offhand)(常量 10 tick) |
BattlegearClientTickHandeler.java:73-74、ItemShield.java:175-177 |
| 箭袋分支的冷却 | 设为 2 tick | BattlegearClientTickHandeler.java:61 |
| 边沿触发 | !specialDone && special.getIsKeyPressed();松开时 specialDone 复位 |
BattlegearClientTickHandeler.java:53, 81-83 |
交互
按下时按优先级分两条路径(BattlegearClientTickHandeler.java:55-79):
| 优先级 | 条件 | 行为 |
|---|---|---|
| 1 | QuiverArrowRegistry.getArrowContainer(player) 非空(手持/佩戴箭袋) |
发送 BattlegearAnimationPacket(EnumBGAnimations.SpecialAction),冷却 2 tick(BattlegearClientTickHandeler.java:57-61) |
| 2 | 否则副手为 IShield 且体力条 blockBar >= shieldBashPenalty |
发送同样的 SpecialAction 动画包,冷却 getBashTimer(10 tick),并扣除体力 0.33F - 0.06F × bashWeight 等级(BattlegearClientTickHandeler.java:62-78) |
| — | 都不满足 | 仍置 specialDone = true,不发送任何包(BattlegearClientTickHandeler.java:80) |
服务端收到后由 SpecialActionPacket 处理:副手持盾则执行盾击(击退 + 距离 < 2 格时的 thorns 伤害),否则切换箭袋选中槽(SpecialActionPacket.java:42-75)。
合成配方
不适用。
相关条目
- 盾牌 - 盾击路径的载体
- Quiver - 箭袋切换路径的载体
- Backhand 集成 - 副手判定依赖 Backhand API
未注册的键位
en_US.lang 中另有 3 条 key.* 本地化字符串,但没有任何对应的 KeyBinding 注册:
| 字符串 | 检索结果 |
|---|---|
key.battleInv=Battle Inventory |
无 KeyBinding 引用 |
key.drawWeapons=Draw Weapons |
无 KeyBinding 引用 |
key.openSigilEditor=Open Sigil Editor |
无 KeyBinding 引用 |
可复现验证:
grep -rn 'KeyBinding\|registerKeyBinding' --include='*.java' src/
命中结果仅有 BattlegearClientTickHandeler.java:6(import)、:31(字段)、:42(构造)、:43(registerKeyBinding)、:107(keyBindUseItem,原版键,非本模组注册)。
此外,Battlegear.java:72 调用的 proxy.registerKeyHandelers() 在 CommonProxy.java:14 是空方法,且 ClientProxy 并未覆写它 —— 键位注册完全由 BattlegearClientTickHandeler.INSTANCE 的静态初始化完成。这 3 条字符串属上游 Battlegear2 的遗留本地化,不构成本模组的键位内容。