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

  • Author
Just now, diesieben07 said:

Define "certain thing". It does not help if you are vague... Please describe exactly what you want to happen in terms of a user, not how you intend to program it.

 

I want to display text when it finds that fake player in the tab list.

So I tried looping through the tab list, to try and find the player - but it doesn't work, the only thing I get is null.

  • Replies 55
  • Views 26.4k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • OkHttp depends on Okio, which you don't have.

  • Uh yeah. Because that's a Main function, as in the first method that the JVM invokes, except that the main class that the JVM is invoking is GradleStart, calling Main(args) there.  Which means YOUR me

  • I feel like you probably understood what I told you, but what you said doesn't make a lot of sense.   In your ClientConnectedToServerEvent handler, you need to call IThreadListener#addSchedu

Posted Images

  • Author
Just now, diesieben07 said:

Where do you want to display that text? What text? Always?

 

I already got the text part, it works very well. The only thing I need is to detect the player being in the tab list :) I could make it work without a problem, if it didn't return a null

  • Author
6 minutes ago, diesieben07 said:

Dude... 

What returns null? When called from where? You need to show proper code, not just snippets...

 
 

I explained it before in this exact post. I said that I had this inside a methood that runs on the text render event.

Collection<NetworkPlayerInfo> users = mc.getNetHandler().getPlayerInfoMap();
        for (NetworkPlayerInfo cuser : users) {
            System.out.println("LOOK AT THIS DAMMIT! " + cuser.getDisplayName());
        }

 

This code should get the playerinfomap (all the users in the tab list) and put them inside users. after that I tried looping through all the users inside the users collection and outputing the resultes.

All it did is output "LOOK AT THIS DAMMIT! null" like this exactly. So was I doing something wrong? all I wanted to do here ^ is just display all the users that exist inside the tab list.

Edited by Bets

  • Author
8 minutes ago, diesieben07 said:

NetworkPlayerInfo::getDisplayName is for an overridden display name that is not the user's username. Look at GuiPlayerTabOverlay::getPlayerName.

 

Tried doing this, game crashed.

Collection<GuiPlayerTabOverlay> users = (Collection<GuiPlayerTabOverlay>) mc.ingameGUI.getTabList();
        for (GuiPlayerTabOverlay cuser : users) {
            System.out.println("LOOK AT THIS DAMMIT! " + cuser.getPlayerName((NetworkPlayerInfo) users));
        }

 

  • Author
17 hours ago, diesieben07 said:

What... what is that even? Those casts do not make any sense.

GuiIngame::getTabList returns GuiPlayerTabOverlay. You can't just cast that to Collection<GuiPlayerTabOverlay> and expect it to magically work.

You then also cast a Collection<GuiPlayerTabOverlay> to NetworkPlayerInfo, which makes even less sense.

 

Haha, sorry I am really bad at this stuff right now, all the casting things.

Can you maybe point the way I should go towards? like what casts should I use etc

Casting isn't hard. You can only cast an object to something that it already is.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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.