Jump to content

[Solved] Compiling FML


panoskj

Recommended Posts

Hey guys I'm new here, just made an account to get quick help, if possible.

 

To begin, I found a bug in vanilla Minecraft, which affects a mod I am trying to make. Luckily, there is a forge hook right after this bug appears. I thought adding 2 lines of code along with the hook will fix it. Then I would submit a PR. So, I cloned FML, set it up ('gradlew setupForge') and compiled it without any modifications ('gradlew build'). I'm not using an IDE, just notepad and command line btw. The first thing that struck me was the file size. The officially released universal jar is ~4.6MB whereas my compilation result was ~4MB. I didn't look into it any further because it did work without errors. Next step was to modify Minecraft's code and run genPatches. I did confirm the patch file was like I expected it to be and I ran 'gradlew build' again. I copied the universal jar and started Minecraft again - but my modification seemed to have no effect.

 

So, what did I do wrong? Are there any special steps that need to be taken if you modify the .patch files? I can't find much documentation on the subject. And why is there such a huge difference in file sizes?

Edited by panoskj
Link to comment
Share on other sites

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Thanks, that's the guide I followed but as you can see it is very short and not very informative. I also confirmed that a file called binpatches.pack inside the jar is modified successfully, but my changes still have no effect. Any other idea or clue?

Edited by panoskj
Link to comment
Share on other sites

Ok, so the process goes like this:

 

Fork

Download your fork (use a proper git program, GitHub desktop works, but is not the greatest)

Setup

Write code

GenPatches

Push (the patches only!) to your fork. If you correctly forked and downloaded, Git will see the correct files that have been modified.

Create Pull Request

 

I have no idea what you are looking at. Not a clue. I also don't know what you mean by "your changes have no effect." No effect where?

Edited by Draco18s

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

They had no effect when I copied the compiled universal jar into an existing Minecraft installation. But it turns out there never was a problem compiling FML.

 

What I overlooked was Optifine... it is overwriting the specific patch I wanted to make. The worst part is it's not opensource.

 

Thanks for the help, I will make a PR explaining what the issue is shortly.

Link to comment
Share on other sites

6 hours ago, panoskj said:

They had no effect when I copied the compiled universal jar into an existing Minecraft installation. But it turns out there never was a problem compiling FML.

Don't bother. You can run the game in Eclipse and you don't need to validate the "compiled jar."

6 hours ago, panoskj said:

What I overlooked was Optifine... it is overwriting the specific patch I wanted to make. The worst part is it's not opensource.

And there's a reason OptiFine is not compatible with Forge.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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.