• 3/8/12 4:24 pm
- 1.6k views • 0 today
- 6
- 1
- 7
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 ;)
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
651686
6


Have something to say?
I use a mac so i might be able to use terminal to use that code to fix up my mod's code