Coder Social home page Coder Social logo

mc's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

mc's Issues

Incorrect command building causes failure to launch on Windows

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.

Assets are not loaded when launching Fabric

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

View of running clients

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:

  • Logs (without a restart if you forgot to tail)
    • Could just be done by tailing the log file, though not sure what happens to the file when running the same instance 2x
  • Performance (mem/cpu)
    • Existing options for this (htop, process monitor, etc)
  • Killing
    • X button, kill

Profile config

Profile configs can only be modified by manually editing the JSON file right now.

A config command:

  • git config like: mc profile config {profile_name} {key} {value}
  • also kinda git config like: mc config {--global | --profile {profile_name}} {key} {value}
  • kafkactl like: mc profile alter {profile_name} --config {key}={value}

Allow config changes in initial creation

  • mc install 1.20.1 --config {key}={value}

Minecraft <= 1.18.2 does not launch despite being correct launcher version

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)

Automatically join world or server using flags

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.

Unknown launch failure

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

Panic on logging into Microsoft account

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

Documentation

Should add some docs, most likely to the attached GitHub wiki.

Config Sync

It would be nice to support automatic synchronization of:

  • options.txt
  • resourcepacks
  • servers.dat
  • saves?

I see three plausible ways to do it:

  1. Symlink them from somewhere (client may have issues with this, need to test)
  2. Whenever the profile is launched, sync the relevant files (this may be all thats necessary if the client does not watch for changes)
  3. Run a background process to sync the files on change (eg launchd on macOS)

Allow configuring java installation per profile

There are many use cases for having an older or different Java version for a particular profile, for example:

  • Mods which require a particular arch
  • Older Minecraft versions which use an older Java version

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.