BadOptimizations

BadOptimizations

18M Downloads

Breaks FPS counter with EssentialGUI

Tempest-5ky opened this issue ยท 11 comments

commented

What it says on the tin- with the mod EssentialGUI, this mod breaks its FPS counter functionality, causing the counter to only update while the f3 screen is open.

latest.log: https://mclo.gs/ONbgcPb

Mod version 2.0.0 on Fabric 1.20.1
EssentialGUI version is 1.9.2

commented

I...don't know what I'm meant to think of this code.
image
fpsDebugString is what this mod caches and prevents updating for performance. Mods that access currentFps (which is probably what they should anyway :/) won't break, like this mod.

commented

Oh, what in the world-
I'll send that over, thanks for taking a look and very sorry for the trouble

commented

Now's a good time to ask, how does the fps counter look?

commented

Hi! This is Lord_Rius, creator of EssentialGUI.
Yep, until now I was using the string fpsDebugString because if I remember correctly, in older versions the method to obtain the fps was not public. Now the only change I've made is to get the fps int from the getCurrentFps() method, so now it is working fine.

commented

Oh, didn't know that. Cool

commented

in older versions the method to obtain the fps was not public

iirc it still isn't, the owner will need to use a very simple client accessor to access currentFps

commented

Yes, it is public now. You can get it through MinecraftClient#getCurrentFps()

commented

Can confirm that LordRius' fix works! Thank you for the help everyone.

commented

Oh, yikes- I hadn't thought to check. A cursory look over posts in the page it does link seems to suggest that the creator's idea of 'open source' is just using the mod jar, which... ????

I'll see if I can get something for ya, hang on. Will update this issue if/when I get a response.

commented

It's...not open source
Oh no

commented

I can still view its code, I just have to decompile the jar

And if it's obfuscated
I will go insane