Jump to content

[1.12.2] Question about git and Forge patching when making Forge PRs


Recommended Posts

Posted

So I'm just learning to contribute to Forge. My first PRs only changed Forge code, but now I'm working on one that will require patch to Minecraft code.

 

In my development environment I have the Forge code, the Forge Minecraft code, and the "Clean" Minecraft code. However, I noticed that my github fork only manages changes to the Forge code. If I change the Forge Minecraft code git doesn't see it as changes. I can generate patches which get managed by git, but I know that as I get feedback on the PR I'll have to manage changes and would like to track them with Git.

 

In other words, the Forge net.minecraftforge stuff is managed but the Forge net.minecraft stuff is not. Is there a trick to getting the net.minecraft changes tracked? Should I just set up a separate github repository that just tracks that, separate from the fork?

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Posted

In order to change the Minecraft code you need to run genpatches for those changes to be reflected.

 

From Forge's git readme:

 

Quote

Pull requests

Pull requests should target the current default branch. Currently, that is the 1.10.x branch for Minecraft 1.10.2.

If you intend to modify a minecraft patch, or add a new one, always run gradlew genPatches to generate your patch and validate that you are not doing anything unexpected in your patch.

 

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.

Posted

Do not upload the decompiled Minecraft sources, with or without Forge patches applied, to the Internet.

 

If you want version tracking for these files, then use whatever features your IDE of choice supports, or host a git/whatever repo on your local machine only.

Posted

@Draco18s I know how to generate the patches. But that is generated by comparing the edits I made to Forge net.minecraft files with the Clean net.minecraft files. What I need is to track changes over multiple edits of Forge net.minecraft files.

 

Like I want to commit changes (just for private tracking) as I work on them but only generate the patches when I'm done. 

 

I guess I can just generate patches each time, but I thought that might be a bit weird to be generating multiple patches a day. But is that the recommended way?

 

@quadraxis Good point. I wasn't planning to share access, but I suppose technically even syncing a private repository on github could be seen as an infraction. The problem is I work across multiple machines so having a fully local repository would be very limiting for me, although I guess I can do it the old-fashioned way -- dragging files between machines through remote access.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

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.

Announcements



×
×
  • Create New...

Important Information

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