Minecraft Modding: Upgrading from 1.10 to 1.12.1

Background


There are some general practices for figuring out how to upgrade your code which I've explained in Jabelar's Updating Your Mod tutorial.

Otherwise, here is a list of some specific things I've noticed about transitioning from 1.10.x to 1.12.x. Hopefully these will give you some ideas to further help upgrade your own code.

Method Names Simplified


There were many method names that were a bit redundant. For example, in the ICommand interface there was a getCommandName() method. This is now changed to simply getName(). This sort of simplification has happened in many method names.

Registry Events


Previously, you would register things like custom blocks, items, potions, recipes, etc. in the FML lifecycle event handlers (a.k.a. "pre-init", and "init") which were often managed with a proxy class.

As of 1.12, there are now specific events for these. So you should move your registration code accordingly. See the official documentation on registry events for more information.

Note that unfortunately they haven't moved everything to this system, so some things like entities are still registered in the life-cycle events.

Resource Format 3


They have now introduced resource format 3, which has the primary effect of requiring all assets to be fully lower case names. This particularly affects .lang files so you need to rename en_US.lang to en_us.lang, etc.

However, resource format 3 isn't applied unless you specify it in your pack.mcmeta file. If you don't have a pack.mcmeta file it will default back to format 2, but it is better to update by adding a proper pack.mcmeta file and renaming your assets accordingly. You can simply copy the pack.mcmeta from a current MDK distribution from Forge files download site.

JSON Recipes

Crafting recipes are now defined with JSON files as resources. This will require a decent amount of work to convert your existing recipes to the new system. See my tutorial on recipes for more information.

Advancements Replace Achievements


The Achievement system has been replaced by the Advancement system. This will require a decent amount of work to convert your existing achievements to the new system. See my tutorial on advancements for more information.

DataManager Replaces the DataWatcher


The data watcher was a system for syncing small bits of information between client and server. The DataWatcher system has been replaced with the DataManager. The methods are different so you should look at the vanilla entities to understand how it is used.

1 comment:

  1. If you are playing Minecraft, the most exciting survival game today, install the MOD version for this game as it will bring you a new and exciting feeling when playing the game.
    Install Minecraft PE - Mod for your Andorid device now

    ReplyDelete