Skip to content

Forge 1.20.1 install fails: NoSuchMethodError ClientInstall.run(File, Predicate, File) #151

Description

@Narcissus-tazetta

Summary

Running the action against mc: 1.20.1, modloader: forge fails during the Forge client install step with:

java.lang.NoSuchMethodError: 'boolean net.minecraftforge.installer.actions.ClientInstall.run(java.io.File, java.util.function.Predicate, java.io.File)'
	at net.kunmc.lab.forgecli.impl.ClientInstall.run(ClientInstall.java:19)
	at net.kunmc.lab.forgecli.InstallerUtil.runClientInstall(InstallerUtil.java:29)
	at net.kunmc.lab.forgecli.Installer.installPost1_13(Installer.java:42)
	at net.kunmc.lab.forgecli.Installer.install(Installer.java:24)

This happens right after Installing Forge 1.20.1-47.4.23.

Root cause (verified with javap)

net.kunmc.lab.forgecli.impl.ClientInstall calls a 3-argument overload
net.minecraftforge.installer.actions.ClientInstall.run(File, Predicate, File), but the real
Forge installer jar for 1.20.1 only ever exposes a 2-argument run(File, File). I checked this
directly against the actual Forge installer jars for every 1.20.1 build from 47.1.0 through the
current latest 47.4.23 (net.minecraftforge:forge:1.20.1-<version>:installer) — all of them have:

public boolean run(java.io.File, java.io.File) throws net.minecraftforge.installer.actions.ActionCanceledException;

So this isn't a matter of picking a different/newer/older Forge 1.20.1 patch version — the 3-arg
signature forgecli expects has never existed on any 1.20.1 Forge installer. It looks like
forgecli's ClientInstall wrapper was built against a newer Forge installer API (with a
Predicate argument, presumably for library filtering) that only exists for later Minecraft
versions, and no longer supports the old-style 1.20.1-era 2-arg ClientInstall.run.

Environment

Expected

Forge 1.20.1 client install succeeds (or the README's Forge/1.20.1 support row is corrected if this
combination is actually unsupported).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions