Jump to content

compatibility issue


Anonymous1611

Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

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.