Skip to content
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

Correct ConnectScreen.BLOCKED_HOST_TEXT -> ConnectScreen.UNKNOWN_HOST_TEXT #3781

Merged
merged 2 commits into from
Feb 8, 2024

Conversation

NoahvdAa
Copy link
Contributor

@NoahvdAa NoahvdAa commented Feb 5, 2024

Although this text component is used when a server has been blocked by Mojang, it's also shown when no IP addresses can be found for the specified hostname, as can be shown in this excerpt from the MultiplayerServerListPinger class:

Optional<InetSocketAddress> optional = AllowedAddressResolver.DEFAULT.resolve(serverAddress).map(Address::getInetSocketAddress);
if (optional.isEmpty()) {
    this.showError(ConnectScreen.BLOCKED_HOST_TEXT, entry);
} else {

The default resolver will return an empty optional both when the server is blocked and when no A and AAAA records are found.

@@ -13,7 +13,7 @@ CLASS net/minecraft/class_412 net/minecraft/client/gui/screen/multiplayer/Connec
FIELD field_2412 parent Lnet/minecraft/class_437;
FIELD field_2413 status Lnet/minecraft/class_2561;
FIELD field_32238 NARRATOR_INTERVAL J
FIELD field_33736 BLOCKED_HOST_TEXT Lnet/minecraft/class_2561;
FIELD field_33736 UNKNOWN_HOST_TEXT Lnet/minecraft/class_2561;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would argue to name this UNKNOWN_BLOCKED_HOST_TEXT

Copy link
Contributor

@haykam821 haykam821 Feb 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think UNKNOWN_HOST_TEXT is a good name. The text is the following, which translates as 'Unknown host':

public static final Text BLOCKED_HOST_TEXT = Text.translatable("disconnect.genericReason", Text.translatable("disconnect.unknownHost"));

@haykam821 haykam821 added the update-base Add this label to a pull request to automatically change the target branch to the default branch. label Feb 8, 2024
@github-actions github-actions bot changed the base branch from 24w05b to 24w06a February 8, 2024 20:07
Copy link
Contributor

github-actions bot commented Feb 8, 2024

🚀 Target branch has been updated to 24w06a

Copy link
Contributor

github-actions bot commented Feb 8, 2024

🚨 Unable to automatically update branch with the latest changes

@github-actions github-actions bot added snapshot A PR that targets a snapshot version of Minecraft and removed update-base Add this label to a pull request to automatically change the target branch to the default branch. labels Feb 8, 2024
@modmuss50 modmuss50 added the update-base Add this label to a pull request to automatically change the target branch to the default branch. label Feb 8, 2024
Copy link
Contributor

github-actions bot commented Feb 8, 2024

🎉 Target branch is already set to 24w06a

Copy link
Contributor

github-actions bot commented Feb 8, 2024

🚨 Unable to automatically update branch with the latest changes

@github-actions github-actions bot removed the update-base Add this label to a pull request to automatically change the target branch to the default branch. label Feb 8, 2024
@modmuss50
Copy link
Member

modmuss50 commented Feb 8, 2024

Im not sure why its failing to merge, ive done it manually.

@Shnupbups Shnupbups merged commit 3a9d56c into FabricMC:24w06a Feb 8, 2024
3 checks passed
@NoahvdAa NoahvdAa deleted the patch-1 branch February 8, 2024 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
snapshot A PR that targets a snapshot version of Minecraft
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants