Giter VIP home page Giter VIP logo

mrshieh-x / console-minecraft-launcher Goto Github PK

View Code? Open in Web Editor NEW
143.0 143.0 8.0 42.01 MB

一个在命令行上运行的 Minecraft Java 版启动器 A Minecraft Java Edition Launcher Running on the Command Line

Home Page: https://www.youtube.com/watch?v=Sqeu_Pahm-0

License: GNU General Public License v3.0

Java 97.21% C 0.23% PowerShell 0.79% C++ 1.77%
command console mc mclauncher minecraft minecraft-launcher

console-minecraft-launcher's People

Contributors

0xpte4r6 avatar mrshieh-x avatar xin-sin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

console-minecraft-launcher's Issues

支持&建议

用了一下,太喜欢这种操作console的风格了,就像用Windows Powershell一样,不过还是有几点建议:

  1. 在教程中教用户添加环境变量,直接在Powershell或者cmd里面直接使用,这样方便许多

  2. -h --help指令的反馈要精简,默认返回常用指令的帮助文档(可以增加--all参数返回全部指令的帮助文档)

  3. 控制台优化:

显示当前操作的游戏版本,参考Anaconda Prompt (anaconda3)的控制台,会显示当前操作环境的名称,下载和删改资源就默认选择这个游戏版本(可能实现难度较大)

  1. 导出整合包:

可以添加export指令:
比如:cmcl export

  1. 下载优化:
  1. 下载Minecraft版本时添加重命名版本的选项参数

  2. 增加对 resourcepack shaderpack datapack 和地图 的支持

  3. 给下载源默认值:
    比如就默认modrinth,或者把默认值添加到全局设置cmcl.json中,避免每次下载都要输入过多的参数

  4. 可以从其他网站的url直接下载资源:
    可以添加一个--from-url参数,比如我想直接从Github下载Sodium 0.4.9可以写--from-url=“https://github.com/CaffeineMC/sodium-fabric/releases/download/mc1.19.3-0.4.9/sodium-fabric-mc1.19.3-0.4.9+build.23.jar”

  5. 下载模组优化:
    自动检索依赖的模组项目,能够读取模组依赖的前置模组的mod id和版本要求,无论是否提供"--from-url"参数都从“--source”参数选择下载源(可能工程量比较大,可以缓一缓)

  6. 简化cmcl mod --install参数,并且可以指定模组版本,参考python的 pip工具,比如:cmcl mod --install [==](可能工程量较大,可以缓一缓)

  1. 资源管理优化:
  1. 管理模组(除了下载以外还可以删除模组,屏蔽模组(直接改扩展名就屏蔽了))

  2. 资源包/光影包/数据包/地图的管理指令

  1. 联机(这个最难搞,不着急)

最后提一点哈,不需要总把新的源码覆盖原本的master分支,不然旧版本的源码就看不到的,可以以版本命名分支并且把最新版分支设为主分支。
en~ 就这么多了,大佬可以参考一下,结合开发的难度和建议的合理性,期待你的更新

关于版本隔离

rt.
无论是在安装版本时直接安装modloader再设置版本隔离, 还是在安装版本后设置版本隔离再安装modloader, modloader都无法正常生效.
使用#11 (comment)中的方法也无法使modloader生效.
经测试, 目前已知唯一能使版本隔离与modloader共同生效的方法是导入带有modloader的整合包.
以上.

关于命令提示优化

1.我个人认为cmcl是适合开发者,给自己找麻烦的人的,一般这种开源软件使用者都会查看文档,而mc萌新是偏向gui启动器的,肯定不会来选cmcl这种入手门槛高的启动器,因此,当直接执行二进制文件而不加任何参数时应直接打印帮助信息,而非使用提示
2.打印的帮助信息更加格式化,比如短参数后又其对于的长参数:-i:--install
2.mod安装参数冗杂,虽说mod,mod2等方便快捷,但是就是让人非常不舒服...
3.建议方案:
cmcl
关于 -a[--about]
帮助 -h[--help]
列出 -l[--list]
安装 -i[--install]
launcher /更新启动器/
minecraft -v[--version] /安装新游戏/ <minecraft_version,example:1.14.514> (--with [fabric/forge/quilt/liteloader/rift]) /正式版+modloader>/
<minecraft_version,example:19w198J> (--with (fabric)) /快照+(fabric)/
mod --mc=
设定 -s[--setting] account chose //选择账号
add [online/offline/third] //添加
remove //移除
gamepath choose //选择游戏(.minecraft)路径
add //添加
remove //移除
source game [office/mcbbs] //游戏源
resource [Cf/Mf] //资源源
common connections
...

使用一段时间后登录多人服务器错误

操作系统:macOS 14.0
登录方式:微软登录
版本:1.20.1
描述:使用一段时间后登录多人服务器提示“无法连接至服务器,登录失败:无效会话(请尝试重启游戏及启动器)”
出现该问题后,通常需要重新登录微软账号才能进入
日志:
(base) ➜ cmcl java -jar cmcl.jar 1.20.1
启动版本:1.20.1 (1.20.1) | 登录账号:F1Justin (微软账户) | Java 路径:/Library/Java/JavaVirtualMachines/jdk-20.jdk/Contents/Home/bin/java
游戏跟随启动器退出:true | 全屏:false | 最大内存:8192MB | 窗口宽:854 | 窗口高:480 | 启动前检查账号:false
游戏目录:/Users/justin/cmcl/.minecraft

启动游戏中...
[18:16:27] [Datafixer Bootstrap/INFO]: 188 Datafixer optimizations took 57 milliseconds
[18:16:28] [Render thread/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[18:16:28] [Render thread/ERROR]: Failed to verify authentication
com.mojang.authlib.exceptions.InvalidCredentialsException: Status: 401
at com.mojang.authlib.exceptions.MinecraftClientHttpException.toAuthenticationException(MinecraftClientHttpException.java:56) ~[authlib-4.0.43.jar:?]
at com.mojang.authlib.yggdrasil.YggdrasilUserApiService.fetchProperties(YggdrasilUserApiService.java:156) ~[authlib-4.0.43.jar:?]
at com.mojang.authlib.yggdrasil.YggdrasilUserApiService.(YggdrasilUserApiService.java:55) ~[authlib-4.0.43.jar:?]
at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.createUserApiService(YggdrasilAuthenticationService.java:124) ~[authlib-4.0.43.jar:?]
at enn.a(SourceFile:733) ~[1.20.1.jar:?]
at enn.(SourceFile:442) ~[1.20.1.jar:?]
at net.minecraft.client.main.Main.main(SourceFile:211) ~[1.20.1.jar:?]
Caused by: com.mojang.authlib.exceptions.MinecraftClientHttpException: Status: 401
at com.mojang.authlib.minecraft.client.MinecraftClient.readInputStream(MinecraftClient.java:85) ~[authlib-4.0.43.jar:?]
at com.mojang.authlib.minecraft.client.MinecraftClient.get(MinecraftClient.java:48) ~[authlib-4.0.43.jar:?]
at com.mojang.authlib.yggdrasil.YggdrasilUserApiService.fetchProperties(YggdrasilUserApiService.java:129) ~[authlib-4.0.43.jar:?]
... 5 more
[18:16:28] [Render thread/INFO]: Setting user: F1Justin
[18:16:28] [Render thread/INFO]: Backend library: LWJGL version 3.3.1 build 7
[18:16:28] [Render thread/INFO]: [STDERR]: [LWJGL] [ThreadLocalUtil] Unsupported JNI version detected, this may result in a crash. Please inform LWJGL developers.
[18:16:29] [Worker-Main-3/ERROR]: Failed to retrieve profile key pair
java.io.IOException: Could not retrieve profile key pair
at fes.a(SourceFile:139) ~[1.20.1.jar:?]
at fes.b(SourceFile:79) ~[1.20.1.jar:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760) ~[?:?]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387) ~[?:?]
at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312) ~[?:?]
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843) ~[?:?]
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808) ~[?:?]
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188) ~[?:?]
[18:16:29] [Render thread/INFO]: Reloading ResourceManager: vanilla
[18:16:29] [Worker-Main-4/INFO]: Found unifont_all_no_pua-15.0.06.hex, loading
[18:16:30] [Render thread/WARN]: Missing sound for event: minecraft:item.goat_horn.play
[18:16:30] [Render thread/WARN]: Missing sound for event: minecraft:entity.goat.screaming.horn_break
[18:16:30] [Render thread/INFO]: OpenAL initialized on device CoreAudio Default
[18:16:30] [Render thread/INFO]: Sound engine started
[18:16:30] [Render thread/INFO]: Created: 1024x512x4 minecraft:textures/atlas/blocks.png-atlas
[18:16:30] [Render thread/INFO]: Created: 256x256x4 minecraft:textures/atlas/signs.png-atlas
[18:16:30] [Render thread/INFO]: Created: 512x512x4 minecraft:textures/atlas/shield_patterns.png-atlas
[18:16:30] [Render thread/INFO]: Created: 512x512x4 minecraft:textures/atlas/banner_patterns.png-atlas
[18:16:30] [Render thread/INFO]: Created: 1024x1024x4 minecraft:textures/atlas/armor_trims.png-atlas
[18:16:30] [Render thread/INFO]: Created: 128x64x4 minecraft:textures/atlas/decorated_pot.png-atlas
[18:16:30] [Render thread/INFO]: Created: 256x256x4 minecraft:textures/atlas/chest.png-atlas
[18:16:30] [Render thread/INFO]: Created: 512x256x4 minecraft:textures/atlas/shulker_boxes.png-atlas
[18:16:30] [Render thread/INFO]: Created: 512x256x4 minecraft:textures/atlas/beds.png-atlas
[18:16:30] [Render thread/WARN]: Shader rendertype_entity_translucent_emissive could not find sampler named Sampler2 in the specified shader program.
[18:16:30] [Render thread/INFO]: Created: 256x256x0 minecraft:textures/atlas/particles.png-atlas
[18:16:30] [Render thread/INFO]: Created: 256x256x0 minecraft:textures/atlas/paintings.png-atlas
[18:16:30] [Render thread/INFO]: Created: 128x128x0 minecraft:textures/atlas/mob_effects.png-atlas
[18:16:30] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id
[18:16:45] [Worker-Main-7/ERROR]: Failed to retrieve profile key pair
java.io.IOException: Could not retrieve profile key pair
at fes.a(SourceFile:139) ~[1.20.1.jar:?]
at fes.b(SourceFile:79) ~[1.20.1.jar:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760) ~[?:?]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387) ~[?:?]
at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312) ~[?:?]
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843) ~[?:?]
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808) ~[?:?]
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188) ~[?:?]
[18:16:45] [Render thread/INFO]: Connecting to 127.0.0.1, 25565
[18:16:49] [Worker-Main-7/ERROR]: Failed to retrieve profile key pair
java.io.IOException: Could not retrieve profile key pair
at fes.a(SourceFile:139) ~[1.20.1.jar:?]
at fes.b(SourceFile:79) ~[1.20.1.jar:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760) ~[?:?]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387) ~[?:?]
at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312) ~[?:?]
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843) ~[?:?]
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808) ~[?:?]
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188) ~[?:?]
[18:16:49] [Render thread/INFO]: Connecting to 127.0.0.1, 25565
[18:16:53] [Render thread/INFO]: Connecting to 127.0.0.1, 25565
[18:16:53] [Worker-Main-7/ERROR]: Failed to retrieve profile key pair
java.io.IOException: Could not retrieve profile key pair
at fes.a(SourceFile:139) ~[1.20.1.jar:?]
at fes.b(SourceFile:79) ~[1.20.1.jar:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760) ~[?:?]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387) ~[?:?]
at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312) ~[?:?]
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843) ~[?:?]
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808) ~[?:?]
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188) ~[?:?]
^[[C^C%

启动时报错无法启动

当我刚从CurseForge上下载好1.19.2的整合包,然后准备启动时出现以下错误

Starting game...
WARNING: Unknown module: cpw.mods.securejarhandler specified to --add-exports
WARNING: Unknown module: cpw.mods.securejarhandler specified to --add-opens
WARNING: Unknown module: cpw.mods.securejarhandler specified to --add-opens
Exception in thread "main" java.lang.ExceptionInInitializerError
        at cpw.mods.niofs.union.UnionFileSystemProvider.newFileSystemInternal(UnionFileSystemProvider.java:115)
        at cpw.mods.niofs.union.UnionFileSystemProvider.newFileSystem(UnionFileSystemProvider.java:105)
        at cpw.mods.jarhandling.impl.Jar.<init>(Jar.java:84)
        at cpw.mods.jarhandling.SecureJar.from(SecureJar.java:70)
        at cpw.mods.jarhandling.SecureJar.from(SecureJar.java:66)
        at cpw.mods.jarhandling.SecureJar.from(SecureJar.java:58)
        at cpw.mods.jarhandling.SecureJar.from(SecureJar.java:50)
        at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:84)
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field static final java.lang.invoke.MethodHandles$Lookup java.lang.invoke.MethodHandles$Lookup.IMPL_LOOKUP accessible: module java.base does not "opens java.lang.invoke" to unnamed module @4fccd51b
        at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
        at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
        at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
        at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
        at cpw.mods.niofs.union.UnionFileSystem.<clinit>(UnionFileSystem.java:45)
        ... 8 more
Game finished

关于配置文件的路径

目前程序默认会在运行目录下创建cmcl.json 但对于Linux来说 在家目录生成文件到底是不太雅观的
可以增加一个指定配置文件的选项
建议将linux平台的默认行为改为在$HOME/.config目录下创建与读取配置文件,在$HOME/.config/cmcl.json下不存在时 检测$HOME/.cmcl.json和当前运行目录下的cmcl.json 若均不存在 则创建$HOME/.config/cmcl.json
这样会更方便些

[New Feature]不同游戏版本的不同JAVA问题

对于某些低版本(或者一些整合包)使用高版本的java可能会造成无法启动的问题。也就说对于一些游戏版本需要指定对应的Java版本。

小声BB:我自己都感觉自己事好多,这么多事怎么不自己去提交PR啊
作者辛苦了

Launch Args relates to `Quick Play` always added when launching

Since Minecraft Snapshot 23w14a, there's a new feature called the Quick Play Mode, it simply allow the game to join a specific server/local world/realms instantly after the game has finished its launching and initialization progress, and this such feature is implemented by adding launching arguments, check this by Mojang for details.

But while using CMCL to launch a newer version of Minecraft, say 1.20, these arguments that relate to the Quick Launch was always added.

--quickPlayPath ${quickPlayPath} --quickPlaySingleplayer ${quickPlaySingleplayer} --quickPlayMultiplayer ${quickPlayMultiplayer} --quickPlayRealms ${quickPlayRealms}

Which causing the game to run into the Quick Launch mode with no target level given and showing up like this.

image

To solve this, just not adding these arguments as always, but additionally. Maybe even add related settings to the config file?

##update##

Located problem in src\main\java\com\mrshiehx\cmcl\modules\MinecraftLauncher.java, cauze you've done this minecraftArguments.addAll(argus); at ln278, the arguments relate to the quick play will just added into the minecraftArguments from the minecraftVersionJsonFile of the newer versions of the Minecraft. To fix, you can add a filter while reassembling the launch arguments at ln311, within the for iterator.

I mean, add a settings into the config(cmcl.json), and if the user actually set the quickplay to true and provided the target world/server for the quick play in the config file, then assemble all the arguments like the current code from ln311 ~ ln316, and then complete them using the code pattern like the current one for enabling the quick play, elseif the user provided the incomplete information for the quick play, or just set it to false, then just cut off those arguments in the for iterator at ln311 ~ ln316 by filtering out those argument.key by the keyword quickPlay, if found, abandon those keys and their value.

Here is the code simply modified by my self, it removes any arguments relate to quick play therefore fixed the issue in a hard-coded way.

(line 310 in src\main\java\com\mrshiehx\cmcl\modules\MinecraftLauncher.java)

   for (Argument argument : arguments1) {
       if(!((String)argument.key).contains("quickPlay")){
           minecraftArguments.add("--" + argument.key);
           if (argument instanceof ValueArgument) {
               minecraftArguments.add(((ValueArgument) argument).value);
           }
       }
   }

One step forward, we can add a variable to represent whether or not enabling the quick play, so we can change the behavior of the code, like this

   boolean enableQuickPlay = false;

   for (Argument argument : arguments1) {
       if(!((String)argument.key).contains("quickPlay") || enableQuickPlay){
           minecraftArguments.add("--" + argument.key);
           if (argument instanceof ValueArgument) {
               minecraftArguments.add(((ValueArgument) argument).value);
           }
       }
   }

and then if it got enabled, fill up those values (don't forget to dock these values to the config and read them from it)

       ...
       if (s.contains(source = "${quickPlayPath}")) {
          minecraftArguments.set(i, s = s.replace(source, String.valueOf(quickPlayPath)));
       }
       ...

and that's it.

登录的名字

我使用 CMCL.exe -l -o PaltryLicense14 登录后再进入游戏,却发现名字变成了 XPlayer ,请大佬帮忙解决一下。

archlinux无法正常登陆microsoft帐号

系统:archlinux
图形化桌面:xorg-xinit i3(只装了这个桌面)
java:java17(pacman安装)
过程:
请在浏览器内登录您的微软账号,
如果登录成功,请返回到此处,等待完成登录。
登录需要一定的时间,请耐心等待。
Jun 14, 2022 11:45:51 PM fi.iki.elonen.NanoHTTPD$Response send
SEVERE: Could not send response to the client
java.net.SocketException: Broken pipe
at java.base/sun.nio.ch.NioSocketImpl.implWrite(NioSocketImpl.java:420)
at java.base/sun.nio.ch.NioSocketImpl.write(NioSocketImpl.java:440)
at java.base/sun.nio.ch.NioSocketImpl$2.write(NioSocketImpl.java:826)
at java.base/java.net.Socket$SocketOutputStream.write(Socket.java:1035)
at java.base/java.io.OutputStream.write(OutputStream.java:127)
at fi.iki.elonen.NanoHTTPD$Response$ChunkedOutputStream.write(NanoHTTPD.java:1442)
at fi.iki.elonen.NanoHTTPD$Response$ChunkedOutputStream.write(NanoHTTPD.java:1435)
at java.base/java.util.zip.GZIPOutputStream.writeHeader(GZIPOutputStream.java:185)
at java.base/java.util.zip.GZIPOutputStream.(GZIPOutputStream.java:97)
at java.base/java.util.zip.GZIPOutputStream.(GZIPOutputStream.java:112)
at fi.iki.elonen.NanoHTTPD$Response.sendBodyWithCorrectEncoding(NanoHTTPD.java:1663)
at fi.iki.elonen.NanoHTTPD$Response.sendBodyWithCorrectTransferAndEncoding(NanoHTTPD.java:1654)
at fi.iki.elonen.NanoHTTPD$Response.send(NanoHTTPD.java:1624)
at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:957)
at fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:192)
at java.base/java.lang.Thread.run(Thread.java:833)

java.io.FileNotFoundException: cmcl.json (Permission denied)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:293)
at java.base/java.io.FileOutputStream.(FileOutputStream.java:235)
at java.base/java.io.FileWriter.(FileWriter.java:113)
at com.mrshiehx.cmcl.utils.Utils.saveConfig(Utils.java:333)
at com.mrshiehx.cmcl.modules.account.loginner.MicrosoftAccountLoginner.lambda$loginMicrosoftAccount$0(MicrosoftAccountLoginner.java:164)
at com.mrshiehx.cmcl.server.MicrosoftAuthenticationServer.lambda$serve$0(MicrosoftAuthenticationServer.java:48)
at java.base/java.lang.Thread.run(Thread.java:833)
登录账号成功
~/CMCL1.19  sudo -u funny java -jar CMCL.jar
未选择账号。请登录了您的账号之后,使用“-account -p”列出账号,记住您要选择的账号的序号,然后使用“-account <序号>”选择账号;或者在登录账号命令后面加上“-s”的参数。
~/CMCL1.19  sudo -u funny java -jar CMCL.jar -p
不正确的用法。
使用选项 -usage 或 -help 以获得使用手册。
~/CMCL1.19 
所以如何解决这个问题,我无法登陆

微软登录显示正版账号登录失败

登录正版账号失败: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

建议增加参数

建议安装forge的指令可以有一个参数指定forge版本从而跳过手动选择,方便实现全自动

相对路径

暂不支持相对路径。日常使用的时候会有一点点麻烦(如图)
顺便问下Discussions去哪了
image

无法启动安装好的1.19

启动后出现这样的情况:找不到原生依赖库(natives)目录或为空,您需要使用“-version -n <版本名称>”下载原生依赖库文件以启动游戏。按照指示来做后依然不行

快速进入游戏

1.20.1中未设置“快速进入游戏”选项,但在启动Minecraft后收到“无法快速加入游戏”提示
图片
Minecraft 1.20.1 安装Optifine(没装也是这样)
系统 Arch Linux,使用X11环境的KDE Plasma
qpLogFile qpSaveName项均为null
完整配置如图(账户信息打码)
图片

设置了版本隔离后无法启动包含forge的游戏

控制台输出

C:\Users\ARROWDANNAD>cmcl 1.19.2-养老
启动版本:1.19.2-养老 (1.19.2) | 登录账号:arrowdannad (微软账户) | Java 路径:D:\JAVA\java17\bin\java.exe
游戏跟随启动器退出:false | 全屏:false | 最大内存:4041MB | 窗口宽:854 | 窗口高:480 | 启动前检查账号:true
游戏目录:C:\Users\ARROWDANNAD.minecraft\versions\1.19.2-养老
资源目录:C:\Users\ARROWDANNAD.minecraft\assets
资源包目录:C:\Users\ARROWDANNAD.minecraft\resourcepacks

启动游戏中...
WARNING: Unknown module: cpw.mods.securejarhandler specified to --add-exports
WARNING: Unknown module: cpw.mods.securejarhandler specified to --add-opens
WARNING: Unknown module: cpw.mods.securejarhandler specified to --add-opens
Exception in thread "main" java.lang.ExceptionInInitializerError
at cpw.mods.niofs.union.UnionFileSystemProvider.newFileSystemInternal(UnionFileSystemProvider.java:115)
at cpw.mods.niofs.union.UnionFileSystemProvider.newFileSystem(UnionFileSystemProvider.java:105)
at cpw.mods.jarhandling.impl.Jar.(Jar.java:84)
at cpw.mods.jarhandling.SecureJar.from(SecureJar.java:70)
at cpw.mods.jarhandling.SecureJar.from(SecureJar.java:66)
at cpw.mods.jarhandling.SecureJar.from(SecureJar.java:58)
at cpw.mods.jarhandling.SecureJar.from(SecureJar.java:50)
at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:84)
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field static final java.lang.invoke.MethodHandles$Lookup java.lang.invoke.MethodHandles$Lookup.IMPL_LOOKUP accessible: module java.base does not "opens java.lang.invoke" to unnamed module @574caa3f
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
at cpw.mods.niofs.union.UnionFileSystem.(UnionFileSystem.java:45)
... 8 more
游戏结束

C:\Users\ARROWDANNAD>

[建议]删除MCBBS源

目前MCBBS已关站,镜像下载源同时不可用,MCBBS源存留没有任何意义,申请删除

Since the snapshot 22w16b, it seems the launcher do not work properly and causing crashes.

Using the following commands to install the version 22w16b, and launch that version normally, you will get the crashes.

java -jar .\CMCL.jar -install 22w16b

...
Copy the native dependency libraries complete
Install the new version complete

java -jar .\CMCL.jar 22w16b

Starting game...
...
Game crash possible error: This error may occur because some of the native dependency library are missing or damaged, please re-download native dependency libraries via "-version -n " to fix this problem.

Following the tip:

java -jar .\CMCL.jar -version -n 22w16b

...
Copy the native dependency libraries complete
Download native dependency libraries complete

And relaunch the game:
java -jar .\CMCL.jar 22w16b

Starting game...
[19:04:00] [main/INFO]: Building optimized datafixer
[19:04:01] [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.
[19:04:01] [Render thread/INFO]: [STDERR]: [LWJGL] Enable debug mode with -Dorg.lwjgl.util.Debug=true for better diagnostics.
[19:04:01] [Render thread/INFO]: [STDERR]: [LWJGL] Enable the SharedLibraryLoader debug mode with -Dorg.lwjgl.util.DebugLoader=true for better diagnostics.
Exception in thread "Render thread" [19:04:02] [Render thread/INFO]: [STDERR]: java.lang.NoClassDefFoundError: Could not initialize class com.mojang.blaze3d.systems.RenderSystem
[19:04:02] [Render thread/INFO]: [STDERR]: at ac.a(SourceFile:65)
[19:04:02] [Render thread/INFO]: [STDERR]: at ecu.a(SourceFile:2289)
[19:04:02] [Render thread/INFO]: [STDERR]: at ecu.a(SourceFile:2284)
[19:04:02] [Render thread/INFO]: [STDERR]: at net.minecraft.client.main.Main.main(SourceFile:207)
Game finished

The Error still remains.

After a simple check I found that in folder .minecraft\versions\22w16b\natives-windows
there are only 2 dlls in there.[SAPIWrapper_x64.dll, SAPIWrapper_x86.dll]

It seems like the launcher failed in copying the dependencies / libraries to the \natives-windows\ and causing the game unable to launch.

I manually copy the dlls in [previous_version_name]\natives-windows\ to 22w16b\natives-windows\ , and that dosen't work and got a super-long crash report from Minecraft and contains a lot of unrecognizable characters.

I think in this version of minecraft, mojang uses the newer version of these dependencies, and here is the download log from Mojang official launcher when you are trying to install the 22w16b:

Downloaded https://libraries.minecraft.net/com/mojang/datafixerupper/5.0.28/datafixerupper-5.0.28.jar to ...
Downloaded https://libraries.minecraft.net/org/lwjgl/lwjgl/3.3.1/lwjgl-3.3.1.jar to ...
Downloaded https://libraries.minecraft.net/org/lwjgl/lwjgl-jemalloc/3.3.1/lwjgl-jemalloc-3.3.1.jar to ...
Downloaded https://libraries.minecraft.net/org/lwjgl/lwjgl-openal/3.3.1/lwjgl-openal-3.3.1.jar to ...
Downloaded https://libraries.minecraft.net/org/lwjgl/lwjgl-opengl/3.3.1/lwjgl-opengl-3.3.1.jar to ...
Downloaded https://libraries.minecraft.net/org/lwjgl/lwjgl-glfw/3.3.1/lwjgl-glfw-3.3.1.jar to ...
Downloaded https://libraries.minecraft.net/org/lwjgl/lwjgl-stb/3.3.1/lwjgl-stb-3.3.1.jar to ...
Downloaded https://libraries.minecraft.net/org/lwjgl/lwjgl-tinyfd/3.3.1/lwjgl-tinyfd-3.3.1.jar to ...
Downloaded https://libraries.minecraft.net/org/lwjgl/lwjgl/3.3.1/lwjgl-3.3.1-natives-windows.jar to ...
Downloaded https://libraries.minecraft.net/org/lwjgl/lwjgl-jemalloc/3.3.1/lwjgl-jemalloc-3.3.1-natives-windows.jar to ...
Downloaded https://libraries.minecraft.net/org/lwjgl/lwjgl-openal/3.3.1/lwjgl-openal-3.3.1-natives-windows.jar to ...
Downloaded https://libraries.minecraft.net/org/lwjgl/lwjgl-opengl/3.3.1/lwjgl-opengl-3.3.1-natives-windows.jar to ...
Downloaded https://libraries.minecraft.net/org/lwjgl/lwjgl-glfw/3.3.1/lwjgl-glfw-3.3.1-natives-windows.jar to ...
Downloaded https://libraries.minecraft.net/org/lwjgl/lwjgl-tinyfd/3.3.1/lwjgl-tinyfd-3.3.1-natives-windows.jar to ...
Downloaded https://libraries.minecraft.net/org/lwjgl/lwjgl-stb/3.3.1/lwjgl-stb-3.3.1-natives-windows.jar to ...

So I manually download the objects that contain the "natives-windows" and unpack the jars, put the dlls into 22w16b\natives-windows\ , launch the game again using
java -jar .\CMCL.jar 22w16b
and it solved.

The library packs I used are in this zip, and their download URL are in the log from the mojang launcher.
native-windows.zip

I can't give a code-level solution or opinion because I don't know Java, but in my coding experience it's pretty easy to solve.

[建议] 增加对forge和fabric等加载器的更新的卸载功能

目前在cmcl使用只能第一次安装,之后想要卸载或者修改加载器的版本,只能重新安装。
并且如果直接把文件夹复制到其他启动器上会出现错误
在hmcl上会出现 没有安装加载器的时候无法安装加载器 的错误

[Problem] 关于外置登录一个账号对应多个角色的问题

CMCL版本

CMCL 1.1

皮肤站版本

Blessing Skin 6.0.0-rc2
理论上支持一个账号多角色的应该都有这个问题

问题描述

对于支持一个账号支持多个角色的外置登录皮肤站,在使用cmcl进行外置登陆时无法指定角色而导致失败

问题复现

  1. 选择一个皮肤站,在同一账号下创建>2的角色数量
  2. 在cmcl上使用邮箱或者指定用户名进行外置登录 cmcl -account -l -a -d "https://<皮肤站域名>/api/yggdrasil"
  3. 报错:登录失败,请选择一个可用的角色后重试。

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.