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.

相关推荐

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

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

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

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

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

  • Lists Tailwind CSS classes in monospaced font

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • https://appia.in
  • Siri Shortcut Finder – your go-to place for discovering amazing Siri Shortcuts with ease

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

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

  • tomoyoshi hirata
  • Sony α7IIIマニュアルアシスタント

  • apappascs
  • Discover the most comprehensive and up-to-date collection of MCP servers in the market. This repository serves as a centralized hub, offering an extensive catalog of open-source and proprietary MCP servers, complete with features, documentation links, and contributors.

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

  • jae-jae
  • MCP server for fetch web page content using Playwright headless browser.

  • ravitemer
  • A powerful Neovim plugin for managing MCP (Model Context Protocol) servers

  • patruff
  • Bridge between Ollama and MCP servers, enabling local LLMs to use Model Context Protocol tools

  • pontusab
  • The Cursor & Windsurf community, find rules and MCPs

  • av
  • Effortlessly run LLM backends, APIs, frontends, and services with one command.

  • WangRongsheng
  • 🧑‍🚀 全世界最好的LLM资料总结(Agent框架、辅助编程、数据处理、模型训练、模型推理、o1 模型、MCP、小语言模型、视觉语言模型) | Summary of the world's best LLM resources.

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

  • appcypher
  • Awesome MCP Servers - A curated list of Model Context Protocol servers

    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.