Compare commits
4 Commits
4df1b53fc4
...
93924d50ba
Author | SHA1 | Date | |
---|---|---|---|
93924d50ba | |||
f17fa75dfb | |||
582aedfd2e | |||
074112bce3 |
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[submodule "deps/colors.sh"]
|
||||
path = deps/colors.sh
|
||||
url = https://git.a2s.su/iiiypuk/colors.sh.git
|
1
deps/colors.sh
vendored
Submodule
1
deps/colors.sh
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 9efc4b0ec45765dcb3f7bfd22d167f369eff88b1
|
1
vanilla/colors.sh
Symbolic link
1
vanilla/colors.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../deps/colors.sh/colors.sh
|
@ -1,26 +1,32 @@
|
||||
#!/bin/sh
|
||||
echo -ne "\033]2;Minecraft Launcher\007"
|
||||
|
||||
# Git repo: https://git.a2s.su/iiiypuk/minecraft-launcher
|
||||
|
||||
# include colors library
|
||||
source ./colors.sh
|
||||
|
||||
# Setting terminal emulator title
|
||||
echo -ne "\033]30;Minecraft Launcher\007"
|
||||
clear
|
||||
|
||||
# Launcher title
|
||||
echo "Minecraft Launcher by iiiypuk"
|
||||
echo "============================="
|
||||
echo -e "${BRIGHT_GREEN_B}Minecraft Launcher by ${BRIGHT_RED_B}iiiypuk${NC}"
|
||||
echo -e "${BRIGHT_YELLOW_B}=============================${NC}"
|
||||
|
||||
# Set username
|
||||
read -p "What username would you like? " player
|
||||
read -p "$(echo -e ${BRIGHT_CYAN_B}What username would you like?${NC}) " player
|
||||
if [ ! $player ]; then
|
||||
player="Steve"
|
||||
fi
|
||||
echo ''
|
||||
|
||||
# A minecraft root directory
|
||||
MC_DIR=$HOME/.minecraft
|
||||
|
||||
# Get archive from natives/ dir
|
||||
NATIVES_DIR=$MC_DIR/bin/1.20.2
|
||||
|
||||
# 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
|
||||
@ -29,6 +35,9 @@ ASSETS_INDEX=5
|
||||
# Version minecraft (from versions/ dir)
|
||||
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/com/github/oshi/oshi-core/6.4.5/oshi-core-6.4.5.jar:\
|
||||
@ -108,9 +117,13 @@ 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
|
||||
|
||||
# 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 \
|
||||
|
Loading…
Reference in New Issue
Block a user