-
-
Notifications
You must be signed in to change notification settings - Fork 565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow joining servers to work on 1.20 #1164
Conversation
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
about that meta commit: maybe try to detect the presence of these instead |
i did consider that, seems a bit complex though and maybe actually less safe |
Meta commit when |
I think the meta commit shouldvset the trait based off the presence of the rules not a timestamp. But otherwise this looks good |
I removed it from the milestone as I think we really need to get 7.1 out. |
I think long term, we should work on adopting Mojang's minecraftArgs data structure instead of throwing it away in meta and doing workarounds like this in Prism |
that sounds like a good idea! considering joining servers is broken isn't this good enough for now though? this would require changing the format of components :/ not a bad thing, but would be non-trivial |
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
is this pr just dead? |
Can we just merge it because it works and clearly nothing else has been done since? |
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
@TheKodeToad can you have a look at my meta PR: PrismLauncher/meta#31 it implements what you described but instead uses the game arguments |
@Scrumplex is this what you were talking about? I thought you meant to change the launcher-side implementation to be able to recognise the official arg format. |
Yeah I meant changing the meta format (perhaps reengineering it from scratch) so that we just support Mojang's arg format like most other launchers |
Can we go with that patch until we rewrite the meta in rust? |
can this be merged, please? would love if Prism supported this feature at all, even if it's not the most elegant way |
I could very much use this feature at the moment too, and was actually surprised when I found out that it was documented but not working. |
For personal use, I duct-taped a hard-coded version of this commit on Gentoo Linux by placing this diff: diff --git a/launcher/minecraft/MinecraftInstance.cpp b/launcher/minecraft/MinecraftInstance.cpp
index 7cb4100..e752615 100644
--- a/launcher/minecraft/MinecraftInstance.cpp
+++ b/launcher/minecraft/MinecraftInstance.cpp
@@ -658,8 +658,7 @@ QStringList MinecraftInstance::processMinecraftArgs(AuthSessionPtr session, Mine
}
if (serverToJoin && !serverToJoin->address.isEmpty()) {
- args_pattern += " --server " + serverToJoin->address;
- args_pattern += " --port " + QString::number(serverToJoin->port);
+ args_pattern += " --quickPlayMultiplayer " + serverToJoin->address + ':' + QString::number(serverToJoin->port);
}
QMap<QString, QString> token_mapping;
diff --git a/libraries/launcher/org/prismlauncher/launcher/impl/StandardLauncher.java b/libraries/launcher/org/prismlauncher/launcher/impl/StandardLauncher.java
index 1869091..f5335bc 100644
--- a/libraries/launcher/org/prismlauncher/launcher/impl/StandardLauncher.java
+++ b/libraries/launcher/org/prismlauncher/launcher/impl/StandardLauncher.java
@@ -76,10 +76,8 @@ public final class StandardLauncher extends AbstractLauncher {
}
if (serverAddress != null) {
- gameArgs.add("--server");
- gameArgs.add(serverAddress);
- gameArgs.add("--port");
- gameArgs.add(serverPort);
+ gameArgs.add("--quickPlayMultiplayer");
+ gameArgs.add(serverAddress + ':' + serverPort);
}
// find and invoke the main method —into Prior to this, when I tried to pass the I'm 99% sure I just missed an option somewhere in the launcher, but the ability to pass arguments direct might be another possible solution to this problem if the maintainer doesn't want to hack something into the meta package so that one could do something like this: $ prismlauncher --launch "1.20.4 Creative FAWE" -x "--quickPlayMultiplayer='127.0.0.1:31337'"` |
I was able to find this comment on a related issue that has fixed it for me without having to compile a custom version. It's a bit hacky with you having to edit the json for the minecraft version, but it at least worked for what I'm doing. |
Anying as is I made a meta PR with just the patch that Kode mentioned:PrismLauncher/meta#38 |
closing this in favor of: #1164 as the meta PR was merged for that one |
I swear I'm not copying everything arthomnix does
Suggested commit on meta:
I can open another PR if it's better