Skip to content

Instantly share code, notes, and snippets.

@gigaherz
Last active April 23, 2024 02:59
Show Gist options
  • Save gigaherz/6fc52ee532f36ec432db62458c1620b5 to your computer and use it in GitHub Desktop.
Save gigaherz/6fc52ee532f36ec432db62458c1620b5 to your computer and use it in GitHub Desktop.
Simple steps on how to update a forge mod from 1.16.5 to 1.17.1

The steps I follow to update my mods, and work for me:

step 1: I make a copy of the entire folder (or git clone... a branch works too but I don't like to use different-version branches in the same clone)

step 2: I copy over the gradle folder and gradlew scripts from the MDK, nothing else

step 3: I edit the build.gradle to use FG 5.1+

step 4: I open a cmd window with java16 in the JAVA_HOME

step 5: I run [OPTIONAL, IF YOU ARE ALREADY ON 1.16.5 OFFICIAL NAMES SKIP]

gradlew -PUPDATE_MAPPINGS=1.16.5 -PUPDATE_MAPPINGS_CHANNEL=official updatemappings

step 6: I edit the build.gradle mappings line to: [THIS IS IMPORTANT!!]

mappings channel: 'official', version: '1.16.5'

NOTE: You may want to verify that your code compiles, before continuing. If the code fails to compile then the updateClassnames may fail and mess up your code.

step 7: I add this line after the apply plugin lines in your build.gradle

apply from: 'https://raw.githubusercontent.com/SizableShrimp/Forge-Class-Remapper/main/classremapper.gradle'

[for more information about this, see https://github.com/SizableShrimp/Forge-Class-Remapper ]

step 8: I run

gradlew -PUPDATE_CLASSNAMES=true updateClassnames

step 9: I change the build.gradle mappings line to

mappings channel: 'official', version: '1.17.1'

step 10: I change the

sourceCompability = ... = '1.8' 

line to

java.toolchain.languageVersion = JavaLanguageVersion.of(16)

step 11: I change the forge dependency to

minecraft 'net.minecraftforge:forge:1.17.1-37.0.15' // [USE LATEST HERE, .15 WAS LATEST AT THE TIME OF WRITING]

step 12: Import into intellij, changing intellij's project SDK to java16, and making use the gradle jre uses the project JDK too

step 13: Run

gradlew genIntellijRuns

step 14+: fix code and test

@SkyBlade1978
Copy link

Thanks, this was very helpful

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