Jump to content

Recommended Posts

Posted (edited)

Hello, 

 

I have a mod that draws simple text on the screen using:

@SubscribeEvent
public void Draw(RenderGameOverlayEvent.Pre event) {
    mc.fontRenderer.drawStringWithShadow("Test", 940, 465, 0xf4cf16);
}

But once my mod is used with LabyMod the text doesnt show up. I was wondering why and if there is a solution / workarround since i really need the mod to just draw text. So i can draw coordinates on the top left of my screen for example (Without using F3)

Minecraft 1.12.2

 

Thannks in advance!

Edited by Anonymous1611
Posted (edited)
52 minutes ago, Animefan8888 said:

Use RenderGameOverlayEvent.Text.

Doesnt seem to change anything. 

 

Doesnt work in RenderTick Event or other TickEvents. So i assume thatr mc.fontRenderer just doesnt work because of Laby. Is there any other way to draw text on the screen?

Edited by Anonymous1611
Posted
2 hours ago, Anonymous1611 said:

i assume thatr mc.fontRenderer just doesnt work because of Laby.

That is a bad assumption since that FontRenderer object is used to draw every piece of text in the game. If it was somehow modified to not work then there would be no text in the game at all.

I would assume that this "LabyMod" either cancels the RenderGameOverlayEvent in which case you either want your event to be handled before it is cancelled(either make the priority higher or set receiveCanceled to true) or it replaces the in-game HUD to it's own version that doesn't throw the event in which case go complain to that mod that they are breaking functionality. I assume it would also be possible to render your HUD in a RenderTickEvent but I've never worked with it and don't know what the GL matrix is set to at the time.

Posted
20 hours ago, V0idWa1k3r said:

That is a bad assumption since that FontRenderer object is used to draw every piece of text in the game. If it was somehow modified to not work then there would be no text in the game at all.

I would assume that this "LabyMod" either cancels the RenderGameOverlayEvent in which case you either want your event to be handled before it is cancelled(either make the priority higher or set receiveCanceled to true) or it replaces the in-game HUD to it's own version that doesn't throw the event in which case go complain to that mod that they are breaking functionality. I assume it would also be possible to render your HUD in a RenderTickEvent but I've never worked with it and don't know what the GL matrix is set to at the time.

The Function itself does not seem to work at all. I tried different events, checked if they executed and they did. Tried using receiveCanceled and playing with the event priority.

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • seguridad seguridad
    • I am creating a server with mods but when i try tostart it it say in the logs:   [29Jan2025 20:36:50.715] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /server/libraries/net/minecraftforge/fmlcore/1.20.1-47.3.27/fmlcore-1.20.1-47.3.27.jar is missing mods.toml file 159[29Jan2025 20:36:50.717] [main/DEBUG] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Considering mod file candidate /server/libraries/net/minecraftforge/javafmllanguage/1.20.1-47.3.27/javafmllanguage-1.20.1-47.3.27.jar 160[29Jan2025 20:36:50.717] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /server/libraries/net/minecraftforge/javafmllanguage/1.20.1-47.3.27/javafmllanguage-1.20.1-47.3.27.jar is missing mods.toml file 161[29Jan2025 20:36:50.718] [main/DEBUG] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Considering mod file candidate /server/libraries/net/minecraftforge/lowcodelanguage/1.20.1-47.3.27/lowcodelanguage-1.20.1-47.3.27.jar 162[29Jan2025 20:36:50.718] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /server/libraries/net/minecraftforge/lowcodelanguage/1.20.1-47.3.27/lowcodelanguage-1.20.1-47.3.27.jar is missing mods.toml file 163[29Jan2025 20:36:50.719] [main/DEBUG] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Considering mod file candidate /server/libraries/net/minecraftforge/mclanguage/1.20.1-47.3.27/mclanguage-1.20.1-47.3.27.jar 164[29Jan2025 20:36:50.719] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /server/libraries/net/minecraftforge/mclanguage/1.20.1-47.3.27/mclanguage-1.20.1-47.3.27.jar is missing mods.toml file
    • How do you configure the entity reach of a custom weapon? Asking for 1.21 Minecraft parchment
    • This topic is over a year old. If you are having an issue, please read the FAQ for the proper way to post logs, and create your own thread.
    • hello i have been trying to put this specific pack for a while now but ive been hit with a new error everytime. no matter if its a previous version or if i change the pack format it will just not work please help latest log:https://mclo.gs/b6Qra5d <----- this is with pack version 1.20 no changes done to it debug log: https://mclo.gs/jczkfRK
  • Topics

×
×
  • Create New...

Important Information

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