Compare commits

...

6 Commits

Author SHA1 Message Date
2bd6c3506b
fix macos type 2024-03-31 18:09:46 +03:00
30e5926396
bump macos version to 1.20.4 2024-03-31 18:09:12 +03:00
779f02aaec
bump windows to 1.20.4 2024-03-31 18:05:19 +03:00
219cae9a82
version parser 2024-03-31 17:57:49 +03:00
9b2fdfda39
remove failed libs 2024-03-31 17:47:56 +03:00
1c7541eb76
bump linux version to 1.20.4 2024-03-31 17:22:24 +03:00
9 changed files with 176 additions and 137 deletions

View File

@ -6,6 +6,9 @@
- - Information
- ♻️ - Edited
## 31/03/2024 - (1.20.4 Update) **beta**
- - Linux client updated to 1.20.4 version
## 03/12/2023 - (1.20.2 Update) **beta**
- - Linux client updated to 1.20.2 version

View File

@ -14,9 +14,7 @@
# 🏁 Releases 🏁
[Latest release `1.20.1`](https://git.a2s.su/iiiypuk/minecraft-launcher/releases/tag/1.20.1)
See other releases [this](RELEASES.md).
[Latest release `1.20.1`](https://git.a2s.su/iiiypuk/minecraft-launcher/releases/tag/1.20.1). See other releases [this](RELEASES.md).
**Vanilla:**

View File

@ -1,4 +1,5 @@
# TODO
- [ ] assets downloader
- [x] assets downloader
- [x] library parser
- [ ] library downloader

1
utils/version-parser/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.json

30
utils/version-parser/parser.py Executable file
View File

@ -0,0 +1,30 @@
#!/usr/bin/env python3
import sys
import json
TYPE = 'linux'
# TYPE='windows'
# TYPE='osx'
if __name__ == '__main__':
if len(sys.argv) < 2:
print('add file')
exit(-1)
else:
version_file = sys.argv[1]
with open(version_file, 'r') as f:
a = json.loads(f.read())
print('Game ID: {0}'.format(a['id']))
print('Main class: {0}'.format(a['mainClass']))
print('Assets index: {0}'.format(a['assetIndex']['id']))
for library in a['libraries']:
if 'rules' in library:
if 'os' in library['rules'][0]:
if TYPE == library['rules'][0]['os']['name']:
print(library['downloads']['artifact']['path'])
else:
print(library['downloads']['artifact']['path'])

View File

@ -0,0 +1,3 @@
[tool.black]
skip-string-normalization = true
line-length = 100

View File

@ -30,7 +30,7 @@ GAME_DIR=$MC_DIR/userdata
# Libraries and resource dir (requires no changes)
ASSETS_DIR=$MC_DIR/assets
ASSETS_INDEX=5
ASSETS_INDEX=12
# Version minecraft (from versions/ dir)
GAME_VERSION=1.20.4
@ -61,6 +61,8 @@ $MC_DIR/libraries/io/netty/netty-common/4.1.97.Final/netty-common-4.1.97.Final.j
$MC_DIR/libraries/io/netty/netty-handler/4.1.97.Final/netty-handler-4.1.97.Final.jar:\
$MC_DIR/libraries/io/netty/netty-resolver/4.1.97.Final/netty-resolver-4.1.97.Final.jar:\
$MC_DIR/libraries/io/netty/netty-transport-classes-epoll/4.1.97.Final/netty-transport-classes-epoll-4.1.97.Final.jar:\
$MC_DIR/libraries/io/netty/netty-transport-native-epoll/4.1.97.Final/netty-transport-native-epoll-4.1.97.Final-linux-aarch_64.jar:\
$MC_DIR/libraries/io/netty/netty-transport-native-epoll/4.1.97.Final/netty-transport-native-epoll-4.1.97.Final-linux-x86_64.jar:\
$MC_DIR/libraries/io/netty/netty-transport-native-unix-common/4.1.97.Final/netty-transport-native-unix-common-4.1.97.Final.jar:\
$MC_DIR/libraries/io/netty/netty-transport/4.1.97.Final/netty-transport-4.1.97.Final.jar:\
$MC_DIR/libraries/it/unimi/dsi/fastutil/8.5.12/fastutil-8.5.12.jar:\
@ -76,33 +78,19 @@ $MC_DIR/libraries/org/apache/logging/log4j/log4j-core/2.19.0/log4j-core-2.19.0.j
$MC_DIR/libraries/org/apache/logging/log4j/log4j-slf4j2-impl/2.19.0/log4j-slf4j2-impl-2.19.0.jar:\
$MC_DIR/libraries/org/joml/joml/1.10.5/joml-1.10.5.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-glfw/3.3.2/lwjgl-glfw-3.3.2.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-glfw/3.3.2/lwjgl-glfw-3.3.2-natives-windows.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-glfw/3.3.2/lwjgl-glfw-3.3.2-natives-windows-arm64.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-glfw/3.3.2/lwjgl-glfw-3.3.2-natives-windows-x86.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-glfw/3.3.2/lwjgl-glfw-3.3.2-natives-linux.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-jemalloc/3.3.2/lwjgl-jemalloc-3.3.2.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-jemalloc/3.3.2/lwjgl-jemalloc-3.3.2-natives-windows.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-jemalloc/3.3.2/lwjgl-jemalloc-3.3.2-natives-windows-arm64.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-jemalloc/3.3.2/lwjgl-jemalloc-3.3.2-natives-windows-x86.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-jemalloc/3.3.2/lwjgl-jemalloc-3.3.2-natives-linux.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-openal/3.3.2/lwjgl-openal-3.3.2.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-openal/3.3.2/lwjgl-openal-3.3.2-natives-windows.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-openal/3.3.2/lwjgl-openal-3.3.2-natives-windows-arm64.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-openal/3.3.2/lwjgl-openal-3.3.2-natives-windows-x86.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-openal/3.3.2/lwjgl-openal-3.3.2-natives-linux.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-opengl/3.3.2/lwjgl-opengl-3.3.2.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-opengl/3.3.2/lwjgl-opengl-3.3.2-natives-windows.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-opengl/3.3.2/lwjgl-opengl-3.3.2-natives-windows-arm64.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-opengl/3.3.2/lwjgl-opengl-3.3.2-natives-windows-x86.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-opengl/3.3.2/lwjgl-opengl-3.3.2-natives-linux.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-stb/3.3.2/lwjgl-stb-3.3.2.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-stb/3.3.2/lwjgl-stb-3.3.2-natives-windows.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-stb/3.3.2/lwjgl-stb-3.3.2-natives-windows-arm64.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-stb/3.3.2/lwjgl-stb-3.3.2-natives-windows-x86.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-stb/3.3.2/lwjgl-stb-3.3.2-natives-linux.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-tinyfd/3.3.2/lwjgl-tinyfd-3.3.2.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-tinyfd/3.3.2/lwjgl-tinyfd-3.3.2-natives-windows.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-tinyfd/3.3.2/lwjgl-tinyfd-3.3.2-natives-windows-arm64.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-tinyfd/3.3.2/lwjgl-tinyfd-3.3.2-natives-windows-x86.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-tinyfd/3.3.2/lwjgl-tinyfd-3.3.2-natives-linux.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl/3.3.2/lwjgl-3.3.2.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl/3.3.2/lwjgl-3.3.2-natives-windows.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl/3.3.2/lwjgl-3.3.2-natives-windows-arm64.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl/3.3.2/lwjgl-3.3.2-natives-windows-x86.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl/3.3.2/lwjgl-3.3.2-natives-linux.jar:\
$MC_DIR/libraries/org/slf4j/slf4j-api/2.0.7/slf4j-api-2.0.7.jar:\
$MC_DIR/versions/$GAME_VERSION/$GAME_VERSION.jar"

View File

@ -17,75 +17,78 @@ MC_DIR=$HOME/.minecraft
# Are stored here...
# saves/, resourcepacks/ and screenshots/ dirs
# and options.txt and servers.dat files
GAME_DIR=$MC_DIR
GAME_DIR=$MC_DIR/userdata
# Libraries and resource dir (requires no changes)
ASSETS_DIR=$MC_DIR/assets
ASSETS_INDEX=5
ASSETS_INDEX=12
# Version minecraft (from versions/ dir)
GAME_VERSION=1.20.1
GAME_VERSION=1.20.4
# Get archive from natives/ dir
NATIVES_DIR=$MC_DIR/bin/$GAME_VERSION
# *.jar paths from version.json
LIBRARIES_LIST="\
$MC_DIR/libraries/ca/weblite/java-objc-bridge/1.1/java-objc-bridge-1.1.jar:\
$MC_DIR/libraries/com/github/oshi/oshi-core/6.2.2/oshi-core-6.2.2.jar:\
$MC_DIR/libraries/com/google/code/gson/gson/2.10/gson-2.10.jar:\
$MC_DIR/libraries/com/github/oshi/oshi-core/6.4.5/oshi-core-6.4.5.jar:\
$MC_DIR/libraries/com/google/code/gson/gson/2.10.1/gson-2.10.1.jar:\
$MC_DIR/libraries/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar:\
$MC_DIR/libraries/com/google/guava/guava/31.1-jre/guava-31.1-jre.jar:\
$MC_DIR/libraries/com/ibm/icu/icu4j/71.1/icu4j-71.1.jar:\
$MC_DIR/libraries/com/mojang/authlib/4.0.43/authlib-4.0.43.jar:\
$MC_DIR/libraries/com/google/guava/guava/32.1.2-jre/guava-32.1.2-jre.jar:\
$MC_DIR/libraries/com/ibm/icu/icu4j/73.2/icu4j-73.2.jar:\
$MC_DIR/libraries/com/mojang/authlib/6.0.52/authlib-6.0.52.jar:\
$MC_DIR/libraries/com/mojang/blocklist/1.0.10/blocklist-1.0.10.jar:\
$MC_DIR/libraries/com/mojang/brigadier/1.1.8/brigadier-1.1.8.jar:\
$MC_DIR/libraries/com/mojang/brigadier/1.2.9/brigadier-1.2.9.jar:\
$MC_DIR/libraries/com/mojang/datafixerupper/6.0.8/datafixerupper-6.0.8.jar:\
$MC_DIR/libraries/com/mojang/logging/1.1.1/logging-1.1.1.jar:\
$MC_DIR/libraries/com/mojang/patchy/2.2.10/patchy-2.2.10.jar:\
$MC_DIR/libraries/com/mojang/text2speech/1.17.9/text2speech-1.17.9.jar:\
$MC_DIR/libraries/commons-codec/commons-codec/1.15/commons-codec-1.15.jar:\
$MC_DIR/libraries/commons-io/commons-io/2.11.0/commons-io-2.11.0.jar:\
$MC_DIR/libraries/commons-codec/commons-codec/1.16.0/commons-codec-1.16.0.jar:\
$MC_DIR/libraries/commons-io/commons-io/2.13.0/commons-io-2.13.0.jar:\
$MC_DIR/libraries/commons-logging/commons-logging/1.2/commons-logging-1.2.jar:\
$MC_DIR/libraries/io/netty/netty-buffer/4.1.82.Final/netty-buffer-4.1.82.Final.jar:\
$MC_DIR/libraries/io/netty/netty-codec/4.1.82.Final/netty-codec-4.1.82.Final.jar:\
$MC_DIR/libraries/io/netty/netty-common/4.1.82.Final/netty-common-4.1.82.Final.jar:\
$MC_DIR/libraries/io/netty/netty-handler/4.1.82.Final/netty-handler-4.1.82.Final.jar:\
$MC_DIR/libraries/io/netty/netty-resolver/4.1.82.Final/netty-resolver-4.1.82.Final.jar:\
$MC_DIR/libraries/io/netty/netty-transport-classes-epoll/4.1.82.Final/netty-transport-classes-epoll-4.1.82.Final.jar:\
$MC_DIR/libraries/io/netty/netty-transport-native-unix-common/4.1.82.Final/netty-transport-native-unix-common-4.1.82.Final.jar:\
$MC_DIR/libraries/io/netty/netty-transport/4.1.82.Final/netty-transport-4.1.82.Final.jar:\
$MC_DIR/libraries/it/unimi/dsi/fastutil/8.5.9/fastutil-8.5.9.jar:\
$MC_DIR/libraries/net/java/dev/jna/jna-platform/5.12.1/jna-platform-5.12.1.jar:\
$MC_DIR/libraries/net/java/dev/jna/jna/5.12.1/jna-5.12.1.jar:\
$MC_DIR/libraries/io/netty/netty-buffer/4.1.97.Final/netty-buffer-4.1.97.Final.jar:\
$MC_DIR/libraries/io/netty/netty-codec/4.1.97.Final/netty-codec-4.1.97.Final.jar:\
$MC_DIR/libraries/io/netty/netty-common/4.1.97.Final/netty-common-4.1.97.Final.jar:\
$MC_DIR/libraries/io/netty/netty-handler/4.1.97.Final/netty-handler-4.1.97.Final.jar:\
$MC_DIR/libraries/io/netty/netty-resolver/4.1.97.Final/netty-resolver-4.1.97.Final.jar:\
$MC_DIR/libraries/io/netty/netty-transport-classes-epoll/4.1.97.Final/netty-transport-classes-epoll-4.1.97.Final.jar:\
$MC_DIR/libraries/io/netty/netty-transport-native-unix-common/4.1.97.Final/netty-transport-native-unix-common-4.1.97.Final.jar:\
$MC_DIR/libraries/io/netty/netty-transport/4.1.97.Final/netty-transport-4.1.97.Final.jar:\
$MC_DIR/libraries/it/unimi/dsi/fastutil/8.5.12/fastutil-8.5.12.jar:\
$MC_DIR/libraries/net/java/dev/jna/jna-platform/5.13.0/jna-platform-5.13.0.jar:\
$MC_DIR/libraries/net/java/dev/jna/jna/5.13.0/jna-5.13.0.jar:\
$MC_DIR/libraries/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar:\
$MC_DIR/libraries/org/apache/commons/commons-compress/1.21/commons-compress-1.21.jar:\
$MC_DIR/libraries/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar:\
$MC_DIR/libraries/org/apache/commons/commons-compress/1.22/commons-compress-1.22.jar:\
$MC_DIR/libraries/org/apache/commons/commons-lang3/3.13.0/commons-lang3-3.13.0.jar:\
$MC_DIR/libraries/org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.jar:\
$MC_DIR/libraries/org/apache/httpcomponents/httpcore/4.4.15/httpcore-4.4.15.jar:\
$MC_DIR/libraries/org/apache/httpcomponents/httpcore/4.4.16/httpcore-4.4.16.jar:\
$MC_DIR/libraries/org/apache/logging/log4j/log4j-api/2.19.0/log4j-api-2.19.0.jar:\
$MC_DIR/libraries/org/apache/logging/log4j/log4j-core/2.19.0/log4j-core-2.19.0.jar:\
$MC_DIR/libraries/org/apache/logging/log4j/log4j-slf4j2-impl/2.19.0/log4j-slf4j2-impl-2.19.0.jar:\
$MC_DIR/libraries/org/joml/joml/1.10.5/joml-1.10.5.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-glfw/3.3.1/lwjgl-glfw-3.3.1.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-glfw/3.3.1/lwjgl-glfw-3.3.1-natives-macos.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-glfw/3.3.1/lwjgl-glfw-3.3.1-natives-macos-arm64.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-jemalloc/3.3.1/lwjgl-jemalloc-3.3.1.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-jemalloc/3.3.1/lwjgl-jemalloc-3.3.1-natives-macos.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-jemalloc/3.3.1/lwjgl-jemalloc-3.3.1-natives-macos-arm64.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-openal/3.3.1/lwjgl-openal-3.3.1.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-openal/3.3.1/lwjgl-openal-3.3.1-natives-macos.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-openal/3.3.1/lwjgl-openal-3.3.1-natives-macos-arm64.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-opengl/3.3.1/lwjgl-opengl-3.3.1.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-opengl/3.3.1/lwjgl-opengl-3.3.1-natives-macos.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-opengl/3.3.1/lwjgl-opengl-3.3.1-natives-macos-arm64.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-stb/3.3.1/lwjgl-stb-3.3.1.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-stb/3.3.1/lwjgl-stb-3.3.1-natives-macos.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-stb/3.3.1/lwjgl-stb-3.3.1-natives-macos-arm64.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-tinyfd/3.3.1/lwjgl-tinyfd-3.3.1.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-tinyfd/3.3.1/lwjgl-tinyfd-3.3.1-natives-macos.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-tinyfd/3.3.1/lwjgl-tinyfd-3.3.1-natives-macos-arm64.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl/3.3.1/lwjgl-3.3.1.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl/3.3.1/lwjgl-3.3.1-natives-macos.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl/3.3.1/lwjgl-3.3.1-natives-macos-arm64.jar:\
$MC_DIR/libraries/org/slf4j/slf4j-api/2.0.1/slf4j-api-2.0.1.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-glfw/3.3.2/lwjgl-glfw-3.3.2.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-glfw/3.3.2/lwjgl-glfw-3.3.2-natives-macos.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-glfw/3.3.2/lwjgl-glfw-3.3.2-natives-macos-arm64.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-jemalloc/3.3.2/lwjgl-jemalloc-3.3.2.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-jemalloc/3.3.2/lwjgl-jemalloc-3.3.2-natives-macos.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-jemalloc/3.3.2/lwjgl-jemalloc-3.3.2-natives-macos-arm64.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-openal/3.3.2/lwjgl-openal-3.3.2.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-openal/3.3.2/lwjgl-openal-3.3.2-natives-macos.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-openal/3.3.2/lwjgl-openal-3.3.2-natives-macos-arm64.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-opengl/3.3.2/lwjgl-opengl-3.3.2.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-opengl/3.3.2/lwjgl-opengl-3.3.2-natives-macos.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-opengl/3.3.2/lwjgl-opengl-3.3.2-natives-macos-arm64.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-stb/3.3.2/lwjgl-stb-3.3.2.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-stb/3.3.2/lwjgl-stb-3.3.2-natives-macos.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-stb/3.3.2/lwjgl-stb-3.3.2-natives-macos-arm64.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-tinyfd/3.3.2/lwjgl-tinyfd-3.3.2.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-tinyfd/3.3.2/lwjgl-tinyfd-3.3.2-natives-macos.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl-tinyfd/3.3.2/lwjgl-tinyfd-3.3.2-natives-macos-arm64.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl/3.3.2/lwjgl-3.3.2.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl/3.3.2/lwjgl-3.3.2-natives-macos.jar:\
$MC_DIR/libraries/org/lwjgl/lwjgl/3.3.2/lwjgl-3.3.2-natives-macos-arm64.jar:\
$MC_DIR/libraries/org/slf4j/slf4j-api/2.0.7/slf4j-api-2.0.7.jar:\
$MC_DIR/versions/$GAME_VERSION/$GAME_VERSION.jar"
# Player nickname (the over head)
@ -99,12 +102,17 @@ WINDOW_H=640
JVM_RAM="-Xmx2G"
JVM_ARGS="-XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M"
# Running minecraft
# Change directory
cd $MC_DIR
$HOME/.minecraft/runtime/java-runtime-gamma/linux/java-runtime-gamma/bin/java \
# Prepare game directory
mkdir -p $MC_DIR/userdata
# Running minecraft
$MC_DIR/runtime/java-runtime-gamma/linux/java-runtime-gamma/bin/java \
$JVM_RAM $JVM_ARGS \
-cp $LIBRARIES_LIST \
-Djava.library.path=$NATIVES_DIR \
net.minecraft.client.main.Main \
--username $PLAYER_NAME \
--version $GAME_VERSION \

View File

@ -4,107 +4,114 @@ title Minecraft Launcher
echo Minecraft Launcher by iiiypuk
echo =============================
:: set username
:: Set username
set /p PLAYER=What username would you like?
IF [%PLAYER%] == [] set PLAYER=Steve
:: main directory of the game
:: A minecraft root directory
set MC_DIR=%APPDATA%\.minecraft
:: Are stored here...
:: saves/, resourcepacks/ and screenshots/ dirs
:: and options.txt and servers.dat files
set GAME_DIR=%MC_DIR%
set GAME_DIR=%MC_DIR%\userdata
:: libraries and resource dir (requires no changes)
:: Libraries and resource dir (requires no changes)
set ASSETS_DIR=%MC_DIR%\assets
set ASSETS_INDEX=5
set ASSETS_INDEX=12
:: version minecraft (from versions/ dir)
set GAME_VERSION=1.20.1
:: Version minecraft (from versions/ dir)
set GAME_VERSION=1.20.4
:: Get archive from natives/ dir
NATIVES_DIR=%MC_DIR%\bin\%GAME_VERSION%
:: *.jar paths from version.json
set LIBRARIES_LIST=^
%MC_DIR%/libraries/com/github/oshi/oshi-core/6.2.2/oshi-core-6.2.2.jar;^
%MC_DIR%/libraries/com/google/code/gson/gson/2.10/gson-2.10.jar;^
%MC_DIR%/libraries/com/github/oshi/oshi-core/6.4.5/oshi-core-6.4.5.jar;^
%MC_DIR%/libraries/com/google/code/gson/gson/2.10.1/gson-2.10.1.jar;^
%MC_DIR%/libraries/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar;^
%MC_DIR%/libraries/com/google/guava/guava/31.1-jre/guava-31.1-jre.jar;^
%MC_DIR%/libraries/com/ibm/icu/icu4j/71.1/icu4j-71.1.jar;^
%MC_DIR%/libraries/com/mojang/authlib/4.0.43/authlib-4.0.43.jar;^
%MC_DIR%/libraries/com/google/guava/guava/32.1.2-jre/guava-32.1.2-jre.jar;^
%MC_DIR%/libraries/com/ibm/icu/icu4j/73.2/icu4j-73.2.jar;^
%MC_DIR%/libraries/com/mojang/authlib/6.0.52/authlib-6.0.52.jar;^
%MC_DIR%/libraries/com/mojang/blocklist/1.0.10/blocklist-1.0.10.jar;^
%MC_DIR%/libraries/com/mojang/brigadier/1.1.8/brigadier-1.1.8.jar;^
%MC_DIR%/libraries/com/mojang/brigadier/1.2.9/brigadier-1.2.9.jar;^
%MC_DIR%/libraries/com/mojang/datafixerupper/6.0.8/datafixerupper-6.0.8.jar;^
%MC_DIR%/libraries/com/mojang/logging/1.1.1/logging-1.1.1.jar;^
%MC_DIR%/libraries/com/mojang/patchy/2.2.10/patchy-2.2.10.jar;^
%MC_DIR%/libraries/com/mojang/text2speech/1.17.9/text2speech-1.17.9.jar;^
%MC_DIR%/libraries/commons-codec/commons-codec/1.15/commons-codec-1.15.jar;^
%MC_DIR%/libraries/commons-io/commons-io/2.11.0/commons-io-2.11.0.jar;^
%MC_DIR%/libraries/commons-codec/commons-codec/1.16.0/commons-codec-1.16.0.jar;^
%MC_DIR%/libraries/commons-io/commons-io/2.13.0/commons-io-2.13.0.jar;^
%MC_DIR%/libraries/commons-logging/commons-logging/1.2/commons-logging-1.2.jar;^
%MC_DIR%/libraries/io/netty/netty-buffer/4.1.82.Final/netty-buffer-4.1.82.Final.jar;^
%MC_DIR%/libraries/io/netty/netty-codec/4.1.82.Final/netty-codec-4.1.82.Final.jar;^
%MC_DIR%/libraries/io/netty/netty-common/4.1.82.Final/netty-common-4.1.82.Final.jar;^
%MC_DIR%/libraries/io/netty/netty-handler/4.1.82.Final/netty-handler-4.1.82.Final.jar;^
%MC_DIR%/libraries/io/netty/netty-resolver/4.1.82.Final/netty-resolver-4.1.82.Final.jar;^
%MC_DIR%/libraries/io/netty/netty-transport-classes-epoll/4.1.82.Final/netty-transport-classes-epoll-4.1.82.Final.jar;^
%MC_DIR%/libraries/io/netty/netty-transport-native-unix-common/4.1.82.Final/netty-transport-native-unix-common-4.1.82.Final.jar;^
%MC_DIR%/libraries/io/netty/netty-transport/4.1.82.Final/netty-transport-4.1.82.Final.jar;^
%MC_DIR%/libraries/it/unimi/dsi/fastutil/8.5.9/fastutil-8.5.9.jar;^
%MC_DIR%/libraries/net/java/dev/jna/jna-platform/5.12.1/jna-platform-5.12.1.jar;^
%MC_DIR%/libraries/net/java/dev/jna/jna/5.12.1/jna-5.12.1.jar;^
%MC_DIR%/libraries/io/netty/netty-buffer/4.1.97.Final/netty-buffer-4.1.97.Final.jar;^
%MC_DIR%/libraries/io/netty/netty-codec/4.1.97.Final/netty-codec-4.1.97.Final.jar;^
%MC_DIR%/libraries/io/netty/netty-common/4.1.97.Final/netty-common-4.1.97.Final.jar;^
%MC_DIR%/libraries/io/netty/netty-handler/4.1.97.Final/netty-handler-4.1.97.Final.jar;^
%MC_DIR%/libraries/io/netty/netty-resolver/4.1.97.Final/netty-resolver-4.1.97.Final.jar;^
%MC_DIR%/libraries/io/netty/netty-transport-classes-epoll/4.1.97.Final/netty-transport-classes-epoll-4.1.97.Final.jar;^
%MC_DIR%/libraries/io/netty/netty-transport-native-unix-common/4.1.97.Final/netty-transport-native-unix-common-4.1.97.Final.jar;^
%MC_DIR%/libraries/io/netty/netty-transport/4.1.97.Final/netty-transport-4.1.97.Final.jar;^
%MC_DIR%/libraries/it/unimi/dsi/fastutil/8.5.12/fastutil-8.5.12.jar;^
%MC_DIR%/libraries/net/java/dev/jna/jna-platform/5.13.0/jna-platform-5.13.0.jar;^
%MC_DIR%/libraries/net/java/dev/jna/jna/5.13.0/jna-5.13.0.jar;^
%MC_DIR%/libraries/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar;^
%MC_DIR%/libraries/org/apache/commons/commons-compress/1.21/commons-compress-1.21.jar;^
%MC_DIR%/libraries/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar;^
%MC_DIR%/libraries/org/apache/commons/commons-compress/1.22/commons-compress-1.22.jar;^
%MC_DIR%/libraries/org/apache/commons/commons-lang3/3.13.0/commons-lang3-3.13.0.jar;^
%MC_DIR%/libraries/org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.jar;^
%MC_DIR%/libraries/org/apache/httpcomponents/httpcore/4.4.15/httpcore-4.4.15.jar;^
%MC_DIR%/libraries/org/apache/httpcomponents/httpcore/4.4.16/httpcore-4.4.16.jar;^
%MC_DIR%/libraries/org/apache/logging/log4j/log4j-api/2.19.0/log4j-api-2.19.0.jar;^
%MC_DIR%/libraries/org/apache/logging/log4j/log4j-core/2.19.0/log4j-core-2.19.0.jar;^
%MC_DIR%/libraries/org/apache/logging/log4j/log4j-slf4j2-impl/2.19.0/log4j-slf4j2-impl-2.19.0.jar;^
%MC_DIR%/libraries/org/joml/joml/1.10.5/joml-1.10.5.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-glfw/3.3.1/lwjgl-glfw-3.3.1.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-glfw/3.3.1/lwjgl-glfw-3.3.1-natives-windows.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-glfw/3.3.1/lwjgl-glfw-3.3.1-natives-windows-arm64.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-glfw/3.3.1/lwjgl-glfw-3.3.1-natives-windows-x86.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-jemalloc/3.3.1/lwjgl-jemalloc-3.3.1.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-jemalloc/3.3.1/lwjgl-jemalloc-3.3.1-natives-windows.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-jemalloc/3.3.1/lwjgl-jemalloc-3.3.1-natives-windows-arm64.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-jemalloc/3.3.1/lwjgl-jemalloc-3.3.1-natives-windows-x86.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-openal/3.3.1/lwjgl-openal-3.3.1.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-openal/3.3.1/lwjgl-openal-3.3.1-natives-windows.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-openal/3.3.1/lwjgl-openal-3.3.1-natives-windows-arm64.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-openal/3.3.1/lwjgl-openal-3.3.1-natives-windows-x86.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-opengl/3.3.1/lwjgl-opengl-3.3.1.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-opengl/3.3.1/lwjgl-opengl-3.3.1-natives-windows.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-opengl/3.3.1/lwjgl-opengl-3.3.1-natives-windows-arm64.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-opengl/3.3.1/lwjgl-opengl-3.3.1-natives-windows-x86.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-stb/3.3.1/lwjgl-stb-3.3.1.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-stb/3.3.1/lwjgl-stb-3.3.1-natives-windows.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-stb/3.3.1/lwjgl-stb-3.3.1-natives-windows-arm64.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-stb/3.3.1/lwjgl-stb-3.3.1-natives-windows-x86.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-tinyfd/3.3.1/lwjgl-tinyfd-3.3.1.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-tinyfd/3.3.1/lwjgl-tinyfd-3.3.1-natives-windows.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-tinyfd/3.3.1/lwjgl-tinyfd-3.3.1-natives-windows-arm64.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-tinyfd/3.3.1/lwjgl-tinyfd-3.3.1-natives-windows-x86.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl/3.3.1/lwjgl-3.3.1.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl/3.3.1/lwjgl-3.3.1-natives-windows.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl/3.3.1/lwjgl-3.3.1-natives-windows-arm64.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl/3.3.1/lwjgl-3.3.1-natives-windows-x86.jar;^
%MC_DIR%/libraries/org/slf4j/slf4j-api/2.0.1/slf4j-api-2.0.1.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-glfw/3.3.2/lwjgl-glfw-3.3.2.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-glfw/3.3.2/lwjgl-glfw-3.3.2-natives-windows.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-glfw/3.3.2/lwjgl-glfw-3.3.2-natives-windows-arm64.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-glfw/3.3.2/lwjgl-glfw-3.3.2-natives-windows-x86.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-jemalloc/3.3.2/lwjgl-jemalloc-3.3.2.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-jemalloc/3.3.2/lwjgl-jemalloc-3.3.2-natives-windows.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-jemalloc/3.3.2/lwjgl-jemalloc-3.3.2-natives-windows-arm64.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-jemalloc/3.3.2/lwjgl-jemalloc-3.3.2-natives-windows-x86.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-openal/3.3.2/lwjgl-openal-3.3.2.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-openal/3.3.2/lwjgl-openal-3.3.2-natives-windows.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-openal/3.3.2/lwjgl-openal-3.3.2-natives-windows-arm64.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-openal/3.3.2/lwjgl-openal-3.3.2-natives-windows-x86.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-opengl/3.3.2/lwjgl-opengl-3.3.2.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-opengl/3.3.2/lwjgl-opengl-3.3.2-natives-windows.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-opengl/3.3.2/lwjgl-opengl-3.3.2-natives-windows-arm64.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-opengl/3.3.2/lwjgl-opengl-3.3.2-natives-windows-x86.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-stb/3.3.2/lwjgl-stb-3.3.2.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-stb/3.3.2/lwjgl-stb-3.3.2-natives-windows.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-stb/3.3.2/lwjgl-stb-3.3.2-natives-windows-arm64.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-stb/3.3.2/lwjgl-stb-3.3.2-natives-windows-x86.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-tinyfd/3.3.2/lwjgl-tinyfd-3.3.2.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-tinyfd/3.3.2/lwjgl-tinyfd-3.3.2-natives-windows.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-tinyfd/3.3.2/lwjgl-tinyfd-3.3.2-natives-windows-arm64.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl-tinyfd/3.3.2/lwjgl-tinyfd-3.3.2-natives-windows-x86.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl/3.3.2/lwjgl-3.3.2.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl/3.3.2/lwjgl-3.3.2-natives-windows.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl/3.3.2/lwjgl-3.3.2-natives-windows-arm64.jar;^
%MC_DIR%/libraries/org/lwjgl/lwjgl/3.3.2/lwjgl-3.3.2-natives-windows-x86.jar;^
%MC_DIR%/libraries/org/slf4j/slf4j-api/2.0.7/slf4j-api-2.0.7.jar;^
%MC_DIR%/versions/%GAME_VERSION%/%GAME_VERSION%.jar
:: player nickname (the over head)
:: Player nickname (the over head)
set PLAYER_NAME=%PLAYER%
:: game window resolution
:: Game window resolution
set WINDOW_W=800
set WINDOW_H=640
:: java machine arguments
:: Java machine arguments
set JVM_RAM=-Xmx2G
set JVM_ARGS=-XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
:: running minecraft
:: Change directory
cd /d %MC_DIR%
:: Prepare game directory
mkdir %GAME_DIR%
:: Running minecraft
java.exe %JVM_RAM% %JVM_ARGS% ^
-cp %LIBRARIES_LIST% ^
net.minecraft.client.main.Main ^