Native Wayland input-method support for Minecraft Forge on LWJGL 3. The
project consists of a reproducible patched GLFW build, a JNI bridge for
zwp_text_input_v3, and a client-only Forge mod.
- Minecraft/Forge: 1.16.5/36.2.35, 1.18.2/40.3.7, 1.20.1/47.4.22 and 1.21.1/52.1.16
- GLFW: the upstream
3.4and3.5.1tags - Runtime: Linux Wayland, glibc, x86_64,
text-input-v3 - Input methods: compositor-mediated Fcitx5 and IBus
LWJGL 2, X11/XWayland, musl, ARM, Fabric and NeoForge are intentionally not supported in the first release.
System dependencies are CMake, Ninja, a C compiler, pkg-config,
wayland-client, wayland-protocols, wayland-scanner, xkbcommon and the
usual GLFW OpenGL/EGL dependencies. JDK 21 is needed for JNI and mod builds.
The checked-in Gradle Wrapper pins the build-tool version, so a system Gradle
installation is not required. Gradle selects an installed JDK 21 toolchain and
passes its location to CMake; JAVA_HOME does not need to be set.
Build and test all four Forge artifacts:
./gradlew chiseledTest chiseledBuildThe remapped jars are collected under build/libs/0.1.0/forge/.
Build the user-selected patched GLFW:
tools/build-dist --glfw 3.4 --arch x86_64The command refuses unverified GLFW versions, checks the upstream commit,
applies the corresponding patch, builds a Wayland-only shared library and JNI
bridge, and places release artifacts under dist/.
To use the result, install the Forge jar for the matching Minecraft version and configure the launcher JVM argument:
-Dorg.lwjgl.glfw.libname=/absolute/path/to/libglfw.so.3
For PrismLauncher this is the instance's Settings → Java → Java arguments.
Do not use org.lwjgl.librarypath; LWJGL's GLFW-specific property is required.
The mod intentionally fails client startup when the process is not native
Wayland, the patched GLFW cannot expose its Wayland handles, the JNI bridge
cannot load, or the compositor does not advertise zwp_text_input_manager_v3.
Dedicated servers never load the native bridge.
Run tools/diagnose /absolute/path/to/libglfw.so.3 before reporting a setup
problem. Full instructions are in docs/install.md; see
docs/architecture.md for the protocol and threading
model and docs/integration.md for custom text editors.
Project-owned code is MIT licensed. GLFW remains under its zlib/libpng license. Generated Wayland protocol sources retain the license in the upstream protocol XML.