Mineuniverse
Log in Register
Mods

CursorCentered Fix

A Minecraft mod that fix the cursor centering issue that occasionally happens when opening a GUI.
by LitnhJacuzzi
Download Claim this project
334,928 downloads
0 likes
Updated Jun 30, 2026
0 hypes

This mod fixes the cursor centering issue that occasionally happens when opening a GUI, e.g. open a container GUI but the cursor doesn't appear from the center which could be dangerous when you need to pull something from a chest or inventory rapidly.

For Wayland Users

This mod supports centering the cursor on wayland using ydotool (an automation tool on wayland), to enable this feature, you need to configure this tool properly, here are the basic setup steps:

1. Install ydotool from source

The latest version of ydotool provides seamless centering experience, however it can only be built and installed from source at the moment (the mod was using an outdated ydotool previously).

To build an install it, just execute these commands in terminal under any directory:

//install command may vary on different platforms
sudo apt install git cmake scdoc

git clone https://github.com/ReimuNotMoe/ydotool.git
cd ydotool
mkdir build
cd build
cmake ..
make -j "$(nproc)"
sudo make install

Running ydotoold -V to verify your installation.

2. Add your user to sudo exceptions

The only way to successfully center the cursor using ydotool in Minecraft is running ydotool command with sudo privilege. Thus you need to make your user be able to run ydotool command with sudo without password: edit /etc/sudoers, add two lines:

<yourusername> ALL=(ALL) NOPASSWD:<ydotoold_path> //default path: /usr/local/bin/ydotoold
<yourusername> ALL=(ALL) NOPASSWD:<ydotool_path> //default path: /usr/local/bin/ydotool

3. Specify a move scaling value (Optional)

There is an internal problem of moving cursor on wayland programmatically - the actual moved position may be affected by some system values depending on your desktop environment. In other words, the default centering position is guaranteed correct only with default mouse sensitivity and mouse acceleration disabled (also requires default UI scale in some desktop environments). Fortunately, the requested position and actual position seem to always satisfy a liner function relationship, so we can use a double factor to correct it.

To determine this value, run the game with this mod and open any container GUI, the mod will center the cursor using default scaling value (1.0), then keep your cursor at that position and take out your ruler, put it on your monitor to measure its absolute position, record x or y as x1 or y1. Next, keep the position of your game window and determine the actual central point, also measure its absolute position with your ruler, record x or y as x2 or y2, then the scaling value should be x2 / x1 or y2 / y1. Note that the game window is better to be small (1/2 screen width/height is ok) and close to top-left to ensure the cursor will not go outside the screen, or its position is not reliable (be constrained to screen border). This step can also be done by taking screenshots and measuring the position using a painting software that displays pixel coordinates, which is more accurate. You can round the value if necessary.

After determining the scaling value, you can restart the game with a JVM argument -DcursorMoveScalingValue=<value> to apply it, this value should be always correct util you change the system mouse sensitivity/acceleration or UI scaling value.

cursorcenteredfix-1.2.1-fabric.jar
MC Client, Fabric, 26.1, 26.1.1, 26.1.2
Release 2026-04-08 Get
cursorcenteredfix-1.2.1-fabric.jar
MC 1.16.3, 1.16-Snapshot, 1.17.1, 1.21.2-Snapshot, 1.21, 1.21.6-snapshot, 1.15-Snapshot, 1.16.1, 1.18.1, 1.20.2-Snapshot, 1.20.5-Snapshot, 1.15, 1.16, 1.19-Snapshot, Client
Release 2025-10-02 Get
cursorcenteredfix-1.2.1-neoforge.jar
MC 1.21.2-Snapshot, 1.21, 1.21.6-snapshot, Client, 1.21.1-Snapshot, 1.21.8, 1.20.5, 1.21.5, 1.21.4, 1.21.5-Snapshot, 1.20.6, 1.21.1, 1.21.6, 1.21.3, 1.21.7, 1.21-Snapshot, NeoForge
Release 2025-10-02 Get
cursorcenteredfix-1.2.jar
MC Client, 1.16.5, Forge
Release 2025-04-24 Get
cursorcenteredfix-1.2.jar
MC 1.16-Snapshot, 1.17.1, 1.16.3, 1.19.3, 1.20.2, 1.21.2-Snapshot, 1.21, 1.21.6-snapshot, 1.15-Snapshot, 1.16.1, 1.18.1, 1.19.4-Snapshot, 1.20.5, 1.21.5, 1.14.4, 1.17, 1.20.2-Snapshot
Release 2025-04-24 Get
cursorcenteredfix-1.2.jar
MC 1.21.2-Snapshot, 1.21, 1.21.6-snapshot, 1.20.5, 1.21.5, 1.20.5-Snapshot, 1.21.8, Client, 1.21.1-Snapshot, 1.21.4, 1.21.5-Snapshot, NeoForge, 1.20.6, 1.21-Snapshot, 1.21.3, 1.21.7
Release 2025-04-24 Get
cursorcenteredfix-1.2.jar
MC 1.17.1, 1.19.3, 1.20.2, 1.18.1, 1.19.4-Snapshot, 1.17, 1.20.2-Snapshot, 1.19.4, 1.19-Snapshot, Client, 1.18.2, 1.19.2, 1.20.3-Snapshot, 1.20.3, 1.20.1, Forge, 1.20, 1.19.1, 1.20.4
Release 2025-04-24 Get
cursorcenteredfix-1.2-beta.jar
MC 1.16-Snapshot, 1.17.1, 1.16.3, 1.19.3, 1.20.2, 1.21.2-Snapshot, 1.21, 1.15-Snapshot, 1.16.1, 1.18.1, 1.19.4-Snapshot, 1.20.5, 1.14.4, 1.17, 1.20.2-Snapshot, 1.20.5-Snapshot, 1.15
Beta 2024-11-22 Get
cursorcenteredfix-1.2-alpha.jar
MC 1.16-Snapshot, 1.17.1, 1.16.3, 1.19.3, 1.20.2, 1.21.2-Snapshot, 1.21, 1.15-Snapshot, 1.16.1, 1.18.1, 1.19.4-Snapshot, 1.20.5, 1.14.4, 1.17, 1.20.2-Snapshot, 1.20.5-Snapshot, 1.15
Alpha 2024-11-21 Get
cursorcenteredfix-1.1.jar
MC 1.16-Snapshot, 1.17.1, 1.16.3, 1.19.3, 1.20.2, 1.21.2-Snapshot, 1.21, 1.15-Snapshot, 1.16.1, 1.18.1, 1.19.4-Snapshot, 1.20.5, 1.14.4, 1.17, 1.20.2-Snapshot, 1.20.5-Snapshot, 1.15
Release 2024-11-20 Get
cursorcenteredfix-1.0.1.jar
MC 1.17.1, 1.19.3, 1.20.2, 1.21.2-Snapshot, 1.21, 1.18.1, 1.19.4-Snapshot, 1.20.5, 1.17, 1.20.2-Snapshot, 1.20.5-Snapshot, 1.19.4, Fabric, 1.19-Snapshot, Client, 1.21.1-Snapshot
Release 2024-09-26 Get
cursorcenteredfix-1.0.jar
MC 1.20.2, Client, NeoForge, 1.20.3, 1.20.4
Release 2024-09-26 Get
cursorcenteredfix-1.0.jar
MC 1.21, 1.20.5, Client, NeoForge, 1.20.6, 1.21.1
Release 2024-09-26 Get
cursorcenteredfix-1.0.jar
MC 1.17.1, 1.19.3, 1.20.2, 1.21.2-Snapshot, 1.21, 1.18.1, 1.19.4-Snapshot, 1.20.5, 1.17, 1.20.2-Snapshot, 1.20.5-Snapshot, 1.19.4, Fabric, 1.19-Snapshot, Client, 1.21.1-Snapshot
Release 2024-06-14 Get

More from LitnhJacuzzi

TradeHacker
5,284
Unlimited MaxHealth
4,586
CrosshairTarget Filter
342
Elytra Toggle
223

You Might Also Like

Liberty's Villagers
Quality of Life and AI improvements for Villagers
9,968,428
No More Pop-ups
A Minecraft mod to remove in-game pop-ups
996,708
BetterRandomSourceConcurrencyCrash
Improved logging of crashes caused by mods accessing RandomSources from the wrong thread
99,371
Exit Confirmation
Often accidentally closed Minecraft? This mod might help!
99,067
NoDynamicFps
Adds an option to disable Vanilla's Dynamic FPS implementation
99,004
Immersive Crafting
Adds crafting recipes to immersive portals
9,998