CurseForge · Minecraft mod
CursorCentered Fix
A Minecraft mod that fixes the cursor centering issue that occasionally happens when opening a GUI.
Quick answer
Which CursorCentered Fix release matches 1.20.6?
CursorCentered Fix 1.4.0 targets 1.20.5, 1.20.6, 1.21 with NeoForge. It must be installed on the client. Do not install it on the dedicated server. No extra mods listed for this file.
Where it goes
Is CursorCentered Fix required on the client, server, or both?
It must be installed on the client. Do not install it on the dedicated server.
This file is marked client-only.
What else does CursorCentered Fix 1.4.0 need?
1.4.0 on 1.20.6. Every mod below is checked against that same setup.
This file does not list any required mods. Do not add a library just because a different file uses it.
This file does not list any required or optional mods.
Before you install it
Add CursorCentered Fix without breaking your instance.
Built for CursorCentered Fix 1.4.0 on 1.20.6. Pick another file and the loader, install side or required mods may change.
- 01
Stick to this file
Use 1.4.0. It targets 1.20.5, 1.20.6, 1.21 with NeoForge; another release may have different loader, side or dependency requirements.
- 02
Bring the mods it needs
This file does not list any required mods. Do not add a library just because a different file uses it.
- 03
Put it on the correct side
It must be installed on the client. Do not install it on the dedicated server.
- 04
Pick the file you checked
Use the “Get this file” button beside 1.4.0. It opens that exact file at the source.
About this project
What does CursorCentered Fix add?
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.
Vanilla has shipped to SDL backend after 26.3 which completely resolved the cursor centering issues, so this mod will not be update to versions above 26.2.
For Wayland Users
This mod supports centering the cursor on wayland using ydotool or wdotool, to enable this feature, you need to configure them properly, here are the basic setup steps:
ydotool
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. This tool is only effective with XWayland.
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
wdotool
wdotool is another great option of the feature which was released recently and is being actively developed. It is much easier to configure and you can directly head to their github page for a detailed configuration guide. (Note that you need to run sudo install -m 755 target/release/wdotool /usr/local/bin/wdotool additionally if building from source)
Once configured, you can use this tool as the backend of the mod by specifying the JVM argument -DuseWdotool=<backend>, where <backend> is based on your compositor.
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.
Known Issue
A real Wayland (not XWayland) window cannot get its absolute position on screen, therefore the calculated central point is only correct if the position of the game window is (0,0).
Project description from CurseForge.
Pick your setup
CursorCentered Fix by Minecraft version and loader
Choose the version and loader you play, then open the matching release.
26.1.2
2 loader builds26.1.1
2 loader builds26.1
2 loader builds1.21.11-snapshot
2 loader builds1.21.11
2 loader builds1.21.10
2 loader builds1.21.9-snapshot
2 loader builds1.21.9
2 loader builds1.21.8
2 loader builds1.21.7
2 loader builds1.21.6-snapshot
2 loader buildsShowing the newest 12 of 66 game versions. Older files are in the list below.
Check the dependencies, then try the file in a copied instance before changing a world you care about.
Recent files
CursorCentered Fix versions and loaders
1.4.0
cursorcenteredfix-1.4.0-neoforge-1.20.5+.jar
17 Aug 2026
1.4.0
cursorcenteredfix-1.4.0-fabric+1.14.4-1.21.11.jar
17 Aug 2026
cursorcenteredfix-1.3.0-neoforge-1.20.5+.jar
12 Jul 2026
cursorcenteredfix-1.3.0-fabric+1.14.4-1.21.11.jar
12 Jul 2026
cursorcenteredfix-1.2.1-neoforge.jar
2 Oct 2025
cursorcenteredfix-1.2.1-fabric.jar
2 Oct 2025
cursorcenteredfix-1.2.jar
24 Apr 2025
cursorcenteredfix-1.2.jar
24 Apr 2025
cursorcenteredfix-1.2-beta.jar
22 Nov 2024
cursorcenteredfix-1.2-alpha.jar
21 Nov 2024
cursorcenteredfix-1.1.jar
20 Nov 2024
cursorcenteredfix-1.0.jar
26 Sept 2024
Looking for an older file? The official CurseForge project page is in Resources.