JEI Flashing
DinnerBeef opened this issue ยท 38 comments
Describe the bug
JEI Flashes
To Reproduce
Steps to reproduce the behavior:
- Load into game
- Open JEI
- JEI Randomly Flashes
Expected behavior
JEI not to flash
Screenshots
https://s.dinnerbeef.com/gOXe5/zuFeyUCu03.mp4
Mod and Minecraft version:
- Minecraft Version: 1.21.1
- NeoForge Version : 21.1.134
- Version: 1.20.1-1.2.3
Additional context
Tested and downgraded the mod to see if that stop JEI from flashing, and it does.
I think this is related to the new dynamic UI display function as this only happens with the versions that included that.
It seems the flashing coincides with the dynamic UI's update date.
also doesn't seem to be happening for everyone. on my server 3 of 5 players were suffering from this issue and we noticed that everyone suffering from it never had their inventory render for others, where for me the flashing wasn't present and my inventory rendered properly for everyone.
downgraded to a older version without the dynamic ui for now.
Guys you can fix it server-side with the command /coro config common set watut-server.toml dynamicGuiDontSendConstantGUIUpdates true
Here are my 2 modlists, one with the flickering problem and the other without:
flickering.txt
no_flickering.txt
I tested if maybe it was tied to the refresh rate, and the flickering is there from 30fps to 200fps, although waayyyy less noticeable at 200fps. Looks like it lasts for one frame
Had been able to witness this on my instance too, heavily modded.
Flickering, however, does not happen on a fresh install w/ NeoForge 21.1.136 and JEI 19.21.0.247
I suspected Iris was the culprit but even with it (with or without shaders on) it does not flicker.
In config file watut-server.toml I found that dynamicGuiUseOldSimpleGUIVisual opinion, set it to true would make it properly for now (need confirm) instead of downgrade the mod version.
Here are my 2 modlists, one with the flickering problem and the other without:
flickering.txt no_flickering.txt
I tested if maybe it was tied to the refresh rate, and the flickering is there from 30fps to 200fps, although waayyyy less noticeable at 200fps. Looks like it lasts for one frame
Same problem occurs on my side.
Caused by Xaero's World Map I guess. I will test it later.
Xaero's minimap and world map do not cause the flickering... Here is my modlist without flickering:
Setting dynamicGuiUseOldSimpleGUIVisual to "true" indeed does the trick !
Can you post your modlist too so I can compare ?
Doesn't seem to happen with just watut and jei for me, but loading up an All The Mods 10 instance with watut I am reproducing the issue, looking into a proper fix.
Right now theres a very easy workaround without losing the dynamic GUI feature:
run this ingame: /coro config common set watut-server.toml dynamicGuiDontSendConstantGUIUpdates true
or update the config file:
config/watut-server.toml
set dynamicGuiDontSendConstantGUIUpdates to true
This will make it only send 1 snapshot of your gui to others, when you open it, and you wont see a flicker
The flicker happens every time it takes a snapshot so I need to do some additional prep to avoid JEI flickering.
I'm having issues tracking this one down, theres something in ATM10 thats doing it but its a nightmare to remove mods and get the thing to still run correctly, if anyone can isolate the mods that are causing this compatibility issue that'd be appreciated.
Thanks :D
After some painful binary mod comparing I know the relics mod is part of it, at least for this specific case for all the mods 10, but if i put it in with a minimal mod setup the issue doesnt exist
Browsing the code i see relics does stuff close to where i mixin, and does some event pushing of their own
public void onTooltipRender(Font font, List<ClientTooltipComponent> tooltip, int x, int y, ClientTooltipPositioner positioner, CallbackInfo info, RenderTooltipEvent.Pre event, int width, int height, int postWidth, int postHeight, Vector2ic postPos) {
if (!tooltip.isEmpty())
NeoForge.EVENT_BUS.post(new TooltipDisplayEvent(event.getItemStack(), (GuiGraphics) (Object) this, postWidth, postHeight, postPos.x(), postPos.y()));
}
I hook into renderWithTooltip so I might be onto something here, it might be relics + whatever mod makes use of relics TooltipDisplayEvent
edit: its flickering again even without relics mod now, mocking my attempts to isolate the problem
Heres the modlist.txt that had the issue for us.
it's significantly smaller than atm10 to help isolate the potential issue as well as being significantly different from the other mod list that had issues so it might help cross reference things.
note the version of WATUT on that list is an older one as i couldn't find the setting at the time so i just downgraded the mod instead which i had already done before i made this list.
this was one hell of a huntdown to find the issue,
glad a fix is already being worked on ^^
there seems to be 2 types of flickering,
-
one that applies to default minecraft/JEI (not affecting me since I have EMI)
-
and another that's affecting the whole UI (EMI's tooltips, aswell as FancyMenu)
- I have a small list from testing (will test some more)
- it seemed twilightforest was the cause, but having an instance with only Watut, FancyMenu and twilight doesn't have the issue
- I have a small list from testing (will test some more)
EDIT: THREE TYPES?!?
I just had flashes of EMI through FancyMenu's bar ๐คจ
mods I added:
I'll be leaving this hanging, using the config setting for now
my full modlist
I constantly had Accessories/Curios removed so all mods dependant on these were also removed
Okay so, I added mods one by one, the flicker started after I added Create !
But i'm unable to reproduce the issue with just JEI, Create and Watut.
Here is the modlist:
flickering.txt
Edit: I also tested, no flickering with Create, JEI, Watut, Sodium Iris and complementary's shaders enabled.
Okay, that is weird, I assure you that I tested disabling every one by one before saying this
Maybe it has to do with the number of added UIs ?
Edit: Just a guess, but maybe the function that goes over the UIs to "screen" is looping over hidden interfaces too, and is blocking some of the rendering ? (Assuming that's how your code works, I didn't look into it)
Ok, well, I can confirm that it's not sodium or any add-ons to that. IE mods that thought it might be
After 4 hours of testing, I can confirm that you need each and every of these ELEVEN mods for the flickering to occur:
AppleSkin [3.0.5+mc1.21]
Cold Sweat [2.4-b01a]
CoroUtil [1.21.0-1.3.8]
Create [6.0.4]
Farmer's Delight [1.2.7]
Just Enough Items [19.21.0.247]
Sophisticated Core [1.3.3]
Sophisticated Storage [1.4.0]
What Are They Up To [1.21.0-1.2.3]
Xaero's Minimap [25.2.0]
Xaero's World Map [1.39.4]
Remove any of these and the bug does not occur x)
So-huuuh... Yeah. Good luck with that xD
(NeoForge 21.1.133, Minecraft 1.21.1)
If not had a change to look into it yet, however I can confirm that I did not have many of those mods installed when it was flashing. For Reference, I was trying to update the mod in OceanBlock 2. Which does not have Cold Sweat, Create, Sophisticated Storage Xaero's Minimap, or Xaero's World Map
I also have this issue, all tooltips flicker and it also makes a white cursor blink behind my mouse (it's very noticeable in person or if you slow the video down)
Mouse.flickering.webm
Here's my mod list:
Minecraft 1.21.1 with Neoforge 21.1.138
Is there no mod config accesible in the mod menu to disable the new DynamicUI feature ?
@Enderteck It needs to be disabled server-side with a command or by editing the config file directly.
took me 45 mins to find out this github issue, glad i found it and downgraded the mod, it was freaking me out!
Here's another minimal mod set on NeoForge 1.21.1.
Mod list
appleskin-neoforge-mc1.21-3.0.5.jar
architectury-13.0.8-neoforge.jar
ars_nouveau-1.21.1-5.7.1-all.jar
coroutil-neoforge-1.21.0-1.3.8.jar
curios-neoforge-9.3.1+1.21.1.jar
geckolib-neoforge-1.21.1-4.7.5.1.jar
HammerLib-1.21-21.0.14.jar
ImmersiveEngineering-1.21.1-12.1.0-185.jar
jei-1.21.1-neoforge-19.21.0.247.jar
Mekanism-1.21.1-10.7.12.77.jar
OctoLib-NEOFORGE-0.5.0.1.jar
pneumaticcraft-repressurized-8.2.12+mc1.21.1.jar
relics-1.21.1-0.10.7.2.jar
watut-neoforge-1.21.0-1.2.3.jar
@Corosauce I've narrowed it down to these mods:
- Create
- Dynamic Surroundings
- Farmers Delight
- Relics
- Iron's Spells 'n Spellbooks
With of course all of their dependencies and the latest versions as of this msg on 1.21.1 NeoForge.
Strangely, disabling one of those will cause the flashing to cease. But once all of them are running together, the flashing occurs At least in my testing. Anyways, here's a log for ya.
https://mclo.gs/s3BGxHx
@Luviam It also happens with my modpack too but only has create and FD from this list.
@Corosauce I've narrowed it down to these mods:
* Create * Dynamic Surroundings * Farmers Delight * Relics * Iron's Spells 'n Spellbooks With of course all of their dependencies and the latest versions as of this msg on 1.21.1 NeoForge. Strangely, disabling one of those will cause the flashing to cease. But once all of them are running together, the flashing occurs At least in my testing. Anyways, here's a log for ya. https://mclo.gs/s3BGxHx
I have no blinking at all with these mods (plus JEI and WATUT of course)...
Here is my log file:
https://mclo.gs/NqdpnCo
Thanks for the feedback everyone.
@Luviam thanks a bunch for isolating it down, I wasn't having the issue from that list until I finally added create and its now reproducing the issue, hopefully the reproducing stays reliable and I'm able to dive into the create / flywheel mod code to see what special magic its doing to interfere with my code.
Can't reproduce it with create alone, go figure.
This list reproduces it, but if I remove ANY of the non lib mods, it stops, thats just insane, what is going on here.
architectury-13.0.8-neoforge.jar
coroutil-neoforge-1.21.0-1.3.8.jar
create-1.21.1-6.0.4.jar
curios-neoforge-9.3.1+1.21.1.jar
dynamicsurroundings-neoforge-1.21.1-0.4.2.jar
FarmersDelight-1.21.1-1.2.7.jar
geckolib-neoforge-1.21.1-4.7.5.1.jar
irons_spellbooks-1.21.1-3.11.0.jar
jei-1.21.1-neoforge-19.21.0.247.jar
OctoLib-NEOFORGE-0.5.0.1.jar
player-animation-lib-forge-2.0.1+1.21.1.jar
relics-1.21.1-0.10.7.2.jar
watut-neoforge-1.21.0-1.2.3.jar
It requires a mix of 4-5 non lib mods to have the problem occur? I might have to just explore a different way I hook into GUI rendering, it might avoid the problem entirely
Just as a note. I have had this issue without create. So more than one mod is doing something to break it. Just hope that they are all doing the same thing.
Good news, fairly confident I fixed it, I wasn't respecting forges getGuiFarPlane() value and instead was using the vanilla value for loader agnostic code, stopped the flickering in the list of mods above and ATM10, will ship out the fix soon making sure everything else works out.
Explains why weird mixes of mods was breaking it, any mods that added to the gui layers system could potentially get cut off.
took me 45 mins to find out this github issue, glad i found it and downgraded the mod, it was freaking me out!
What version did you downgrade too? I'm just curious since besides disabling it in server config, if downgrading the version works too.
Right now theres a very easy workaround without losing the dynamic GUI feature:
run this ingame:
/coro config common set watut-server.toml dynamicGuiDontSendConstantGUIUpdates trueor update the config file: config/watut-server.toml set dynamicGuiDontSendConstantGUIUpdates to true
This will make it only send 1 snapshot of your gui to others, when you open it, and you wont see a flicker
The flicker happens every time it takes a snapshot so I need to do some additional prep to avoid JEI flickering.
y'all can just enable this config option
Right now theres a very easy workaround without losing the dynamic GUI feature:
run this ingame:/coro config common set watut-server.toml dynamicGuiDontSendConstantGUIUpdates true
or update the config file: config/watut-server.toml set dynamicGuiDontSendConstantGUIUpdates to true
This will make it only send 1 snapshot of your gui to others, when you open it, and you wont see a flicker
The flicker happens every time it takes a snapshot so I need to do some additional prep to avoid JEI flickering.y'all can just enable this config option
Yea that's what I said
took me 45 mins to find out this github issue, glad i found it and downgraded the mod, it was freaking me out!
What version did you downgrade too? I'm just curious since besides disabling it in server config, if downgrading the version works too.
The one before this update
Pushed new fixed version, v1.2.6 for MC 1.21.0 and 1.21.1
I also have this issue, all tooltips flicker and it also makes a white cursor blink behind my mouse (it's very noticeable in person or if you slow the video down)
Mouse.flickering.webmHere's my mod list:
Minecraft 1.21.1 with Neoforge 21.1.138
Is there no mod config accesible in the mod menu to disable the new DynamicUI feature ?
@Enderteck yours might be a unique issue, if v1.2.6 still has the problem make a new issue report on it and I might be able to track down the conflict eventually.
@Corosauce Hi is it possible to backport this fix to 1.20.1? (Fabric)