Skip to content

Instantly share code, notes, and snippets.

@Aetopia
Created July 28, 2021 17:20
Show Gist options
  • Save Aetopia/801b921383e50f31b84be34e3183809d to your computer and use it in GitHub Desktop.
Save Aetopia/801b921383e50f31b84be34e3183809d to your computer and use it in GitHub Desktop.
set JVMArguments=-Xms3072m -Xmx3072m
if '%~1'=='1.7' set Version=7.10
if '%Version%'=='7.10' goto :1.7
if '%~1'=='1.8' set Version=8.9
if '%Version%'=='8.9' goto :1.8
if '%~1%'=='1.12' set Version=1.12
if '%Version%'=='1.12' goto :1.12
if '%~1%'=='1.16' set Version=1.16
if '%Version%'=='1.16' goto :1.16
if '%~1%'=='1.17' set Version=1.17
if '%Version%'=='1.17' goto :1.17
exit
goto :choose
:1.7
set Version=1.7
set AssetIndex=1.7.10
if exist "%USERPROFILE%\.lunarclient\offline\1.7" (echo.) else goto :noVersion
goto :launch
:1.8
set Version=1.8
set AssetIndex=1.8
if exist "%USERPROFILE%\.lunarclient\offline\1.8" (echo.) else goto :noVersion
goto :launch
:1.12
set Version=1.12
set AssetIndex=1.12
if exist "%USERPROFILE%\.lunarclient\offline\1.12" (echo.) else goto :noVersion
goto :launch
:1.16
set Version=1.16
set AssetIndex=1.16
if exist "%USERPROFILE%\.lunarclient\offline\1.16" (echo.) else goto :noVersion
goto :launch
:1.17
set Version=1.17
set AssetIndex=1.17
if exist "%USERPROFILE%\.lunarclient\offline\1.17" (echo.) else goto :noVersion
goto :launch
:launch
for /D %%I in ("%USERPROFILE%\.lunarclient\jre\zulu*") do start "" %%~I\bin\javaw.exe --add-modules jdk.naming.dns --add-exports jdk.naming.dns/com.sun.jndi.dns=java.naming -Djna.boot.library.path=%USERPROFILE%\.lunarclient\offline\%Version%\natives --add-opens java.base/java.io=ALL-UNNAMED %JVMArguments% -Djava.library.path=%USERPROFILE%\.lunarclient\offline\%Version%\natives -XX:+DisableAttachMechanism -cp %USERPROFILE%\.lunarclient\offline\%Version%\lunar-assets-prod-1-optifine.jar;%USERPROFILE%\.lunarclient\offline\%Version%\lunar-assets-prod-2-optifine.jar;%USERPROFILE%\.lunarclient\offline\%Version%\lunar-assets-prod-3-optifine.jar;%USERPROFILE%\.lunarclient\offline\%Version%\lunar-libs.jar;%USERPROFILE%\.lunarclient\offline\%Version%\lunar-prod-optifine.jar;%USERPROFILE%\.lunarclient\offline\%Version%\OptiFine.jar;%USERPROFILE%\.lunarclient\offline\%Version%\vpatcher-prod.jar com.moonsworth.lunar.patcher.LunarMain --Version %Version% --accessToken 0 --assetIndex %AssetIndex% --userProperties {} --gameDir %APPDATA%\.minecraft --texturesDir %USERPROFILE%\.lunarclient\textures --width 854 --height 480 & exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment