Create 光标锚点修复
修复 Linux(包括原生 Wayland)下 Create 值设置界面中的光标问题。
当你打开 Create 的值设置窗口(旋转速度控制器、创意电机,或任何使用 ValueSettingsScreen 的内容)时,Create 会将操作系统的光标“传送”到当前值上并读取它,以决定你选择了哪个值。但在 Linux 上这会失效:
- X11 / XWayland —— Minecraft 有时会向 Create 提供过时(stale)的光标坐标,导致保存错误的值。
- 原生 Wayland —— 合成器(compositor)禁止移动可见光标,因此光标传送无效,值会跳变到零/错误数值。
这个客户端模组修复了以上两种情况。
功能说明
- X11 / XWayland —— 向 Create 提供实时光标位置,确保保存的值始终与你的光标位置一致。
- 原生 Wayland —— 采用锚点/偏移模型,而非依赖被禁止的光标传送。当屏幕打开时,值高亮显示在当前的设置项上,并相对跟随你的鼠标移动,无需传送光标。在屏幕打开期间,系统光标会被隐藏,而高亮本身充当指针——从而避免了不可移动的箭头与高亮之间的不匹配(这也修复了使用光标锁定 GLFW 补丁如
glfw-wayland-minecraft-cursor 的配置)。
Power Grid 兼容性
Power Grid 的设置界面继承自 Create 的界面,并重写了保存逻辑以自行读取滑块/光标,因此基础修复无法作用于它们,它们仍会保存原始光标位置。本模组包含一个兼容层,对 Power Grid 的界面应用相同的修正,使其也能正确保存值。Power Grid 并非必需——如果未安装,兼容层会自动跳过。
要求
- Minecraft 1.21.1
- NeoForge 21.1.219+
- Create 6.0.9+(已在 6.0.10 上测试)
仅限客户端——服务器端不需要。
开源
干净-room 实现,MIT 许可证。源码、问题追踪及构建文件:
Create Cursor Anchor Fix
Fixes the cursor in Create's value settings screens on Linux — including native Wayland.
When you open a Create value settings window (Rotation Speed Controller, creative motors, anything
using ValueSettingsScreen), Create warps the OS cursor onto the current value and reads it back
to decide which value you picked. On Linux that breaks:
- X11 / XWayland — Minecraft sometimes hands Create stale cursor coordinates, so the wrong
value gets saved.
- Native Wayland — the compositor forbids moving a visible cursor, so the warp does nothing
and the value snaps to zero / a wrong number.
This client-side mod fixes both.
What it does
- X11 / XWayland — feeds Create the live cursor position, so the saved value always matches
where your cursor is.
- Native Wayland — uses an anchor/offset model instead of relying on the (forbidden)
cursor warp. The value highlight lands on the current setting when the screen opens and follows
your mouse relatively, with no cursor teleporting. While the screen is open the system cursor is
hidden and the highlight itself acts as the pointer — so there is no mismatch between an
un-movable arrow and the highlight (this also fixes setups using cursor-pinning GLFW patches like
glfw-wayland-minecraft-cursor).
Power Grid compatibility
Power Grid's settings screens subclass Create's screen and override the save logic to read the
slider/cursor on their own, so the base fix doesn't reach them and they'd still save the raw
cursor position. This mod includes a compatibility layer that applies the same correction to Power
Grid's screens, so values save correctly there too. Power Grid is not required — the compat
layer is skipped automatically when it isn't installed.
Requirements
- Minecraft 1.21.1
- NeoForge 21.1.219+
- Create 6.0.9+ (tested on 6.0.10)
Client-side only — not needed on the server.
Open source
Clean-room implementation, MIT licensed. Source, issues and builds:
评论 0
登录后参与评分
还没有评论,来抢沙发吧