Skip to content

Mouse Lock

Toggle mouse locking to assist you with repetitive tasks where you need to go in a straight line, such as farming, planting crops when already aligned to an angle

FabricNeoForgeForge
Loaders
FabricNeoForgeForge
Downloads on Modrinth
307
Followers on Modrinth
0
versions
28
Updated
November 7, 2026Nov 7
Published
in 2026
Locking your view angle — So you can farm something in a straight line · swipe

At a glance

Runs on Fabric, NeoForge and Forge
For Minecraft 1.20.6–1.21.1, 1.21.3–26.3 …
Client only — no need to install it on the server
Latest version — 1.0.0 from November 7, 2026
Requires Fabric API and Forge Config API Port
License MIT — free
Where it's needed
In gamerequiredOn servernot needed

Install in the game only; not needed on the server

Game versions1.20.4, 1.20.6–1.21.1, 1.21.3–26.3 …

Mouse Lock

This mod adds one single useful feature - locking your player's head rotation, blocking mouse movement inputs when told so.
This is often used for low-interaction repetitive tasks where you need to go in a straight line, having set up the right angle in advance. The main expected usecase is different forms of farming or planting crops, but you can come up with new ways.

Breaking crops with a fixed angle

Using the Feature

To turn the feature on or off, you can use a keybind or a command.

With a Keybind

First of all, set a keybind of your choosing (not set by default), and then just press it when you need to lock your angle:

Keybind

With a Command

You can use /mouselock to lock or unlock the angle. It mostly exists for cases where you would need to trigger it with an another mod.

Toggle Command

Config/Settings

You can configrure the mod with /mouselock settings command or by finding the mod in the mod list and clicking the settings button.

"Mouse Locked" text overlay lets you change:

  • It's size and position
  • Whether it should lift up when hearts are visible
  • Whether mouse lock should reset when leaving or changing worlds.

Config

Usage on servers

The mod just does the same thing as if you didn't move your mouse, which is quite possible, so it's should generally not cause issues, but, of course, it's your responsibility to be aware of a server's rules.

Versions

The mod supports a lot of different versions. Most are backported, and such don't get active support - only the up-to date version does.

One more useful note is that the developer is not actively checking github issues (since they can't send notifications in any way), so those may get ignored even for months. Maybe there will be a discord server later to contact the dev easier.

You can still suggest useful changes or ideas for new features though (maybe for a separate mod), even on the issue tracker.
Hope this mod helps someone :D

FAQ

How to install Mouse Lock?

Install Fabric for your Minecraft version, download Mouse Lock for the same version and loader, put the file into the mods folder and launch the game with the loader profile.

Which Minecraft versions does Mouse Lock support?

Mouse Lock has builds for Minecraft 1.20.1–1.20.2, 1.20.4, 1.20.6–1.21.1, 1.21.3–26.3.

Is Mouse Lock needed on the server?

Client only — no need to install it on the server

License and source
MIT Licensefree to use and share with credit to the author
Original — Modrinth↗Files unchanged, verified with SHA-512Is this your mod? For rights holders

The site uses cookies: the necessary ones for sign-in and the theme, plus the Yandex Metrica and LiveInternet visit counters — they show us how the site is used. We have no advertising cookies. More