Posted October 18, 20186 yr 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 October 18, 20186 yr by Anonymous1611
October 18, 20186 yr Use RenderGameOverlayEvent.Text. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
October 18, 20186 yr Author 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 October 18, 20186 yr by Anonymous1611
October 18, 20186 yr 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.
October 19, 20186 yr Author 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.