6

[1.2.3] ModLoader renamed methods - QUICK FIX

6 diamonds

Get Embed Code

Forum:
HTML:
Link:
avatar MightyPork
Level 89 : Elite Modder
Posted 03/08/12 4:24:46 pm
03/08/12
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 ;)

Additional Details

Tags:Tutorial

More Blogs by MightyPorkView All

2012-02-26 04:18:51
by MightyPork

Join us to post comments.

Comments : 7

1 - 7 of 7

mrtopsyt
Level 5
Apprentice Miner
March 12, 2012, 11:19 am

Are your mods fixed with it?

MightyPork
Level 89
Elite Modder
March 12, 2012, 10:03 pm

Yes, thats why I made it. PowerCraft has 90 class files, it really cant be done manually.

TnT-Crew
Level 23
Expert Artist
March 12, 2012, 4:17 am

can u update custom/mighty recepise

MightyPork
Level 89
Elite Modder
March 12, 2012, 5:34 am

done :D

TnT-Crew
Level 23
Expert Artist
March 12, 2012, 8:41 am

Bless you and your epic modzzzz

Jack5324
Level 17
Journeyman Cake
March 8, 2012, 9:11 pm

What exactly does this version do?

Jt9
Level 46
Master Modder
March 8, 2012, 11:37 pm

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 - 7 of 7