Jump to content

EventHandler for Titles and Scoreboard


Skeptical_Tech

Recommended Posts

I'm currently working on a mod that interfaces with the scoreboard and the new title system introduced in 1.8.

 

The idea is that it will get notified when the server updates the scoreboard, then modify it, and the same goes for the titles.

 

However, I have no idea what eventhandler to use for these. I did some digging but couldn't really find anything.

Link to comment
Share on other sites

There is simply no such thing.

Titles and scoreboards are handled internally by vanilla iteself. Why would forge rewrite it?

 

You simply call vanilla methods like vanilla does it itself. Look at how vanilla does it and just create something that would be made by e.g command block, but instead of in command block - in code itself.

 

Opinion: Vanilla features are sure nice and can be used while client doesn't have mod installed (server-side mod), but unless you plan to do that (write server mod) consider more options - I mean, modding allows you to make anything (why stay in simple things), that's the whole point and fun of it! :D

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

My mod is going to interface with server systems (i.e. mini-games and stuff), so I am constrained as to what I can use.

 

It's a client-side mod that is going to modify the display of the scoreboard, chat, and titles when on a server (think chat filter and you get the basic idea), so I need event handlers for each. The chat is easy, but the scoreboard and titles have eluded me so far.

 

I know it won't be hard to DISPLAY the scoreboard/titles, I just need to know when to do so.

Link to comment
Share on other sites

Oh, so just want to grab moment when client's rendering it?

 

There is RenderGameOverlayEvent.

It has render phases. Looking at it now I can't see which one is title phase (might not exist, or I am outdated).

 

I'd try TEXT, or ALL.

 

EDIT

If there is no EXACT event to cancel and render your own stuff - you will have to handle it on your own. Simply check if there is title to display on client, and if so - call your rendering. Might be tricky.

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

Yeah, I just want to grab the event, change the text, and then have it display normally.

 

I suspect that I will have to grab the event then replicate the vanilla functionality to display it.

 

I'll give RenderGameOverlayEvent a try and report back when I get the chance.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

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