Jump to content

Is it possible to create new events/hooks?


DrEinsteinium

Recommended Posts

Hey everyone, I've been messing with the Forge events lately and I like them. A lot. Except that some events do not exist such as a piston update event, or player fishing event. Am I just missing something important about events or would I perhaps have to make a new type of event that listens for things such as this. I would really like to know!

 

Thanks in advance,

 

Doc.

Follow me on twitter! @keepablock

Read up on whats new! www.catacombs.co

width=700 height=60http://electronic-chronic.com/assets/keep-a-block/wikilink/wikilink_logo.png[/img]

Link to comment
Share on other sites

Creating your own events is very much possible. Some mods use this in their API's to allow other mods to do something when something in the mod happens (like when a reactor from IndustrialCraft 2 ticks). However if you want to add events for happenings in Vanilla Minecraft, you'll probably have to edit base classes, and then you have no purpose to add an event there, as their most important property is that it prevents modders from editing base classes.

Author of PneumaticCraft, MineChess, Minesweeper Mod and Sokoban Mod. Visit www.minemaarten.com to take a look at them.

Link to comment
Share on other sites

You could add events to base classes using ASM though, but by the question you are asking I guess ASM is out of the question :)

 

If you see the need for a new forge event and have a suggestion on how it could be implemented in code then feel free to discuss it on this forum or do a PR if you know your way around that kind of thing ;)

If you guys dont get it.. then well ya.. try harder...

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.