Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

How and where can I add text to the f3 debug screen?

I want to add some additional world details regarding our mod to the f3 debug screen (Not static will change depending on the exact player position).

 

 

  • Author

Yeah i got to RenderGameOverlayEvent.Text.

But where do I get an instance of this object to add my text to it?

 

And do I have to add it to a particular class or may I add it to whatever class which gets called once per tick?

Yeah i got to RenderGameOverlayEvent.Text.

But where do I get an instance of this object to add my text to it?

 

And do I have to add it to a particular class or may I add it to whatever class which gets called once per tick?

 

RenderGameOverlayEvent.Text

is an event, you need to subscribe to it with an event handler. Events and event handlers are explained here.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

  • Author

I know how to add events, but the event object of RenderGameOverlayEvent.Text doesn't give me a world object or anything useful to operate on.

 

 

 @SubscribeEvent
    public void onDebugOverlay(RenderGameOverlayEvent.Text event)
    {
        event.getLeft().add("Colony in distance: ");
    }

This event is only fired on the client, which only has a single

World

:

Minecraft#theWorld

.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

  • Author

I tried to find out when it is the debug screen.

 

I tried the one under it but when I debugged it I noticed that there is no difference between debug and normal mode.

Only the lists are full in debug, but if our users use additional mods checking that won't work.

 

if(event.getType() == RenderGameOverlayEvent.ElementType.DEBUG)
        {
            event.getLeft().add("Colony in distance: ");
        }

 

 

  • Author

Minecraft.getMinecraft().gameSettings.showDebugInfo resolves it.

 

 

Thanks for the help.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.