Git Product home page Git Product logo

fix-lwjgl's Introduction

fix-lwjgl

Fix which LWJGL (Light Weight Java Game Library) version is used in Minecraft for ARM devices

pre-commit.ci status pre-commit code style: black Ruff

Description

This script is a wrapper for launching Minecraft on devices that aren't properly supported by Mojang, such as computers with ARM processors like the Raspberry Pi 3 and 4, as well as Apple's new M series chips. On these devices, the wrong version of LWJGL is downloaded, preventing minecraft from launching properly. This program takes the arguments that would have been used to run Minecraft and rewrites a few details about LWJGL, pointing minecraft to use a user-specified folder as the LWJGL library library path for the shared object files and in the case of LWJGL 3, changing the java class path information to use the correct files for your machine.

Basically, it means minecraft works now!

Testing

This program has been tested successfully with ATLauncher on a Raspberry Pi 4 running 64 bit Raspberry Pi OS bullseye. It should work for 32 bit Raspberry Pi OS bullseye, but I have not tested that yet.

Eagle3820 has successfully gotten this script working on an M3 Mac! Lolmc0587 has successfully gotten this script working on an Orange Pi 5 with Ubuntu!

This script might also work other platforms with arm processors, but may require minor changes.

If possible, if this script works on anything not listed as tested, please tell me using the discussions page!

Installation

Ensure Python 3 is installed on your computer, and use pip to install this project with the command listed below:

pip install git+https://github.com/CoolCat467/fix-lwjgl.git

Installation on MacOS

If you are using MacOS, you will probably have to install homebrew to install pipx (use the links given, not copying their install instructions here because they will get out of date).

After pipx is installed, you can use the following command to install:

pipx install git+https://github.com/CoolCat467/fix-lwjgl.git

About Installation

On default, all LWJGL files are expected to be in $HOME/.local/share/fix_lwjgl/lwjgl_{lwjgl_version}{system_arch}, so if the script was run on Raspberry Pi OS 32 bit, it would be lwjgl_3arm32. If this folder does not exist or files are missing (only checks in LWJGL 3 mode), the folder is created and all required files are downloaded from https://build.lwjgl.org/ (browse at https://www.lwjgl.org/browse) (see also can_download in configuration)

If this script needs the LWJGL 2 folder, it will download the folders in this repository. If this script needs any LWJGL 3 modules, it will download them from LWJGL's build repository available to browse at https://www.lwjgl.org/browse

Configuration

All configuration files should be located in ~/.config/fix_lwjgl/fix_lwjgl_config.ini. The current options as of writing include:

  • lwjgl_base_path - Controls where the lwjgl folders are expected to live at (defaults to $HOME/.local/share/fix_lwjgl)
  • can_download - If the wrapper is allowed to download files from the internet (defaults to True)
  • download_timeout - Timeout in seconds for downloading files from the internet (defaults to 15 seconds)

Usage

Go to your Minecraft launcher, and somewhere in settings is likely the ability to set a "wrapper command". Set it to fix_lwjgl_wrapper after you install the script and everything should be good.

On Raspberry Pi OS bullseye and some other platforms, it might be useful to have this "pre-launch" command if you are experiencing crashes:

export MESA_GL_VERSION_OVERRIDE=4.2COMPAT

This tells mesa gl to pretend it's OpenGL 4.2, which stops Minecraft from trying to do some things that might cause crashes.

You might also want to try changing it from 4.2COMPAT to 4.3 or 4.5, this is known to fix the "Could not initialize class com.mojang.blaze3d.systems.RenderSystem" issue

Problems

If you encounter any issues regarding this program, please check and see if anyone else is having the same issue before making a new issue. When posting your issue, be sure to include any relevant logs and what operating system you're using and what architecture your computer's processor uses.

Additionally, re-running Minecraft with the additional arguments

-Dorg.lwjgl.util.DebugLoader=true -Dorg.lwjgl.util.Debug=true

might help diagnose your issue. Just be sure to remove them after everything is fixed, because OpenGL errors cause crashes in debug mode instead of just being silently ignored.

fix-lwjgl's People

Contributors

coolcat467 avatar dependabot[bot] avatar pre-commit-ci[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

sephcasiah

fix-lwjgl's Issues

LWJGL and `Could not initialize class com.mojang.blaze3d.systems.RenderSystem`

Originally posted #29 by @Lolmc0587 and re-created as an issue

Defaulting to user installation because normal site-packages is not writeable
Collecting git+https://github.com/CoolCat467/fix-lwjgl.git
Cloning https://github.com/CoolCat467/fix-lwjgl.git to /tmp/pip-req-build-0dp_elgm
Running command git clone --filter=blob:none --quiet https://github.com/CoolCat467/fix-lwjgl.git /tmp/pip-req-build-0dp_elgm
Resolved https://github.com/CoolCat467/fix-lwjgl.git to commit 0622661
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: UNKNOWN
Building wheel for UNKNOWN (pyproject.toml) ... done
Created wheel for UNKNOWN: filename=UNKNOWN-0.0.0-py3-none-any.whl size=1793 sha256=11c1f2b1422a2a00762f74a53bc0d3c7170f897bf8cec28d634a8a0b9dd07f04
Stored in directory: /tmp/pip-ephem-wheel-cache-16g6_nzy/wheels/4f/4a/20/40e3de3311fe0daf2616bfa03058b9a4be607c10eaa19b3370
Successfully built UNKNOWN
Installing collected packages: UNKNOWN
Successfully installed UNKNOWN-0.0.0

Minecraft crash

Describe the bug
A clear and concise description of what the bug is.

Crash Log(s)
log_.txt

Screenshots
If applicable, add screenshots to help explain your problem.

System Info (please complete the following information):

  • OS: Linux
  • Architecture: arm64
  • Linux Flavor (if on Linux): ubuntu 24.04 LTS

Minecraft Info (please complete the following information):

  • Java Version: OpenJDK 21
  • Minecraft Version: 1.16.1
  • fix-lwjgl Version: Fix-LWJGL v1.3.1

Additional context
It crash in this version of minecraft

Not run minecraft

Describe the bug
It not run anything

Crash Log(s)
Its not crash, it just not start

log_.txt

Screenshots
If applicable, add screenshots to help explain your problem.

System Info (please complete the following information):

  • OS: Ubuntu 24.04 LTS
  • Architecture: arm64
  • Linux Flavor (if on Linux): Ubuntu

Minecraft Info (please complete the following information):

  • Java Version: OpenJDK 21
  • Minecraft Version: 1.20.6
  • fix-lwjgl Version: 1.3.1

Additional context
Add any other context about the problem here.

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.