Skip to content

fix(ci): Use Java 11 in CI workflow for ForgeGradle compatibility#97

Open
hattapauzi wants to merge 4 commits intoHttpRafa:forge/1.12.2from
hattapauzi:ci-java11-fix
Open

fix(ci): Use Java 11 in CI workflow for ForgeGradle compatibility#97
hattapauzi wants to merge 4 commits intoHttpRafa:forge/1.12.2from
hattapauzi:ci-java11-fix

Conversation

@hattapauzi
Copy link
Copy Markdown

Summary

Fix CI build failure by using Java 11 instead of Java 21, as ForgeGradle 2.3 and Gradle 4.x require the Pack200 API which was removed in Java 14.

Context

The CI workflow was configured to use Java 21, which caused the build to fail with:

Execution failed for task ':applyBinaryPatches'.
> java/util/jar/Pack200

The Pack200 API was deprecated in Java 8 and removed in Java 14. Since this project uses ForgeGradle 2.3 and Gradle 4.10.3 (an older toolchain for Minecraft 1.12.2), Java 11 is the appropriate choice as it still includes Pack200 support.

Changes

  • Changed CI workflow Java version from 21 to 11 in .github/workflows/build_publish.yml

Testing

The change can be verified by running the CI workflow, which should now complete successfully without Pack200 errors.

Links

  • Related error: java/util/jar/Pack200 in applyBinaryPatches task

hattapauzi added 4 commits May 5, 2026 13:38
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.
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.
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the mod version and introduces a visual indicator in the multiplayer server list to show when a Cloudflare tunnel is active. It also refactors translation logic to provide fallbacks when localization keys are missing. Feedback was provided regarding a version mismatch between configuration files, a potential server-side crash due to client-only mixins being registered in the common list, and a redundant null check in the translation helper.

Comment thread gradle.properties
mod_name=Modflared
mod_license=MIT
mod_version=1.12.2-legacy.1
mod_version=1.12.2-1
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The version has been updated to 1.12.2-1 here, but the Modflared.java file (line 25) still contains the old version string 1.12.2-legacy.1. Since the @Mod annotation in Modflared.java relies on that constant, the mod will still report the old version to Forge. Please ensure both are synchronized.

"client.GuiConnectingMixin",
"client.GuiConnectingThreadMixin",
"client.ServerDataMixin",
"client.ServerListEntryNormalMixin",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

This mixin targets ServerListEntryNormal, which is a client-only class. Adding it to the main mixins list in a common mixin configuration will cause a ClassNotFoundException when the mod is loaded on a dedicated server. It should be moved to the client array (line 15) to ensure it only loads on the client side. Note that other client-side mixins in this list (lines 9-13) likely share this issue.

@Unique
private static String modflared$translate(String key, String fallback) {
String translated = I18n.format(key);
if (translated == null || translated.equals(key)) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The null check translated == null is redundant. In Minecraft 1.12.2, I18n.format always returns a string; if a translation key is missing, it returns the key itself.

Suggested change
if (translated == null || translated.equals(key)) {
if (translated.equals(key)) {

@hattapauzi
Copy link
Copy Markdown
Author

Let say if this fix is successful, would it still means that MixinBootstrap still be needed as dependencies?

@HttpRafa
Copy link
Copy Markdown
Owner

HttpRafa commented May 8, 2026

We should use Java 8 because Minecraft 1.12.2 uses it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants