hexdump0815 / imagebuilder

velvet os - simple script framework to build ubuntu 22.04 lts jammy (in older versions also 20.04 lts focal) and debian 12 bookworm (in older versions also 11 bullseye) bootable usb / sd card images for some arm and intel devices - lots of prebuilt images as well
GNU General Public License v3.0
300 stars 44 forks source link

ℹ️ [GUIDE]: Getting Minecraft Java on arm64 #213

Open thenameisluk opened 3 months ago

thenameisluk commented 3 months ago

Version 1.16.5

Note. this only works (well) on devices with gpu support/drivers

  1. Compile install gl4es(only required for mali gpu's) git clone https://github.com/ptitSeb/gl4es.git cd gl4es mkdir build cd build cmake .. -DODROID=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo make -j8 sudo make install Note. U can also use /scripts/install-gl4es.sh provided with the image but it doesn't seam to work currently Sidenote. multiline codeblocks break number lists on github, so i used single line ones ^
  2. Export gl4es libGL.so export LD_LIBRARY_PATH=/usr/lib/gl4es/
  3. Install minecraft arm64 Install arm64 JRE from apt or anywhere else. Personally hallo1 recommends using the dragonwell JDK 67 for a free 20% performance boost and 30% less memory usage. Install minecraft. You can use any launcher that supports ARM64 version of Minecraft. I am using HMCL 71 that is confirmed working.
  4. Install mods (optional) The vanilla Minecraft works but performance is very poor(~30fps unstable) Use the 1.16.5 version and install these mods:
    • fabric
    • fabric api 0.42.0
    • sodium 0.2.0
    • reese’s sodium options 1.4.7 Note. these versions is confirmed working but you can use others as well. Important: Change some settings Launch your game and turn off the “Use compact vertex format” option in the video settings, or the game will crash when entering any world.
  5. Enjoy Minecraft! obraz _Confirmed to work on chromebook lenovo 10e (debian trixie)_ Credits for this part : hallo1

    Latest Version (1.20.6)

    Note: this only work on devices with opengl 3.3+ support (so no mali gpu for now)

  6. Install Java 21
    • sudo apt install openjdk-21-jdk (assuming u r on debian trixie or sid) or
    • get dragonwell JDK 67
  7. Install launcher download and install .deb file from link on 4th line of this file similar to this one https://github.com/Pi-Apps-Coders/files/releases/download/large-files/GDLauncher-linux-arm64-1.1.30-setup.deb Note. why? in case there is a new version This version of launcher has special meta repo needed to work on arm
  8. Set the Java path inside launcher settings obraz put path to ur java 21 in java 17 section (if u used apt method it should be /usr/lib/jvm/java-21-openjdk-arm64/bin/java) Note. why? because newer versions of minecraft run on java 21
  9. Enjoy Minecraft! obraz _Confirmed to work on chromebook lenovo IdeaPad Duet 5 (debian trixie)_

Note. in theory we can use software renderer to run versions of mc on any system but the performance would be very poor

Sidenote. in theory it is possible to run minecraft bedrock edition on devices with gpu support/drivers (opengl 3.1 and even lower so yes mali) with this project but the comunity was unable to help me with that. So ig that's for me to figure out

PS. for the powerful gaming devices which chromebooks definitely are :3 have a fun time playing ~luk

edit: update on minecraft bedrock edition it requires ipv6 to be enabled which is currently disabled by default for images https://github.com/hexdump0815/linux-mainline-and-mali-generic-stable-kernel/issues/13#issuecomment-2143056876 so if someone really wants to play it, it for now requires to build kelner from source and modify kelner cmdline to not disable ipv6 after that just use an appimage or apt repo

linsyking commented 1 month ago

Why using gl4es instead of using the default mesa gl library?

thenameisluk commented 1 month ago

@linsyking for adreno gpu's it's not required (and can be skipped) since these r very well supported but for mali gpu's it won't work without gl4es