Add NeoForge build target for MC 1.21.1 / 26.1+, multi-version release workflow, and Windows build fix#34
Open
GaborWnuk wants to merge 5 commits into
Open
Add NeoForge build target for MC 1.21.1 / 26.1+, multi-version release workflow, and Windows build fix#34GaborWnuk wants to merge 5 commits into
GaborWnuk wants to merge 5 commits into
Conversation
…h and surface Gradle output when no jar is produced
…er mode 26, and build it in CI
…Minecraft versions
…ons, and a dedication
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.
What this adds
Immersive Vehicles has shipped NeoForge builds for a while (1.21.1, and 26.1.2 since May 2026),
but this repo could only produce Forge 1.16.5 and 1.12.2 jars — so there was no official pack
jar that loads on NeoForge. On NeoForge the pack has to be a real mod:
InterfaceCore.getPackResourceresolves pack assets through the game classloader, so a plain assets jar isn't enough, and FML on
26.1 dropped
lowcodefml, so the jar needs a compiled@Modclass again.This PR adds that build target plus a release pipeline, in four independent pieces (one commit each):
1. Fix the 1.16.5 build on Windows
Runtime.exec("gradlew.bat build")fails on current Windows/Java setups (newer JDK 8 builds andmachines with
NoDefaultCurrentDirectoryInExePath=1no longer resolve bare.batnames againstthe working directory), and the failure was silent because the Gradle output was captured but never
printed. The wrapper is now invoked as
cmd /c .\gradlew.bat build, and if no jar is produced theGradle output is printed so the cause is visible.
2. NeoForge pack target (
java PackCompiler 26, aliasneo)NeoForgePackLoaderdummy class per pack (same trick asForgePackLoader, but with thenet.neoforged.fml.common.Modannotation), compiled againstFML
11.0.15downloaded once from the NeoForged maven and cached underbuild/.--release 8, so the class loads on Java 21 (1.21.1) and Java 25 (26.1+) alike.A JDK 25+ compiler is required to run this mode (FML 11 class files are Java 25 format);
the script checks and explains this. Default no-arg behavior is unchanged — existing JDK 8
workflows are unaffected.
neoforge/neoforge.mods.toml(javafml[1,),mts [22.6.0,)— same floor as theCurseForge 1.21.1 pack file) with the version substituted from
build.gradleat build time,and
neoforge/pack.mcmetausing the 26.1min_format/max_formatscheme(resources 84.0 / data 101.1).
MTS Official Pack-neoforge-<ver>.jar.build.yml) builds it in a JDK 25 step after the existing JDK 8 steps.3. Release workflow (
release.yml)Pushing a
V*/v*tag builds everything and attaches per-version files to a GitHub Release,named the same way the pack is published on CurseForge:
loaderVersion [36,)spans FML 36–46, same as the CurseForge files)workflow_dispatchruns the same build as a dry run (artifacts only, no release).4. README
Pack description (based on the Modrinth page), supported-versions table, and build instructions
for all
PackCompilermodes.How it was tested
(LegacyCompatSystem log lines reference pack models), server reaches
Done.mtsinstalled the loader fails cleanly with"Mod mtsofficialpack requires mts".
java PackCompiler) re-verified under JDK 8 → 1.16.5 + 1.12.2 jars as before.seven files: https://github.com/GaborWnuk/MTSOfficialPack/releases/tag/V25
Unrelated observations (not addressed here)
src/main/resources/META-INF/mods.tomlsaysversion="24"whilebuild.gradleisV25.mts:advancement/*.jsonfiles fail to parse on 26.1.2 (reproduces withoutany pack installed) — happy to open an issue on the core repo with logs if useful.