Repository navigation
Add python support on 1.6.4 - #39
zeng-github01 wants to merge 14 commits into
Conversation
|
So far, I haven't found a way to generate It also doesn't support FF patches; I haven't found a solution for this yet. Also, the tests need to be removed, as some of the test code corresponds to logic that existed before the refactoring. |
Testing confirms that In theory, this patch supports MC 1.6.1, provided that the corresponding mapping zip coordinates are available in ForgeMaven. Or, generate mapping coordinates and files directly from |
|
I am currently testing the patch's compatibility with Minecraft 1.5.2. It mostly works, though some necessary artifacts are missing—specifically the |
|
After some testing, I’ve confirmed that the refactored code still triggers the original Javac error in version 1.5.2. Since it prevents downstream projects from initializing, I’ve abandoned the effort to make this patch compatible with 1.5.2. I’ll leave it at this. |
|
This patch has been tested and is capable of booting Forge 1.6.2. It only requires the snapshot mappings zip and the mcp-1.6.2-srg.zip file. and setting default mappings for 1.6.2 |
|
Look, I haven't had time to sit down and process through all of this, and honestly its come down to motivation. A large part of the dev of Mavenizer is figuring out what each 'era' of Forge actually is. The mapping zip files need to be iterated/generated. This is as simple as going through all of the existing forge zips, and converting the conf folders to mapping zips, assign each a filename based on timestamp, then de-duplicating based on hash, and dumping a table of when changes happened. That then gets turned into the default mappings table. A similar process except for the python code. I need to know when (what forge version), and how (a diff between the code) the python code changed. That way we can adjust the mavenizer code as needed. A table needs to be made for the ModLoader/ModLoaderMP dependencies as well so that we know what needs to be injected into the binary before decompiling for each Forge version. A table for what Fernflower version is used is also needed, as that highly effects the decompile. Same for what java version. The python era support should be able to be done for all versions at the same time, as the python code didn't change that much over the time it was used. There should only be a handful of variants. But ya, trying to synthesize the userdev jar is the wrong apprach to deal with python. It will only work for 1.6.4 as you've seen as FG1 was pretty much a straight port of the python code at that time.
Those files are not used in mavenizer, as we do the whole process through decomp, and those were used when doing the 'fast path' of |
|
The initial version was written by AI, but following a subsequent review, it was brought into alignment with the existing workflow. After all, it’s not really realistic to expect a simple understanding of such a complex system. The method of directly synthesizing I am currently working on compatibility for older versions; however, versions prior to 1.6.x lack the I even discovered an issue where a function in the mappings had an SRG name but lacked an MCP name, yet the recompiled code contained references using the MCP name. In short, it’s a real hassle; this patch is only compatible up to version 1.6.x, and anything earlier would require some breaking changes. Since you haven’t responded for a while, I’ve made a number of adjustments—mostly removing unnecessary code that had been added by the AI. You can simply check the "Modified files" tab to see the changes. |
I agree that this isn't a general solution for the entire Python era. As far as I can tell, it really only applies to 1.6.x. At the moment, I'm intentionally focusing on the lowest-effort and lowest-risk part first. The amount of special handling required is much smaller, and there is a clearer reference point in FG1. For versions prior to 1.6.x, the challenge is no longer synthesizing a userdev-like environment, but reconstructing the original pipeline itself. That's an area I still need to research further, and I don't yet have an approach that I'm happy with. |
|
@LexManos I have tested compatibility for version 1.5.x, but version 1.4.7 is incompatible. I suspect this is due to incompatible runtime parameters for Fernflower. |
Summary
This PR introduces support for synthesizing Gradle-compatible
userdevartifacts directly from Python-era Forge source archives (-src.zip, Minecraft 1.6.4 only now).With these changes,
Mavenizercan now feed legacy Python-era Forge versions into theprocessV2pipeline (FGVersion.v1), allowing modern ForgeGradle / dev workspaces to build downstream mods targeting legacy versions seamlessly.Changes
1. Python MDK to Userdev Synthesis (
PythonForgeSource)forge-*-src.zipinto standarduserdev.jarstructure:conf/(conf/packaged.srg,conf/packaged.patch,conf/packaged.exc,astyle.cfg,mcp_merge.cfg).fml_at.cfg,forge_at.cfg) tosrc/main/resources/.mappings/(fields.csv,methods.csv,params.csv).net.minecraftforge.*,cpw.mods.fml.*) and patch archives (fmlpatches.zip,forgepatches.zip).2. Legacy Package Remapping (
LegacyPackageMappings)net/minecraft/src/ClassName) to package paths defined inpackages.csv.minecraft_ff.patch)$) and optional CSV header formats.Verification & Testing
conf/andmappings/files against official Forge 1.6.4-9.11.1.964userdev.jarreleases.