IMEInputBackport
将现代(26.1+ 风格)的 CJK 输入法支持移植到 Minecraft 1.7.10 Forge —— 包括行内预编辑文本、跟随光标的候选窗口,以及在组合输入期间合理的按键处理。在聊天中像 2026 年一样输入中文/日文/韩文。
功能说明
原版 1.7.10 早于完善的 IME 集成:在聊天中输入 CJK 文本意味着盲打到一个漂浮在角落的系统窗口中(或在全屏模式下完全无法使用)。此模组直接将操作系统输入法挂钩到游戏中:
- 行内组合输入 — 预编辑字符串直接在聊天、告示牌、书与笔以及铁砧文本字段的光标处渲染。
- 候选窗口 — 可以是位于光标旁边的 OS/IME 原生窗口,也可以是模组绘制的叠加层,可通过资源包进行完全主题化。
- 组合输入期间的正确按键语义 — 字母键不会双重写入文本字段,
Escape取消组合输入而不是关闭屏幕,而在非组合状态下所有内容均原样通过。
平台支持
| 平台 | 后端 | 备注 |
|---|---|---|
| Windows x64 / x86 / arm64 | TSF,回退至 IMM32 | 兼容 MS-Pinyin、搜狗、Rime (weasel)、Microsoft IME 等 |
| Linux x64 | IBus 和 Fcitx5(均为 D-Bus,X11 / XWayland) | AUTO 根据 IME 环境变量(XMODIFIERS、GTK_IM_MODULE 等)选择一个作为主用,另一个作为回退;两个桥接器都打包在同一个 .so 文件中 |
| Linux arm64 | — | 不支持 |
| macOS | — | 不支持 |
原生库已捆绑在 jar 文件内,并在运行时提取——无需手动设置。Linux 后端通过 dlopen 在运行时绑定 libdbus-1.so.3,因此除了正常的 IBus 或 Fcitx5 设置外,无需安装额外包。
Fcitx5 兼容性说明:
- 需要 fcitx5 ≥ 5.1.5(
InputContext1D-Bus 协议)。旧版 fcitx5 和经典 fcitx 4 不受支持。 - 模组通过会话总线直接与 fcitx5 通信——它不依赖于桌面的 IME 框架切换,因此可以并排安装 IBus 和 Fcitx5;无论哪个守护进程正在运行,均可访问。
- 新创建的输入上下文以英文直输模式开始(fcitx5 的每上下文激活状态)。在聚焦文本字段后按下一次激活热键(默认为
Ctrl+Space);此后 fcitx5 会记住每个应用程序的状态。 - 已验证引擎:Rime (fcitx5-rime)。任何正常消耗
ProcessKeyEvent的引擎均可工作(例如通过 fcitx5-chinese-addons 提供的拼音等)。
依赖项
CatFrame 用于覆盖系统和键盘事件的硬性前置要求。
UniMixins 用于 Mixin 需求。
Forge 1.7.10-1614 + Java 8
配置文件 (config/imeinput.cfg)
| 键 | 默认值 | 含义 |
|---|---|---|
general.backend |
AUTO |
AUTO 匹配平台(Windows: TSF → IMM32 回退;Linux: IBus)。TSF / IMM32 强制使用 Windows 后端,IBUS 强制在 Linux 上使用 IBus。其他平台的值降级为 AUTO。 |
general.candidateNativeBar |
true |
true = OS/IME 绘制其自己的候选窗口;false = 隐藏它并让模组自行绘制候选框(堆叠在预编辑框下方,可主题化)。需要重启游戏。 |
模组绘制的所有内容的外观由 assets/imeinput/ime_theme.json 控制,任何资源包均可覆盖——请参阅 Themes.md。
对于开发者,提供了本文档 (API) 以供集成。
许可证
注意:JNI 实现见 此处
IMEInputBackport
Backports modern (26.1+-style) CJK input method support to Minecraft 1.7.10 Forge — inline pre-edit text, a candidate window that follows the caret, and sane key handling while composing. Type Chinese/Japanese/Korean in chat like it's 2026.
What it does
Vanilla 1.7.10 predates proper IME integration: composing CJK text in chat means typing blind into a system window floating in a corner (or nothing at all in fullscreen). This mod hooks the OS input method directly into the game:
- Inline composition — the pre-edit string renders right at the text caret inside chat, sign, book and anvil text fields.
- Candidate window — either the OS/IME native one positioned next to the caret, or a mod-drawn overlay that is fully themeable via resource packs.
- Correct key semantics while composing — letter keys don't leak into the text field twice,
Escapecancels the composition instead of closing the screen, and everything passes through untouched when you're not composing.
Platform support
| Platform | Backend | Notes |
|---|---|---|
| Windows x64 / x86 / arm64 | TSF, falls back to IMM32 | works with MS-Pinyin, Sogou, Rime (weasel), Microsoft IME, … |
| Linux x64 | IBus and Fcitx5 (both D-Bus, X11 / XWayland) | AUTO picks one by the IME environment variables (XMODIFIERS, GTK_IM_MODULE, …) with the other as fallback; both bridges ship in the same .so |
| Linux arm64 | — | not supported |
| macOS | — | not supported |
The native libraries are bundled inside the jar and extracted at runtime — no manual setup. The Linux backends bind libdbus-1.so.3 at runtime via dlopen, so there is no extra package to install beyond a working IBus or Fcitx5 setup.
Fcitx5 compatibility notes:
- Requires fcitx5 ≥ 5.1.5 (the
InputContext1D-Bus protocol). Older fcitx5 and classic fcitx 4 are not supported. - The mod talks to fcitx5 directly over the session bus — it does not depend on the desktop's IME framework switch, so IBus and Fcitx5 can be installed side by side; whichever daemon is running is reachable.
- A freshly created input context starts in English direct mode (fcitx5's per-context activation state). Press your activate hotkey (default
Ctrl+Space) once after focusing a text field; fcitx5 remembers the state per application afterwards. - Engines verified: Rime (fcitx5-rime). Any engine that consumes
ProcessKeyEventnormally (pinyin via fcitx5-chinese-addons, etc.) works.
Requirements
CatFrame for the hard prerequisites for the overlay system and the keyboard event.
UniMixins for the mixin requirements.
Forge 1.7.10-1614 + Java 8
Configuration (config/imeinput.cfg)
| Key | Default | Meaning |
|---|---|---|
general.backend |
AUTO |
AUTO matches the platform (Windows: TSF → IMM32 fallback; Linux: IBus). TSF / IMM32 force a Windows backend, IBUS forces IBus on Linux. Values for the other platform degrade to AUTO. |
general.candidateNativeBar |
true |
true = the OS/IME draws its own candidate window; false = hide it and let the mod self-draw the candidate box (stacked under the pre-edit box, themeable). Needs a game restart. |
The look of everything the mod draws is controlled by assets/imeinput/ime_theme.json, overridable by any resource pack — see Themes.md.
For Developers, this doc (API) is provided to integrate with it.
License
Note: JNI implement see here
下载 IMEInputBackport
下载 IMEInputBackport
下载 IMEInputBackport
下载 IMEInputBackport
下载 IMEInputBackport
下载 IMEInputBackport
下载 IMEInputBackport
暂无更新日志
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
缓冲的原始输入和线程化的事件轮询
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
原版世界生成优化模组
评论 0
登录后参与评分
还没有评论,来抢沙发吧