Last active
May 7, 2023 20:42
-
-
Save Scherso/6cb3c1e435cc2c7e22ab4066e5c76779 to your computer and use it in GitHub Desktop.
A script to launch Lunar client with the addition of the Weave-Agent.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Add your JVM Args here. | |
declare -r LUNAR_JVM_ARGS="\ | |
--add-modules jdk.naming.dns \ | |
--add-exports jdk.naming.dns/com.sun.jndi.dns=java.naming \ | |
-Djna.boot.library.path=natives \ | |
-Dlog4j2.formatMsgNoLookups=true \ | |
--add-opens java.base/java.io=ALL-UNNAMED \ | |
-Xms3072m \ | |
-Xmx3072m \ | |
-Djava.library.path=natives" | |
# Add your agent to inject here. | |
declare -r LUNAR_AGENT="${HOME}/Downloads/Lunar-Thing/Weave-Loader-Agent-0.1.0.jar" | |
# Version specific variable. | |
declare -r LUNAR_VERSION="1.8.9" | |
# Width and Height | |
declare -r LUNAR_WIDTH="854" | |
declare -r LUNAR_HEIGHT="480" | |
# JVM stuff | |
declare -r LUNAR_JRE="${HOME}/.lunarclient/jre/40fc5ff473587a781315b64674667ee1b902fe18/zulu16.32.15-ca-fx-jdk16.0.2-linux_x64/bin/java" | |
declare -r LUNAR_CLASSPATH="lunar-lang.jar:lunar-emote.jar:lunar.jar:optifine-0.1.0-SNAPSHOT-all.jar:v1_8-0.1.0-SNAPSHOT-all.jar:common-0.1.0-SNAPSHOT-all.jar:genesis-0.1.0-SNAPSHOT-all.jar" | |
declare -r LUNAR_MAIN_CLASS="com.moonsworth.lunar.genesis.Genesis" | |
declare -r ICHOR_EXT_FILE="OptiFine_v1_8.jar" | |
cd "${HOME}/.lunarclient/offline/multiver" | |
exec "${LUNAR_JRE}" ${LUNAR_JVM_ARGS} \ | |
-cp "${LUNAR_CLASSPATH}" \ | |
-javaagent:"${LUNAR_AGENT}" \ | |
"${LUNAR_MAIN_CLASS}" \ | |
--version "${LUNAR_VERSION}" \ | |
--accessToken 0 \ | |
--assetIndex ${LUNAR_VERSION/.9/} \ | |
--userProperties {} \ | |
--gameDir "${HOME}/.minecraft" \ | |
--texturesDir "${HOME}/.lunarclient/textures" \ | |
--width "${LUNAR_WIDTH}" \ | |
--height "${LUNAR_HEIGHT}" \ | |
--workingDirectory . \ | |
--classpathDir . \ | |
--ichorClassPath "${LUNAR_CLASSPATH}" \ | |
--ichorExternalFiles "${ICHOR_EXT_FILE}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment