Fixes several bugs in IndustrialCraft2 using binary patches.
Note that you may NOT distribute any decompiled code generated by this tool. For more information, see IC2's license.
You can find lists of patches for each supported IC2 Version here.
- IC2-2.8.221 and above
- IC2-2.8.164
- Clone the repository.
- Run the
setupgradle task found inenv setup.
This will set up bothIC2-BaseandIC2-Patchedprojects, which contain clean and patched code respectively.
Note that while this code will compile, it's highly unstable and might not work on your OS / IDE.
After making changes to the code, run the generatePatches task of the IC2-Patched project to generate the patches for currently set IC2 version. This has to be done manually every time you make changes.
To add support for a new version of IC2:
-
Change IC2 version in
gradle.propertiesfile. -
Create a new Folder in root of project 'IC2-Base' and 'IC2-Patched' with name in the following format:
patches[minVersion,maxVersion]where:- minVersion - Minimum version of IC2 that those patches are meant to be applied to, inclusive.
- maxVersion - Maximum version of IC2 that those patches are meant to be applied to, exclusive.
Example:
patches[2.8.164, 2.8.165]-> Folder for patches for IC2 version 2.8.164-exp112
It's recommended to copy over patches from the closest supported version and resolve issues from there. -
Run the
setupgradle task found inenv setup.- If
IC2-Baseproject fails to compile, resolve all issues generated by Compiler and run thegeneratePatchesgradle task found inIC2-Baseproject. This will generate patches that will be applied after IC2-Base de-compilation step.
Take note that while this process will allow the code to compile, the code might have been decompiled incorrectly in the first place, and cause the dev env game to not launch successfully. It's recommended to use the other decompilation tool to diagnose and correct the mistake. - If
IC2-Patchedproject fails to compile, remove patches that aren't getting applied properly, and if relevant, port them to the currently used IC2 version.
- If
-
After making changes to the code, run
generatePatchestask of theIC2-Patchedproject to generate the patches.
- Run the
generateBinPatchestask of the IC2-Patched project for each version you have done changes to.- Make sure there aren't overlapping folders from previously generated patches!
- Run
gradlew buildto build the patcher. The resulting jar will be located in thebuild/libsfolder.
Remember that the jar build by thejartask will NOT work outside the dev environment.
All code is licensed under The Unlicense, except for mods.su5ed.ic2patcher.asm.BinPatchManager, which is a modified version
of MinecraftForge's ClassPatchManager class, and is licensed under the GNU Lesser General Public License version 2.1