-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update IC2 maven to one that actually works * Update IC2 maven link in the main project as well. Being fair, I just forgot about this one ^^" * Patches for fixing #6 Will resolve Patch request #6 * Update IC2 Version extraction to log extracted version. Should now return cached version * Update Base Patches for 164 * Fix Batch Crafter dupes... at least most of them * Fix Batteries being ghost items when inserted into the discharge slot Fix battery-like items being ghost items when trying to be inserted into the battery slots in machines with lower energy tier, but containing Transformer upgrades. * Update Gradle to 7.5, Update ForgeGradle to 5.1.+. * Make Dev Env runs work \o/, Update Maven for FancyGradle * Create task that patches compiled jar of Patched IC2 so it boots. This task is meant to be launched only on prepareRuns, and it replaces entries complying to the regex rules with entries from the original IC2 Jar. Mainly used for assets, but also for networking classes. Note: Literally just before this commit I realized there is old patch that just comments out entirety of IC2 Networking code and that was the cause of the crashes lmao, but this is still going to be useful for... some time until I decide to replace this with actual non-corrupted asset extraction and fix the networking base code so it's not entirely commented out and is stable enough to launch the game. * Fix Networking classes so replacement of those isn't necessary anymore * Bit of base code cleanup for actual patch * Add Support to DataEncoder for copying arrays. This fixes an issue with ghost items when using JEI Transfer handler for Batch Crafter. Should not have any negative side-effects, as it technically does the same thing as before, but without changing the reference of the original object. * Fix Batch Crafter Container Shift-Clicking. * Update ic2patches.pack.lzma * Port 164 patches to 222 * Update Bin patches for 221+ * Update README.md
- Loading branch information
Showing
35 changed files
with
952 additions
and
2,947 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,58 @@ | ||
# 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. | ||
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 | ||
- Fixed issue [0002205](https://bt.industrial-craft.net/view.php?id=2205): Jetpack mode on Quantum Suit not disableable | ||
To toggle the jetpack, press the *mode switch key* while *sneaking* | ||
- Corrected the Near-Depleted Uranium Cell's recipe output size to 8 | ||
- Fixed issue [0002749](https://bt.industrial-craft.net/view.php?id=2749): Batch Crafter Dupe | ||
- Fixed issue [0002745](https://bt.industrial-craft.net/view.php?id=2745): Crash the world with Electrolyzer, Fluid Pulling Upgrade and Pump Attachment | ||
- Fixed issue [0002717](https://bt.industrial-craft.net/view.php?id=2717): Client crashed when connect a bronze fluid pipe with an ie fluid pipe | ||
- Fixed issue [0002586](https://bt.industrial-craft.net/view.php?id=2586): Nightvision Goggles can break | ||
- Night vision goggles now clear their effect immediately after disabling | ||
- Corrected the specs of the Energy and Lapotron crystals in the classic profile | ||
- Fixed a bug which displayed all non-fluid classic cell recipes in the [same recipe category](https://imgur.com/a/qkECYYD) | ||
- Fixed issue [0002752](https://bt.industrial-craft.net/view.php?id=2752): Bug with Industrial Craft 2 textures | ||
Obscuration now replaces textures instead of rendering another layer over them | ||
- Fixed issue [0002701](https://bt.industrial-craft.net/view.php?id=2701): Crop-Matron and Crop Harvester ignoring Transformer Upgrades | ||
|
||
### Creating patches | ||
|
||
#### Setting up | ||
1. Clone the repository | ||
2. Run the `setup` gradle task | ||
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 not suitable for playing. | ||
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 | ||
|
||
#### Generating patches | ||
After making changes to the code, run the `generatePatches` task of the `IC2-Patched` project to generate the patches. | ||
This has to be done **manually** every time you make changes. | ||
# Contribution | ||
|
||
#### Building & Exporting | ||
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. | ||
### 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. | ||
<hr> | ||
|
||
### 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. | ||
<hr> | ||
|
||
### 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:<br> | ||
`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. | ||
<hr> | ||
|
||
### 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. | ||
|
||
<div> | ||
<img src="https://upload.wikimedia.org/wikipedia/commons/e/eb/PD-icon-black.svg" align="right" width="50" alt="The Unlicense Logo"> | ||
</div> | ||
<h3 align="left">Licensing</h3> | ||
<h2 align="left">Licensing</h2> | ||
|
||
All code is licensed under **The Unlicense**, except for `mods.su5ed.ic2patcher.asm.BinPatchManager`, which is a modified version | ||
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** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
#Mon Sep 14 12:28:28 PDT 2015 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.