Jump to content

Feasibility of Reimplementing Forge Gradle For a Different Build Tool


yoshiquest

Recommended Posts

Yeah, I know I'm gonna sound crazy, but this is something I've been meaning to do, and something that needs to be done.

 

As you may already know, I've been developing a mod to provide support for another programming language (Clojure) for Minecraft modding. However, I have repeatedly run into problems, partially stemming from the fact the Gradle plugin for Clojure is sort of... unreliable, as well as the fact that I have little control over how things are compiled, resulting in a ton of bizarre bugs and issues I've frankly gotten tired of solving.

 

So my solution is to reimplement Forge Gradle as a plugin for Leiningen, the main dependency manager for Clojure. It's actually rather easy to use (far easier than Gradle in my opinion), so using it for Java mods wouldn't be out of the question either. However, I simply don't know where to start, so I'd like to ask some questions in order to get my bearings (assuming this is feasible in the first place):

 

1. Will I run into issues, legal or otherwise, with the people who made the Minecraft Forge Gradle plugin, or Minecraft Forge itself?

 

2. What exactly does Forge Gradle do? Er, I know this is a vague question, but I'd like to know a bit more about the details of the various stages of compilation if I'm going to do this.

 

3. What tasks does Forge Gradle hand off to other tools, such as MCP (in other words, what can I NOT worry about)?

 

I know this might seem like reinventing the wheel, but this will go a long way towards creating better support for Clojure in Minecraft, or possibly even a better platform for Java code (Maybe).

Currently working on a mod to provide support for the Clojure programming language in Minecraft, check it out here.

Link to comment
Share on other sites

1. Will I run into issues, legal or otherwise, with the people who made the Minecraft Forge Gradle plugin, or Minecraft Forge itself?
As long as you don't just package things and ship it as your own I am pretty confident you are in the clear here, but don't quote me on that. Check the licenses if you want to be sure.

2. What exactly does Forge Gradle do? Er, I know this is a vague question, but I'd like to know a bit more about the details of the various stages of compilation if I'm going to do this.

What it basically does is:

- Download the Minecraft files.

- Decompile them using a custom version of FernFlower.

- Deobfuscate the result using the data from MCP.

- Apply the forge patches.

- Know how to remap between SRG names and MCP names (forge patches are in SRG names but you want MCP names in your workspace).

- Reobfuscate your built jar file so it runs in normal minecraft (same as the previous step except mapping MCP to SRG names).

I might have missed something here but this is the gist of it. Overall it is pretty complex, since there is a lot to the whole remapping process.

 

3. What tasks does Forge Gradle hand off to other tools, such as MCP (in other words, what can I NOT worry about)?
Well, ForgeGradle relies on MCP, not the other way around.

Not sure what you are trying to ask here, you can read the whole ForgeGradle code on Github :P

 

Yeah, thanks. As for the third part, I was really thinking about what parts of the compilation process are covered by MCP, rather than being fully implemented in Forge Gradle. I think I get the gist of this though, that second part was very useful. Thanks!

Currently working on a mod to provide support for the Clojure programming language in Minecraft, check it out here.

Link to comment
Share on other sites

MCP is not involved in FG at all, except for supplying the name data. The decompilation and remapping is all done by FG.

 

I was afraid of that. Well, might as well get started...

Currently working on a mod to provide support for the Clojure programming language in Minecraft, check it out here.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.