Semx11 / Autotip

A Forge modification that tips boosters and other users in gamemodes without an active booster.
https://autotip.pro/
MIT License
32 stars 17 forks source link

AutoTip and Labymod not working together #13

Open Alex33856 opened 5 years ago

Alex33856 commented 5 years ago

When using LabyMod and AT (3.0), AT does not detect the client as playing on Hypixel(image

Alex33856 commented 5 years ago

Okay, so I've used the /at debug command on a different client (BLC), and it came up with basically the same except it showed "Tab Header: You're connected to mc.hypixel.net" or something. So I think LB changes the tab list in some way

Semx11 commented 5 years ago

This would be an issue related to Labymod, please reach out to its developers to figure out why it can't be read.

Autotip reads the tab header through Java's reflection library. It does so by reading the relevant field during runtime. The field in question can be found here. This should be enough info for the developers to figure out what's going on.

I'm very busy myself at the moment, so that's why reaching out to them myself isn't an option right now. If you can contact them and figure out what's the issue using the details I supplied above, I'll try my best to fix it and add Labymod support. Thanks for reporting the issue!

Alex33856 commented 5 years ago

Alright, I've reached out to them and I'll tell you when I get a response

ugcodrr commented 5 years ago

I might be "necro-posting" but, what if you had a version or a command where you could toggle it is so you would ignore whether or not you were on hypixel. Maybe "/at bypassip"

mendel3 commented 4 years ago

While I am 100% sure this is a terrible solution, you can disable the hypixel check by replacing manager.setOnHypixel(true); on line 90 of EventClientConnection.java with manager.setOnHypixel(true); if (autotip.getConfig().isEnabled()) { taskManager.executeTask(TaskType.LOGIN, manager::login); taskManager.schedule(manager::checkVersions, 5); } which makes the mod say that you are on hypixel even if you are not. This will probably cause the mod to tip on any server as long it is toggled on. I can provide a compiled jar, although would prefer not to for security reasons. Sorry for the necropost! EDIT: This doesn't work, nvm. I will try to find a solution tomorow

js6pak commented 4 years ago

Generally the problem is labymod is reimplementing GuiPlayerTabOverlay with its net.labymod.core_implementation.mc18.gui.ModPlayerTabOverlay, and for some reason instead of using already existing header/footer fields its creating new ones. I made working workaround, but it should be resolved at labymod side.

Semx11 commented 4 years ago

@js6pak Could you create a pull request for this change? I'll make some additional changes on top of your commit but it's a good start for a fix 👍

ghost commented 4 years ago

Instead of doing this and using reflection, you can check the client (server, mcp is bad) brand for "BungeeCord (Hypixel)", as used here in Skyblock Addons https://github.com/BiscuitDevelopment/SkyblockAddons/blob/69d036aff9cd978d8b411df44983c40f4f4c7f2d/src/main/java/codes/biscuit/skyblockaddons/utils/Utils.java#L189