mworzala / mc Goto Github PK
View Code? Open in Web Editor NEWCommand line Minecraft launcher
License: MIT License
Command line Minecraft launcher
License: MIT License
Does not launch at all due to how the command is built. As Windows' paths contain :
to specify the drive, using :
to separate classpath jars will not work on Windows builds of Java. Instead, ;
should be used. Semicolons should also work on Linux and Mac.
internal/pkg/game/launch/launch.go:62
-classpath.WriteString(":")
+classpath.WriteString(";")
On top of this, Windows Java builds do not know about the -XstartOnFirstThread
flag. Because of this, Java will exit immediately when provided. To work on Windows it must be removed when launching on Windows:
internal/pkg/game/launch/launch.go:105
-args = append(args, "-XstartOnFirstThread")
Platform: Windows
Version: From source
Relevantish stacktrace:
Unrecognized option: -XstartOnFirstThread
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
When launching Fabric 1.20.1, there are no assets - seen by the lack of background, desktop icon and sounds. The problem is being caused by the fact --assetIndex 5
is not properly being added to the built command, instead only showing as --assetIndex
.
Platform: Windows
Version: From source
Would be nice to be able to query all of the currently running clients (not sure how this is tracked, maybe also needs a system daemon) to get info such as:
kill
Profile configs can only be modified by manually editing the JSON file right now.
A config command:
mc profile config {profile_name} {key} {value}
mc config {--global | --profile {profile_name}} {key} {value}
mc profile alter {profile_name} --config {key}={value}
Allow config changes in initial creation
mc install 1.20.1 --config {key}={value}
Despite the manifests for versions 1.13.2-1.18.2 suggesting a launcher version of 21, mc-cli is unable to launch them. My testing suggests a link to failing to include the lwjgl
natives.
Platform: Windows
Version: From source
Stracktrace from 1.18.2
:
[16:28:10] [Render thread/INFO]: [STDERR]: [LWJGL] Failed to load a library. Possible solutions:
a) Add the directory that contains the shared library to -Djava.library.path or -Dorg.lwjgl.librarypath.
b) Add the JAR that contains the shared library to the classpath.
[16:28:10] [Render thread/INFO]: [STDERR]: [LWJGL] Enable debug mode with -Dorg.lwjgl.util.Debug=true for better diagnostics.
[16:28:10] [Render thread/INFO]: [STDERR]: [LWJGL] Enable the SharedLibraryLoader debug mode with -Dorg.lwjgl.util.DebugLoader=true for better diagnostics.
[16:28:10] [Render thread/INFO]: [STDERR]: java.lang.NoClassDefFoundError: Could not initialize class com.mojang.blaze3d.systems.RenderSystem
[16:28:10] [Render thread/INFO]: [STDERR]: at ac.a(SourceFile:65)
[16:28:10] [Render thread/INFO]: [STDERR]: at dyr.a(SourceFile:2394)
[16:28:10] [Render thread/INFO]: [STDERR]: at dyr.a(SourceFile:2389)
[16:28:10] [Render thread/INFO]: [STDERR]: at net.minecraft.client.main.Main.main(SourceFile:206)
Versions with the features is_quick_play_singleplayer
and is_quick_play_multiplayer
can have arguments passed in that allows them to automatically join on game start. mc-cli flags like --server <ip>
and --world <world>
would allow this feature to be used.
OS: arch linux, x86
panic: exit status 1
goroutine 1 [running]:
github.com/mworzala/mc/internal/pkg/game/launch.LaunchProfile({0xc0000e8840, 0x22}, 0xc0000b30c0, 0xc00023e240, {0xc0002a4000, 0x234}, 0xc000024340, 0x1)
/home/.../go/pkg/mod/github.com/mworzala/[email protected]/internal/pkg/game/launch/launch.go:226 +0x1f30
github.com/mworzala/mc/cmd/mc.(*launchOpts).launch(0xc0000b0c20, {0xc0000eed40, 0x1, 0x0?})
/home/.../go/pkg/mod/github.com/mworzala/[email protected]/cmd/mc/launch.go:74 +0x2bf
github.com/mworzala/mc/cmd/mc.newLaunchCmd.func1(0xc00014a800?, {0xc0000eed40?, 0x4?, 0x8e168c?})
/home/.../go/pkg/mod/github.com/mworzala/[email protected]/cmd/mc/launch.go:31 +0x3b
github.com/spf13/cobra.(*Command).execute(0xc000184300, {0xc0000eed20, 0x2, 0x2})
/home/.../go/pkg/mod/github.com/spf13/[email protected]/command.go:940 +0x87c
github.com/spf13/cobra.(*Command).ExecuteC(0xc000180000)
/home/.../go/pkg/mod/github.com/spf13/[email protected]/command.go:1068 +0x3a5
github.com/spf13/cobra.(*Command).Execute(0xc000164000?)
/home/.../go/pkg/mod/github.com/spf13/[email protected]/command.go:992 +0x13
main.main()
/home/.../go/pkg/mod/github.com/mworzala/[email protected]/main.go:41 +0x112
The refresh and access tokens should be stored in the system keyring if available, or fall back to {idk}.
This package can handle it for popular configurations: https://github.com/keybase/go-keychain
Panic occurs after authentication has been done on Microsoft's side.
Platform: Windows
Version: From source
Stacktrace:
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x20 pc=0xf5441e]
goroutine 1 [running]:
github.com/mworzala/mc/internal/pkg/account.(*fileManager).LoginMicrosoft(0xc0000acfc0, 0xc00009cdc0)
C:/Users/**/mc/internal/pkg/account/account.go:190 +0x33e
github.com/mworzala/mc/cmd/mc/account.(*loginAccountOpts).handleLogin(0xc0000a4fc0)
C:/Users/**/mc/cmd/mc/account/login.go:55 +0xaa
github.com/mworzala/mc/cmd/mc/account.newLoginCmd.func1(0xc00011e600?, {0x156ac60?, 0x0?, 0x0?})
C:/Users/**/mc/cmd/mc/account/login.go:41 +0x149
github.com/spf13/cobra.(*Command).execute(0xc000154600, {0x156ac60, 0x0, 0x0})
C:/Users/**/go/pkg/mod/github.com/spf13/[email protected]/command.go:940 +0x87c
github.com/spf13/cobra.(*Command).ExecuteC(0xc000154000)
C:/Users/**/go/pkg/mod/github.com/spf13/[email protected]/command.go:1068 +0x3a5
github.com/spf13/cobra.(*Command).Execute(0xc000150000?)
C:/Users/**/go/pkg/mod/github.com/spf13/[email protected]/command.go:992 +0x13
main.main()
C:/Users/**/mc/main.go:41 +0x112
Should add some docs, most likely to the attached GitHub wiki.
It would be nice to support automatic synchronization of:
I see three plausible ways to do it:
Somehow a java discover
created a java installation without a name
There are many use cases for having an older or different Java version for a particular profile, for example:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.