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

apologies for posting another thread so quickly. after watching a portion of a youtube series, and viewing the Minecraft by Example tutorial, there's functions such as "onBlockActivated" and "update" and "onEntityWalking". where do you find these, though? is there a list of these "event" functions that i can use to do different things? where did the tutorial authors even find these? after years of mods even existing for minecraft, i'd expect it to be a lot better than looking through all of its vanilla code and searching for functions that appear to be "event" functions. i've spent too long on google trying to find a list of these types of functions.

Yes!

 

In Eclipse, hover over the class declaration of

Block

and then click the little green button in the tooltip that pops up (aka "Jump to Definition")

 

Magic!

 

Or you can do:

 

Block b;
b.

 

And another tooltip will pop up called the intellisense autocomplete which will list every god damn method and property available for that object.

 

Events, by the way, are not functions.  They're events and you need to write an Event Handler to handle them (which is a class containing methods).  Search Google for "Forge Events" and the first link will be a link to the wiki called "Forge Event Reference."

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.

If you want the list of all the possible overrides, I'd use the Type Hierarchy feature in Eclipse. With that you can expand the class to see all fields and methods all with indications of their "scope".

 

In Java, anything that is public or protected scope is override-able, where as private methods are not.

 

It is good to familiarize yourself with all the override-able methods because it can often give you ideas for your mod and generally someday the familiarity with the methods will help you quickly plan any feature you want to implement.

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

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.