Create 光标修复
适用于 Minecraft 1.21.1 的小型客户端 NeoForge 模组,用于修复 Create 值设置界面中过时(stale)的光标坐标问题。
此问题出现在任何属于 ValueSettingsScreen 实例的 GUI 中,包括旋转速度控制器和创意电机。
除非有人要求,否则我不打算支持其他版本,但移植起来相当简单,因此你可以自行移植或请求特定版本。
依赖项
- Minecraft 1.21.1
- NeoForge 21.1.219 或更高版本
- Create 6.0.9 或更高版本
修复内容
Create 的值设置 UI 从 Minecraft 正常的屏幕渲染路径接收鼠标坐标。在某些 Linux 环境下,当 Create 以编程方式移动光标后,这些坐标可能会变得过时。
本模组通过修补 Create 的值设置界面,使其在渲染和保存面板时直接读取当前的 GLFW 光标位置。
Wayland 支持
未明确支持 Wayland。
当光标重新定位已经有效时,本模组可以解决坐标过时的问题。这通常意味着使用 X11 或 Xwayland,但我未能可靠地证明它在 X11 之外能修复任何问题。作为一名新手模组开发者,敬请谅解。
原生 Wayland 似乎有时会在更早的阶段失败。GLFW 仅在光标被禁用时才支持 Wayland 下的 glfwSetCursorPos。Minecraft GUI 界面通常使用可见且启用的光标,因此 Wayland 合成器可能会拒绝 Create 首先尝试移动光标的操作。
在这种情况下,没有已移动的光标位置供本模组读取:
Create 要求 GLFW 移动/对齐光标
Wayland 合成器拒绝或忽略该光标移动
可见光标从未移动到保存的设置位置
本模组无法从 GLFW 推断出预期的光标位置
如果在打开 Create 面板时光标没有明显移动到保存的值,那么该环境可能超出了本模组的支持范围。
Create Cursor Fix
Small client-side NeoForge mod for Minecraft 1.21.1 that fixes stale cursor
coordinates in Create value settings screens.
This issue shows up in any gui that is an instance of ValueSettingsScreen including Rotation Speed Controllers and Creative motors.
I do not intend to support other versions unless asked, but its pretty easy to port, so feel free to do so or request a particular version.
Requirements
- Minecraft 1.21.1
- NeoForge 21.1.219 or newer
- Create 6.0.9 or newer
What It Fixes
Create's value settings UI receives mouse coordinates from Minecraft's normal
screen rendering path. On some Linux setups, those coordinates can be stale
after Create programmatically moves the cursor.
This mod patches Create's value settings screen to read the current GLFW cursor
position directly when rendering and saving the panel.
Wayland Support
Wayland is not explicitly supported.
This mod can fix the stale-coordinate case when cursor repositioning already
works. That usually means x11 or xwayland, but I haven't been able to reliably prove this fixes anything outside of x11. Im a new modder, apologies.
Native Wayland seems to sometimes fail earlier than that. GLFW only supports
glfwSetCursorPos on Wayland while the cursor is disabled. Minecraft GUI
screens normally use a visible, enabled cursor, so a Wayland compositor may
refuse Create's attempt to move the cursor in the first place.
In that case there is no moved cursor position for this mod to read:
Create asks GLFW to move/snap the cursor
The Wayland compositor refuses or ignores that cursor move
The visible cursor never moves to the saved setting
This mod cannot infer the intended cursor position from GLFW
If the cursor does not visibly move to the saved value when opening the Create
panel, that setup is probably outside this mod's support boundary.
评论 0
登录后参与评分
还没有评论,来抢沙发吧