A Fabric mod for Minecraft 26.1.X that centers the player inventory screen when the recipe book is open
Cloth Config - Not required, but allows enabling/disabling the mod via Mod Menu. Alternatively, just edit config/centered_inventory.json
- Centers the player inventory screen when the recipe book is visible.
- Preserves normal layout behavior when the recipe book is hidden or the window is too narrow.
- Applies the adjustment on the client side via a Fabric mixin.
- Open a terminal in the project root:
c:\repos\centered_inventory - Run the Fabric Gradle build:
./gradlew.bat build --console=plain
- If you only need to validate Java compilation, run:
./gradlew.bat compileJava --console=plain./gradlew.bat compileClientJava --console=plain
- Build the mod JAR using the Gradle
buildtask. - Copy the generated JAR from
build/libs/into your Fabricmods/folder. - Run Minecraft with Fabric Loader and Fabric API for
26.1.X.
This template is available under the CC0 license. Feel free to learn from it and incorporate it in your own projects.