feat: Show modflared indicator in server list#96
Open
hattapauzi wants to merge 4 commits intoHttpRafa:forge/1.12.2from
Open
feat: Show modflared indicator in server list#96hattapauzi wants to merge 4 commits intoHttpRafa:forge/1.12.2from
hattapauzi wants to merge 4 commits intoHttpRafa:forge/1.12.2from
Conversation
Add a client mixin for multiplayer server-list entries so servers routed through modflared display the existing indicator icon. Position the indicator away from the Forge modded-server compatibility badge and use direct visible strings for the hover and connection status text to avoid untranslated lang keys appearing in-game. Register the new mixin and keep the language entry for the server-list tooltip resource.
There was a problem hiding this comment.
Code Review
This pull request introduces a visual indicator in the multiplayer server list to show when a Cloudflare tunnel is active, implemented via a new mixin for ServerListEntryNormal. It also updates the TunnelStatus feedback mechanism and adds corresponding localization keys. Feedback suggests resetting the GL color state before rendering the indicator to prevent accidental tinting. Additionally, it is recommended to use I18n.format for the indicator tooltip and revert to TextComponentTranslation in TunnelStatus to ensure proper localization support instead of using hardcoded strings.
Reset the render color to white before binding and drawing the modflared server-list indicator. This prevents the indicator texture from inheriting tint from previous server-list rendering state or other modded indicators.
Restore localization lookups for the server-list tooltip and connection feedback while preserving English fallbacks when the legacy client returns unresolved translation keys. This addresses the review feedback without reintroducing the in-game issue where raw translation keys appeared in the UI.
Update the Forge 1.12.2 artifact version from 1.12.2-legacy.1 to 1.12.2-1 now that the branch is tested and feature complete. This changes the generated jar names to drop the legacy qualifier while preserving the mod id and build configuration.
Owner
What I meant with needs some tweaks 😃 |
HttpRafa
approved these changes
May 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Show the existing modflared indicator icon in the Minecraft 1.12.2 multiplayer server list for entries handled through a Cloudflare tunnel.
Context
The NeoForge 1.21.11 branch already exposes a visual server-list indicator when modflared is in use. The Forge 1.12.2 branch had the tunnel routing behavior, but the multiplayer server list did not show the same visual cue. This made it harder to tell which saved servers were being routed through modflared before connecting.
During testing, the indicator also needed to avoid overlapping Forge's compatible FML/modded-server badge, and visible status text needed to avoid unresolved translation keys in this legacy runtime.
Changes
ServerListEntryNormalto render the existingindicator.pngasset for servers marked as using a modflared tunnel.Key Implementation Details
The server-list indicator is drawn only when the associated
ServerDatahas aTunnelStatuswith stateUSE. The icon is placed with a fixed offset from the right side of the server row so it does not collide with Forge's own modded-server badge.Connection feedback now uses plain text components for the visible messages shown while joining, which avoids displaying keys such as
gui.tunnel.status.usewhen the legacy language lookup does not resolve them in the active launcher/runtime setup.Use Cases
Modflared in useinstead of an untranslated language key.Using Cloudflare tunnelinstead of an untranslated language key.Testing
Validated locally on the Forge 1.12.2 branch with Java 8:
Result:
Manual verification performed in a PrismLauncher Forge 1.12.2 instance with MixinBootstrap installed alongside Modflared:
Modflared in use.Using Cloudflare tunnel.Links
forge/1.12.2neoforge/1.21.11