Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/su5ed/ic2-patcher
A tool to modify IndustrialCraft2 using binary patches
https://github.com/su5ed/ic2-patcher
Last synced: 26 days ago
JSON representation
A tool to modify IndustrialCraft2 using binary patches
- Host: GitHub
- URL: https://github.com/su5ed/ic2-patcher
- Owner: Su5eD
- License: unlicense
- Created: 2021-03-04T10:19:59.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-10-03T08:39:40.000Z (about 1 month ago)
- Last Synced: 2024-10-03T11:23:05.368Z (about 1 month ago)
- Language: Java
- Size: 1.04 MB
- Stars: 8
- Watchers: 2
- Forks: 4
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# IC2 Patcher
Fixes several bugs in IndustrialCraft2 using [binary patches](http://javaxdelta.sourceforge.net).Note that you **may NOT distribute** any decompiled code generated by this tool.
For more information, see [IC2's license](https://forum.industrial-craft.net/thread/9843-mc-1-7-ic%C2%B2-v-2-1-x-2-2-x-experimental/).### List of patches
You can find lists of patches for each supported IC2 Version [here]().#### Currently supported versions:
- IC2-2.8.221 and above
- IC2-2.8.164# Contribution
### Setting up the dev environment
1. Clone the repository.
2. Run the `setup` gradle task found in `env setup`.
This will set up both `IC2-Base` and `IC2-Patched` projects, 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.
### Generating patches for currently supported versions of IC2
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.
### Generating patches for non-supported versions of IC2
To add support for a new version of IC2:
1. Change IC2 version in `gradle.properties` file.
2. 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.
3. Run the `setup` gradle task found in `env setup`.
1. If `IC2-Base` project fails to compile, resolve all issues generated by Compiler and run the `generatePatches` gradle task found in `IC2-Base` project.
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.
2. If `IC2-Patched` project fails to compile, remove patches that aren't getting applied properly, and if relevant, port them to the currently used IC2 version.
4. After making changes to the code, run `generatePatches` task of the `IC2-Patched` project to generate the patches.
### Building & Exporting
1. Run the `generateBinPatches` task of the IC2-Patched project for each version you have done changes to.
1. Make sure there aren't overlapping folders from previously generated patches!
2. Run `gradlew build`to build the patcher.
The resulting jar will be located in the `build/libs` folder.
Remember that the jar build by the `jar` task **will NOT work** outside the dev environment.
Licensing
All code is licensed under **The Unlicense**, except for `mods.su5ed.ic2patcher.asm.BinPatchManager`, which is a modified version
of MinecraftForge's [ClassPatchManager](https://github.com/MinecraftForge/MinecraftForge/blob/1.12.x/src/main/java/net/minecraftforge/fml/common/patcher/ClassPatchManager.java) class, and is licensed under the **GNU Lesser General Public License version 2.1**