Incompatibility with BadOptimizations
MoonstruckDev opened this issue · 25 comments
Have the string optimization enabled and the colours/dyes no longer work on the bobber/fishing line
Forge: 47.2.30
Mod Version: 2.5.1
BadOptimizations Version: 2.1.0
Whether String.format should be redirected to a faster StringBuilder when calculating the FPS string. enable_fps_string_optimization: true
So uh-I just downloaded the mod. How do you use the bobber? Trying to get more details on this, cause making the entity renderer thing auto-disable with this mod like i did with twilight forest is more of the "destructive last resort" option.
It should be explained on the wiki (Which is at the top here on Github)
Short version:
- You add it on the tackle box (block entity with GUI)
- Put in a fishing rod from AQ2 in the fishing rod slot, to equip the bobber/line
- The bobber and line are items, which can be dyed like leather (Both in-world renders break, with the "enable_entity_renderer_caching" enabled)
You take the fishing rod out of the tackle box again :)
You need to dye the fishing line and/or bobber first though, in a crafting table, with any dye.
mod.zip
Uh, messed with some mixins?
I just tried it with 1.20.4 and it worked fine. Odd. Could have something to do with neoforge. Do you still maintain your 1.20.1 versions?
I'm thinking about just making BO auto-disable entity rendering optimizations with this mod in versions < 1.20.2, probably?
I was able to reproduce it. There is nothing I can do about it on my end, as they're messing with the rendering.
It would have to be done on their end.
I can’t seem to find the conflicting code, can you tell me where it is? (Although I am a little confused on how an fps string optimization conflicts with an entity renderer)
Sure thing!
It´s done in the AquaBobberRenderer, here specifically for the fishing line: (Should hopefully be able to find the bobber overlay in there as well - I do have things commented for once!)
https://github.com/TeamMetallurgy/Aquaculture/blob/master/src/main/java/com/teammetallurgy/aquaculture/client/renderer/entity/AquaBobberRenderer.java#L147
It could quite well be that it gets the colors from the item line/bobber items, which does extend DyeableLeatherItem.
The line still renders as if though no colors had been applied to the items, when BadOptimizations is installed.
That's just a vertex renderer-how is it conflicting with the FPS string?! Must be something else.
Sorry for the late response-does disabling entity flag optimizations from BadOptimizations fix the issue?
All good!
Setting "enable_entity_flag_caching" to false did not fix the issue, no. Left all other configs options as default.
Disabling the "enable_entity_renderer_caching" config option, does indeed fix it!
Well it’s not the fps string optimization, cause that version just plain removes it.
Couldn´t get it to work with either, with just disabling the "fps string optimization" config either. Not sure what it could be!
mod.zip
Does this version fix it?