CmlLib / CmlLib.Core

.NET Minecraft Launcher Library. All Version, Auth, Forge, Java, Crossplatform
MIT License
216 stars 42 forks source link

Problem starting version 1.20.2 #88

Closed WinnLov closed 1 year ago

WinnLov commented 1 year ago

When you run the version, everything happens as usual, but Minecraft just does not start and logs are not written, but when you run Forge version 1.20.2, the game starts and after a while it still crashes, but logs are written. The logs say that it cannot find dependencies.

AlphaBs commented 1 year ago

please upload the log file

Tartilla-TAIGO commented 1 year ago

Note that you need to use a separate package to run Forge, not the built-in one. https://github.com/CmlLib/CmlLib.Core.Installer.Forge

lostmsu commented 1 year ago

Minecraft crashes with

Exception in thread "main" java.lang.IllegalArgumentException: Invalid UUID string: user_uuid at java.base/java.util.UUID.fromString1(UUID.java:280) at java.base/java.util.UUID.fromString(UUID.java:258) at com.mojang.util.UndashedUuid.fromStringLenient(UndashedUuid.java:14) at net.minecraft.client.main.Main.main(SourceFile:151)

Tartilla-TAIGO commented 1 year ago

send your code

lostmsu commented 1 year ago

It's trivial really

using var process = await launcher.CreateProcessAsync(version, new MLaunchOption {
        MaximumRamMb = 2048,
        // TODO use a real session
        Session = MSession.GetOfflineSession("borg123"),
    }).ConfigureAwait(false);
AlphaBs commented 1 year ago

It's trivial really

using var process = await launcher.CreateProcessAsync(version, new MLaunchOption {
        MaximumRamMb = 2048,
        // TODO use a real session
        Session = MSession.GetOfflineSession("borg123"),
    }).ConfigureAwait(false);

GetOfflineSession always create same uuid value user_uuid, which the game cannot parse.

replace Session = MSession.GetOffline...

Session = new MSession
{
    Username = "borg123",
    UUID = "2749420bc7a54b05ab622b34e61b8a79",
    AccessToken = "accesstoken",
    UserType = "Mojang"
}

it creates session with just random valid UUID.

the problem would not be appeared with real session.

lostmsu commented 1 year ago

@AlphaBs if offline sessions are no longer supported, it should be indicated somewhere and the corresponding classes removed.