Giter Club home page Giter Club logo

minecraft-freebsd's Introduction

Minecraft 1.20.2 on FreeBSD: Getting Started

This repository uses LWJG from #431.

If you are affected by #8, use this version of the repo instead of the normal one!

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)

Setting up Prism Launcher

We will mostly be following the OpenBSD build instructions at https://prismlauncher.org/wiki/development/build-instructions/#openbsd.

  1. Install Dependencies: sudo pkg install qt5 qt6 cmake kf5-extra-cmake-modules openjdk8 openjdk17 lwjgl glfw git
  2. Clone the repo: git clone --recursive https://github.com/PrismLauncher/PrismLauncher.git and cd PrismLauncher
  3. Configure environment: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/usr/local" -DCMAKE_PREFIX_PATH=/usr/local/lib/qt5/cmake -DENABLE_LTO=ON
  4. Actually build Prism Launcher: cd build and sudo make -j$(nproc) install

Building LWJGL3 and configuring script

For FreeBSD 13.2+ or other version:

Before we get started, you might want to check this.


  1. Download lwjgl3.tar.gz and extract it somewhere.

  2. Go to the folder you extracted, make install clean

  3. 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


Configuring Prism

  1. Go to Settings (either Global or Instance), then go in the Java section.
  2. Set Java Runtime/Tick and set Java Installation to the location of the minecraft-runtime script from the make install step above this one.
  3. Click Test, if you did everything correctly, it should say that the Test succeeded.

IMPORTANT: FOR PEOPLE RUNNING SNAPSHOTS OF 1.13 AND LOWER:

You need to add -Dorg.lwjgl.librarypath=/usr/local/lib/lwjgl as a additional flag (Thanks to @er2off on Discord for this info.)

Sources

minecraft-freebsd's People

Contributors

duckyondiscord avatar mtfbella109 avatar oblivcheck avatar pog5 avatar xarius86 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

minecraft-freebsd's Issues

make install doesn‘t work

I tried this guide Step by Step and after the cmake command, I go in the build directory, but if I there type the make command, I get the following Error:“make: make: don't know how to make install. Stop“

Fails to build on FreeBSD 14.0

[  0% 1/1] cd /home/justdie/Downloads/lwjgl3/work/lwjgl3-3.3.3 && /usr/local/bin/cmake -E env JAVACMD=/usr/local/openjdk17/bin/java JAVA8_HOME=/usr/local/openjdk8 ant all && /usr/local/bin/cmake -E env JAVACMD=/usr/local/openjdk17/bin/java JAVA8_HOME=/usr/local/openjdk8 ant release -Dbuild.offline=yes -Djavadoc.skip=yes
Buildfile: /home/justdie/Downloads/lwjgl3/work/lwjgl3-3.3.3/build.xml

init:

check-dependencies:

-compile-generator:

compile-templates:

generate:

compile:

compile-tests:

compile-native:

compile-native-platform:
 [Compiler] cc --version: "FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)"
 [Compiler] /home/justdie/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/tinyfd/src/main/c/tinyfiledialogs.c:3295:30: warning: call to undeclared function 'realpath'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 [Compiler]       lAllocatedCharString = realpath(lBuff,NULL); /*same as canonicalize_file_name*/
 [Compiler]                              ^
 [Compiler] /home/justdie/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/tinyfd/src/main/c/tinyfiledialogs.c:3295:28: error: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion]
 [Compiler]       lAllocatedCharString = realpath(lBuff,NULL); /*same as canonicalize_file_name*/
 [Compiler]                            ^ ~~~~~~~~~~~~~~~~~~~~
 [Compiler] 1 warning and 1 error generated.
FAILED: CMakeFiles/lwjgl3 /home/justdie/Downloads/lwjgl3/work/.build/CMakeFiles/lwjgl3 
cd /home/justdie/Downloads/lwjgl3/work/lwjgl3-3.3.3 && /usr/local/bin/cmake -E env JAVACMD=/usr/local/openjdk17/bin/java JAVA8_HOME=/usr/local/openjdk8 ant all && /usr/local/bin/cmake -E env JAVACMD=/usr/local/openjdk17/bin/java JAVA8_HOME=/usr/local/openjdk8 ant release -Dbuild.offline=yes -Djavadoc.skip=yes
ninja: build stopped: subcommand failed.
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /home/justdie/Downloads/lwjgl3```

1.20.2

I have created a fork.

New status of #421

The game will be able to recognize multiple CPU cores, but currently, this is limited to version 1.20.2.

Which minecraft-runtime?

In this section of the README you tell us to select the minecraft-runtime file. Are you talking about the one in the LWGL source code folder or was it copied somewhere else while installing? Can I copy the file to any directory I want or does it depend on something else in that folder? Please clarify the README a bit

Compiling LWGL3 stuck

Compiling LWGL3 doesn't work. Every time I run it it gets stuck at the same place, I always have to press Ctrl+C to stop compilation:

lenni@thinkpad:~/Downloads/lwjgl3 $ sudo make install clean 
Password:
Sorry, try again.
Password:
===>  Building for lwjgl3-3.3.3
[  0% 1/1] cd /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3 && /usr/local/bin/cmake -E env JAVACMD=/usr/local/openjdk17/bin/java JAVA8_HOME=/usr/local/openjdk8 ant all && /usr/local/bin/cmake -E env JAVACMD=/usr/local/openjdk17/bin/java JAVA8_HOME=/usr/local/openjdk8 ant release -Dbuild.offline=yes -Djavadoc.skip=yes
Buildfile: /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/build.xml

init:

check-dependencies:

-compile-generator:

compile-templates:
[Templates] Compiling Kotlin templates. This will take 1-2 minutes...
  [kotlinc] Compiling [/home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/core/src/templates/kotlin/core/jni, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/core/src/templates/kotlin/core/libc, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/core/src/templates/kotlin/core/libffi, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/core/src/templates/kotlin/core/linux, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/core/src/templates/kotlin/core/freebsd, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/core/src/templates/kotlin/core/macos, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/core/src/templates/kotlin/core/templates, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/core/src/templates/kotlin/core/windows, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/core/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/harfbuzz/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/zstd/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/lz4/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/nfd/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/openxr/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/egl/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/par/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/glfw/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/tootle/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/odbc/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/remotery/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/nuklear/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/hwloc/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/openvr/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/opengles/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/opengl/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/bgfx/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/opus/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/fmod/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/yoga/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/xxhash/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/ktx/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/shaderc/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/stb/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/llvm/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/sse/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/opencl/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/vma/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/nanovg/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/jawt/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/lmdb/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/spvc/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/rpmalloc/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/openal/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/libdivide/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/assimp/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/cuda/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/freetype/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/meow/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/vulkan/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/meshoptimizer/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/tinyexr/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/tinyfd/src/templates/kotlin, /home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/modules/lwjgl/jemalloc/src/templates/kotlin] => [/home/lenni/Downloads/lwjgl3/work/lwjgl3-3.3.3/bin/classes/templates]
  [kotlinc] info: kotlinc-jvm 1.9.0 (JRE 17.0.9+9-1)
^Cninja: build stopped: interrupted by user.
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

lenni@thinkpad:~/Downloads/lwjgl3 $ 

Game fails to start

On my FreeBSD 13.2 system, following these instructions results in Minecraft failing to start, with the following error in the log.

---- Minecraft Crash Report ----
// Oops.
Time: 2023-09-30 12:36:22
Description: Initializing game
java.lang.NoSuchMethodError: 'void org.lwjgl.glfw.GLFWNativeGLX.setPath(org.lwjgl.system.FunctionProvider)'
	at com.mojang.blaze3d.platform.GLX._initGlfw(SourceFile:64)
	at com.mojang.blaze3d.systems.RenderSystem.initBackendSystem(SourceFile:847)
	at eqv.<init>(SourceFile:491)
	at net.minecraft.client.main.Main.main(SourceFile:214)
	at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:88)
	at org.prismlauncher.EntryPoint.listen(EntryPoint.java:126)
	at org.prismlauncher.EntryPoint.main(EntryPoint.java:71)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Thread: Render thread
Stacktrace:
	at com.mojang.blaze3d.platform.GLX._initGlfw(SourceFile:64)
	at com.mojang.blaze3d.systems.RenderSystem.initBackendSystem(SourceFile:847)
	at eqv.<init>(SourceFile:491)
-- Initialization --
Details:
	Modules: 
Stacktrace:
	at net.minecraft.client.main.Main.main(SourceFile:214)
	at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:88)
	at org.prismlauncher.EntryPoint.listen(EntryPoint.java:126)
	at org.prismlauncher.EntryPoint.main(EntryPoint.java:71)

Crash on any lwjgl3 Minecraft version (I'm using the new games/lwgjl3 pkg)

---- Minecraft Crash Report ----
// Oops.

Time: 2024-04-25 15:49:26
Description: Initializing game

java.lang.ExceptionInInitializerError
at org.lwjgl.glfw.GLFW.nglfwGetError(GLFW.java:1267)
at org.lwjgl.glfw.GLFW.glfwGetError(GLFW.java:1296)
at ehn.a(SourceFile:141)
at com.mojang.blaze3d.platform.GLX._initGlfw(SourceFile:59)
at com.mojang.blaze3d.systems.RenderSystem.initBackendSystem(SourceFile:847)
at enn.(SourceFile:483)
at net.minecraft.client.main.Main.main(SourceFile:211)
at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:100)
at org.prismlauncher.EntryPoint.listen(EntryPoint.java:129)
at org.prismlauncher.EntryPoint.main(EntryPoint.java:70)
Caused by: java.lang.NullPointerException: A required function is missing: glfwGetPreeditCursorRectangle
at org.lwjgl.system.APIUtil.requiredFunctionMissing(APIUtil.java:147)
at org.lwjgl.system.APIUtil.apiGetFunctionAddress(APIUtil.java:141)
at org.lwjgl.glfw.GLFW$Functions.(GLFW.java:123)
... 10 more

A detailed walkthrough of the error, its code path and all known details is as follows:

-- Head --
Thread: Render thread
Stacktrace:
at org.lwjgl.glfw.GLFW.nglfwGetError(GLFW.java:1267)
at org.lwjgl.glfw.GLFW.glfwGetError(GLFW.java:1296)
at ehn.a(SourceFile:141)
at com.mojang.blaze3d.platform.GLX._initGlfw(SourceFile:59)
at com.mojang.blaze3d.systems.RenderSystem.initBackendSystem(SourceFile:847)
at enn.(SourceFile:483)

-- Initialization --
Details:
Modules:
Stacktrace:
at net.minecraft.client.main.Main.main(SourceFile:211)
at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:100)
at org.prismlauncher.EntryPoint.listen(EntryPoint.java:129)
at org.prismlauncher.EntryPoint.main(EntryPoint.java:70)

-- System Details --
Details:
Minecraft Version: 1.20
Minecraft Version ID: 1.20
Operating System: FreeBSD (amd64) version 14.0-RELEASE
Java Version: 17.0.10, OpenJDK BSD Porting Team
Java VM Version: OpenJDK 64-Bit Server VM (mixed mode, sharing), OpenJDK BSD Porting Team
Memory: 351954096 bytes (335 MiB) / 536870912 bytes (512 MiB) up to 4294967296 bytes (4096 MiB)
CPUs: 4
Processor Vendor: GenuineIntel
Processor Name: Intel(R) Core(TM) i5-4300M CPU @ 2.60GHz
Identifier: Intel64 Family 6 Model 60 Stepping 3
Microarchitecture: Haswell (Client)
Frequency (GHz): 2.59
Number of physical packages: 1
Number of physical CPUs: 1
Number of logical CPUs: 1
Graphics card #0 name: 4th Gen Core Processor Integrated Graphics Controller
Graphics card #0 vendor: Intel Corporation (Intel Corporation)
Graphics card #0 VRAM (MB): 0.00
Graphics card #0 deviceId: unknown
Graphics card #0 versionInfo: rev=0x06
Virtual memory max (MB): 32606.87
Virtual memory used (MB): 10200.32
Swap memory total (MB): 16384.00
Swap memory used (MB): 0.00
JVM Flags: 2 total; -Xms512m -Xmx4096m
Launched Version: 1.20
Backend library: LWJGL version 3.3.4-snapshot+SNAPSHOT
Backend API: Unknown
Window size:
GL Caps: Using framebuffer using OpenGL 3.2
GL debug messages:
Using VBOs: Yes
Is Modded: Probably not. Client jar signature and brand is untouched
Type: Client (map_client.txt)
CPU:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.