Jump to content

Creater Speedrun Timer (1.18)


StrangePerson

Recommended Posts

Hey, I want a mod that starts a timer when I run an Command and Teleports Player with a given team (Ingame Scoreboard) to fix coordinates. I know things like that are easier with a plugin but I need a mod for that. I don´t know how to do that best so pls help me... (you can also help me if you only give me an example code for a timer or explain how to best make the timer. the other things don't have to be, maybe i could even do it myself).

Thank you :)

Link to comment
Share on other sites

You can register for the RenderGameOverlayEvent (Pre or Post) in your FMLClientSetupEvent.

In the event draw whatever you like. Maybe you can look at ForgeInGameGui.renderHudText() for how it draws a list of messages.

The event fires multiple times, but I would guess you probably want the Post event and check for ElementType.ALL before drawing? YMMV

If you want to play nice, you should also check Minecraft.getInstance().options.hideGui

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

Quote

If you want to play nice, you should also check Minecraft.getInstance().options.hideGui

Forget that, it actually checks that before calling your method.

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

Quote

OverlayRegistry should be used for new HUD elements instead of the event.

That looks to be called in the same place as Post/ElementType.ALL

Except you register an IIngameOvelay with the OverlayRegistry instead of using an event.

So I guess the event is still needed for other ElementTypes?

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

I mean the event supports different element types of the gui, ALL, BOSS, TEXT, etc. The OverlayRegistry is only used where it does ElementType.ALL

 

Also the event supports Pre and Post while the OverlayRegistry is just "Post". Which means the event supports cancellation of the drawing of that element altogether via a Pre handler.

But that's getting off-topic.

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

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.



×
×
  • Create New...

Important Information

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