Jump to content

Recommended Posts

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.

Posted

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.

Posted

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

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