Thanks to their work!
with the build versions of er2off used here
You will now be able to run Minecraft 1.20.2 on FreeBSD.
And Minecraft will be able to recognize multiple cpu cores!(for me, only 1.20.2 now, you maybe want Check the link above)
We will mostly be following the OpenBSD build instructions at https://prismlauncher.org/wiki/development/build-instructions/#openbsd.
sudo pkg install qt5 qt6 cmake kf5-extra-cmake-modules openjdk8 openjdk17 lwjgl glfw git
git clone --recursive https://github.com/PrismLauncher/PrismLauncher.git
and cd PrismLauncher
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/usr/local" -DCMAKE_PREFIX_PATH=/usr/local/lib/qt5/cmake -DENABLE_LTO=ON
cd build
and sudo make -j$(nproc) install
For FreeBSD 13.2+ or other version:
Before we get started, you might want to check this.
make install clean
If the build succeeds, you should be able to find the built files in the following path:
/usr/local/lib/lwjgl3
/usr/local/share/java/classes/lwjgl3
This should be correct for FreeBSD 13.2,
But if not, open minecraft-runtime
in a text editor, modify it:
LWJGL_JLP_OVRD
LWJGL_OVRD
LWJGL_OGL_OVRD
LWJGL_OAL_OVRD
LWJGL_GLFW_OVRD
LWJGL_STB_OVRD
LWJGL_JEM_OVRD
make install
step above this one.You need to add -Dorg.lwjgl.librarypath=/usr/local/lib/lwjgl
as a additional flag (Thanks to @er2off on Discord for this info.)