Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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.

 

[lmgtfy]minecraft forge github[/lmgtfy]

Read the EAQ before posting! OR ELSE!

 

This isn't building better software, its trying to grab a place in the commit list of a highly visible github project.

 

www.forgeessentials.com

 

Don't PM me, I don't check this account unless I have to.

  • Author

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.

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

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.