Jump to content

Forge source and Patching NMS


DerColaCase

Recommended Posts

Hi I am a Computer Science student who is learning about API and software design and I also enjoy Minecraft. I have been searching for an answer to this problem for about a week and found nothing, so I figured I would ask at last.

 

I know Forge has a github and I have looked over that but I cannot find where Forge actually patches Minecraft. I wanted to study how Forge hooks (is it hooks?) into Minecraft and the overall event system. I am lost and unable to find anything relevant to what I need. So I have a couple of questions?

 

Where can I find Forge's source/how it is integrated into Minecraft? I downloaded 'forge-1.7.10-10.13.2.1230-src' but this only gives me the source for an examplemod.

 

These two are not directly related to Forge but rather it's implementation.

Does Forge simply call a method like blockbreakevent(..); when, for example, onBlockHarvested(..) (inside block.java) is called?

Forge modifies the base classes of Minecraft? or does it somehow (maybe via altering bytecode, sort of like Detouring a function) hook the needed methods?

 

Any information would be helpful, thank you.

 

Link to comment
Share on other sites

Hi luacs1998,

 

I already mentioned I know about the github. To be more specific, I am looking to learn how Forge intercepts/hooks/knows about when to call an event. For example an item being used, or a block being broke, or right clicked. Thanks.

it patchs the source, look at the patchs folder.

https://github.com/MinecraftForge/MinecraftForge/tree/master/patches/minecraft/net/minecraft

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.

Announcements



×
×
  • Create New...

Important Information

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