Blogs Tutorial

[1.2.3] ModLoader renamed methods - QUICK FIX

  • 1.6k views 0 today
  • 6
  • 1
  • 7
MightyPork
Lvl 90Overlord Modder
3,078
ModLoader method name fix

As of 1.2, ModLoader's methods are all starting with lowercase letter, while they used uppercase before. This may not be a problem with small mods, but I had to develop some automation script for PowerCraft and other large mods.

It is uses pearl to change all ModLoader.[A-Z] to ModLoader.[a-z]

Here it is:

perl -pi -e 's/(ModLoader.)([A-Z]{1})/$1.lc($2)/ge' *.java

note that it was only tested on Linux, but I am sure there is way how to do this on windows, too.

Run this command in a folder with your sources to fix all calls.
Make sure you take a backup copy before, as if you do something wrong, you can lose your hard work (the sources).

-- I hope it will be useful


If you get bored of mods, try my GOMOKU GAME FOR 2 PLAYERS ;)

More like this

  Have something to say?

mrtopsyt
03/12/2012 3:19 pm
Level 14 : Journeyman Miner
Are your mods fixed with it?
1
MightyPork
03/13/2012 2:03 am
Level 90 : Overlord Modder
Yes, thats why I made it. PowerCraft has 90 class files, it really cant be done manually.
1
TnT-Crew
03/12/2012 8:17 am
Level 30 : Artisan Artist
can u update custom/mighty recepise
1
MightyPork
03/12/2012 9:34 am
Level 90 : Overlord Modder
done :D
1
TnT-Crew
03/12/2012 12:41 pm
Level 30 : Artisan Artist
Bless you and your epic modzzzz
1
Jack5324
03/09/2012 2:11 am
Level 24 : Expert Cake
What exactly does this version do?
1
Jt9
03/09/2012 4:37 am
Level 68 : High Grandmaster Modder
modloader 1.2.3 made its method names change. e.g. : ModLoader.AddName >>> ModLoader.addName

I use a mac so i might be able to use terminal to use that code to fix up my mod's code
1

Welcome