Cover image
Try Now
2022-02-09

Remaps MCP classnames to Mojmaps for 1.17+ and in reverse.

3 years

Works with Finder

1

Github Watches

10

Github Forks

41

Github Stars

Forge-Class-Remapper

Forge-Class-Remapper helps you remap your Forge mod to use Mojang classnames on 1.17+ or MCP classnames on 1.16 and lower. This is intended is for helping you update your mod from 1.16 or lower to 1.17 or higher, or in the opposite direction. Forge 1.17 moved to using Mojang classnames as Mojang mappings are now the default mappings used with Forge. Forge 1.16 and lower uses MCP classnames. For more information, see here. This script only automates what would otherwise be very hard to do manually, remap ALL the classnames for you. This script also remaps your access transformer files.

Note: You MUST run this BEFORE updating/downgrading your Forge version

This script has to be the first thing you run, otherwise it won't work.

How to use this

1. Make a backup!

This script changes your mod's sourcecode. You should make a backup in case anything goes wrong. If not already, using Git or another version control system is highly recommended, even if private. You have been warned.

2. Update your ForgeGradle version (if not already)

This script uses tasks and other things from ForgeGradle 5. You must be on ForgeGradle 5 for this to work correctly. Update this line in your build.gradle and change the old number to 5.1.+.

        classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true

Go to gradle/wrapper/gradle-wrapper.properties and change the line starting with distributionUrl to be:

distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip

3. Update your mappings to official (if not already)

This script only remaps classnames and not methods or fields. For best results, you should be using official mappings in ForgeGradle before running this script using the Minecraft version before porting. For example, on 1.16.5, this can be achieved by running the following command:

gradlew -PUPDATE_MAPPINGS_CHANNEL="official" -PUPDATE_MAPPINGS="1.16.5" updateMappings

Then, change the mappings line in your build.gradle to this line:

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

4. Add this line to your build.gradle

This script can be used by adding the following line to your build.gradle:

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

This should be near the top of the file below ALL other plugins. Here is an example:

apply plugin: 'net.minecraftforge.gradle'
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply from: 'https://raw.githubusercontent.com/SizableShrimp/Forge-Class-Remapper/main/classremapper.gradle'

5. Run this command

After adding the above line, you are now ready to update your classnames by running a Gradle task. The gradle task can be run as follows:

gradlew -PUPDATE_CLASSNAMES=true updateClassnames

By default, this will only apply to the main sourceset. If you have an api sourceset or other sourcesets, you can add these as well using the UPDATE_SOURCESETS property. This is a semicolon-separated list that can be defined, for example, as -PUPDATE_SOURCESETS="main;api" and would be inserted into the above command.

If you are backporting a mod from 1.17 or later to 1.16 or earlier, add -PREVERSED=true. This will convert the classnames from Mojang back to MCP.

6. Update Forge and mappings

You should now update your Forge version and mappings to match the Minecraft version you are updating to. For example, if you are now developing for 1.17.1, your mappings line should look like this:

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

You can find the latest Forge version for a given Minecraft release here.

7. Done!

Afterwards, your mod should now have new classnames! You can now delete the apply from: line from your build.gradle and continue updating/backporting your mod. Happy modding!

If you have any issues, feel free to contact me on Discord @ SizableShrimp#0755 or ask in the Forge discord.

相关推荐

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • https://reddgr.com
  • Delivers concise Python code and interprets non-English comments

  • 林乔安妮
  • A fashion stylist GPT offering outfit suggestions for various scenarios.

  • 1Panel-dev
  • 💬 MaxKB is a ready-to-use AI chatbot that integrates Retrieval-Augmented Generation (RAG) pipelines, supports robust workflows, and provides advanced MCP tool-use capabilities.

  • open-webui
  • User-friendly AI Interface (Supports Ollama, OpenAI API, ...)

  • ShrimpingIt
  • Micropython I2C-based manipulation of the MCP series GPIO expander, derived from Adafruit_MCP230xx

  • Dhravya
  • Collection of apple-native tools for the model context protocol.

  • Mintplex-Labs
  • The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, No-code agent builder, MCP compatibility, and more.

  • GLips
  • MCP server to provide Figma layout information to AI coding agents like Cursor

  • activepieces
  • AI Agents & MCPs & AI Workflow Automation • (280+ MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

    Reviews

    5 (1)
    Avatar
    user_2DJie0px
    2025-04-17

    Forge-Class-Remapper is an exceptional tool for anyone working with Minecraft Forge modding. Created by SizableShrimp, it simplifies the process of class remapping, making it more efficient and less time-consuming. I highly recommend this utility for developers looking to streamline their workflow and enhance their modding capabilities.