Posted March 3, 20169 yr 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.
March 3, 20169 yr 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.
March 4, 20169 yr 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.