HUDNotification 模块

基本信息

net.glease.tc4tweak.modules.hudNotif.HUDNotification —— 把 HUD 通知接到 TabbyChat 的聊天扩展点上。

init() 的可选加载

Class.forName("acs.tabbychat.api.TCExtensionManager", false, ClientProxy.class.getClassLoader());
TCExtensionManager.INSTANCE.registerExtension(TabbyChatIntegration.class);

用 Class.forName(name, **false**, loader) —— initialize = false, 即只检查类存在不初始化。未装 TabbyChat 时跳过注册。

⚠️ 第三方 mod 依赖未在 @Mod 声明

TabbyChat(包 acs.tabbychat)不是 @Mod(dependencies=...) 里声明的依赖 (那里只有 required-after:Thaumcraft)。 这里是「软集成」:Class.forName 探测 + 存在才注册。 与 BiblioRCEFix 指向 Bibliocraft 同属 未声明的第三方耦合,但此处有显式存在性检查,因此不会崩。

TabbyChatIntegration

方法 行 说明
mouseClicked(int x, int y, int button) 51 源码注释:TabbyChat 不把点击转给非 ChatButton 子类的按钮,这里自己接线
actionPerformed(GuiButton) 71
handleMouseInput() 80
load() 85

内部类 implements IChatMouseExtension(TabbyChat API)。

相关条目

源码

  • src/main/java/net/glease/tc4tweak/modules/hudNotif/HUDNotification.java