Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ForgeFlower Legacy; FG-2.2 Base #139

Open
wants to merge 22 commits into
base: legacy-2.2
Choose a base branch
from

Conversation

TheCurle
Copy link

@TheCurle TheCurle commented Mar 22, 2023

This PR is the result of copying all the commits made on top of https://github.com/MinecraftForge/FernFlowerLegacy, converting those to patches, and applying them in the style of ForgeFlower.

All upstream patches are removed, and thus this should be considered a completely different product than the master branch; thus the branch this is PRed to uses a legacy- prefix.

This is Part 5 of the RetroGradle initiative.

Limitations

Being that this is forked from FernFlowerLegacy, it is limited to Java 9 features.
Therefore, this version of ForgeFlower cannot decompile any J10+ features, such as records, try-with-resources, enhanced switch, or any other syntax sugar related code.

However, it does not need to; the Minecraft 1.11 (and below) code it is designed for does not use any of these.

TODO

  • Test this version against the pre-existing RetroGradle toolchain for patch failures
  • Figure out how we're going to do versioning (If this is pulled, it will clash with the existing commit versioning)
  • Consider moving to a different artifact name (forgeflowerlegacy?)
  • Consider moving to a different repository?

@zml2008
Copy link
Collaborator

zml2008 commented Mar 22, 2023

I think for ease of management it makes sense to keep this in the same repo, but having a different artifact ID is imo the easiest way to distinguish the versions for consumers.

SizableShrimp and others added 21 commits March 21, 2023 20:41
Thanks to Sciwhiz12
Thanks again to sciwhiz12.
* test: Add Comparison Test against FG2 Output

Setup Required:

#### testData/retrogradle/fg2/decompiled.zip
- clone 1.11.x (FG2) from <a href="https://github.com/RetroGradle/MinecraftForge">RetroGradle/MinecraftForge</a>
- `gradlew setup` (May need to be from the terminal due to gradle version)
- copy `build/localCache/decompiled.zip`

#### testData/retrogradle/fg3/output.jar
- checkout retrogradle1.11 branch
- `gradlew setup` (May require a second `gradlew setup` as the first downloads the custom MCPConfig zip)
- copy `projects/mcp/build/mcp/decompile/output.jar`

Diffs are output to `testData/retrogradle/output`

Signed-off-by: AterAnimAvis <AterAnimAvis@gmail.com>
The original patched will skip the IBytecodeProvider due to the always present byte array (even if it is 0 length), It looks like the original intention is for `link.data` to be null in this case.

Signed-off-by: AterAnimAvis <AterAnimAvis@gmail.com>
Fixes the following decomp difference in BiomeMesa:
<https://gist.github.com/AterAnimAvis/36edd447fde25c3ea9259bc20033d4cb>

Signed-off-by: AterAnimAvis <AterAnimAvis@gmail.com>
Signed-off-by: AterAnimAvis <AterAnimAvis@gmail.com>
@TheCurle
Copy link
Author

I have adjusted this so that it publishes under net.minecraftforge.forgeflowerlegacy with the versioning scheme of 0.{FG_VERSION}.{PATCH}.

The first build will thus be net.minecraftforge:forgeflowerlegacy:0.2.2.0.

With that, this is no longer a draft.

@Codetoil
Copy link

Codetoil commented May 4, 2023

Good that RetroGradle is moving along👍.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants