Compatibility issue with the Neat Mod HP plates lost color.
SirAron111 opened this issue · 20 comments
Minecraft version: 1.12.2
Wizardry version: 4.2.0 / 4.2.1 / 4.2.2
Environment: Singleplayer
Issue details:
For some reason the Nameplates with the HP bar from the Mod Neat are visually gray instead of the Green to red they had before the Wizardry update. They are all grey now here is a picture.
Other mods involved:
Neat (PSI/AutoRegLib)
Okay this is obviously quite a wide issue so any help is appreciated for me to get it fixed.
Here's what I know:
- It's an OpenGL state issue, something is obviously not getting reset somewhere
- Affected things are dull and grey or just lose their colour
- The problem was introduced in wizardry 4.2.0
- It happens all the time, regardless of what you're looking at or what is being rendered in the player's field of view
Thinking about it, that last point means it must be somewhere that gets called every frame, which narrows it down a lot. I'll try running it alongside embers in my dev environment to track down the offending code.
Please don't post any more examples unless they contain new information, and please keep them to this issue thread rather than #208 or #289.
Sry other than finding out what mod causes a problem and or with what mods it conflicts and testing it, I can’t do much to help since I can’t code at all. All I know is already stated above.
But I do hope someone will find the cause. Maybe other modders who now a lot about rendering particles and overlays may know what’s wrong… if you need some test runs done if you change something around thought, send it to me and I will run it against al the mods in question (thought I bet it’s the same error affecting all of them the same way so if you find one you find them all. And I recommend for quick testing, to run it against the “More overlays” mod since you only need to press one button to bring up the light lvl overlay which alongside your mod is colorless atm as shown in #208. Instead of having to keep building embers setups)
I would be glad if a fix can be found for this. maybe ask som of the mod makers from the affected mods. at least to narrow down what similaritys in the code they have to be affected.
I am not sure if this helps but maybe you could in a copy of the mod do what I do to find errors. Disable part after part until you find the cause. So like disable the overlay you add which shows the wands spells and cool down, run it up and see if that fixes it, if not disable something else related to rendering and see if that’s the cause and so on and so on until you find that one annoying little piece that’s causing it. Because from my recent testing it seems to be something in the rendering order messing up as if the particles get rendered than something from ebwiz renders which overwrites the render from the color or something like that especialy if it depends on what the player looks at ifthat helps in anyway.
Is the can't reproduce
tag still up-to-date?
AFACT from having a quick look through all of Wizardry's event handlers, the only one that qualifies is RenderArcaneLock.onRenderWorldLastEvent.
I see a few things potentially wrong with it:
- it calls
blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA)
but never reverts back to the defaulttryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO)
.
Do note that naively reverting to the default at the end of the method won't work becauseGlStateTracker.blendFunc
is broken (it updates neithersrcFactorAlpha
nordstFactorAlpha
and thereby causestryBlendFuncSeparate
to think that we're already in the correct state, even though we're not). So, even if another mod calls tryBlendFuncSeparate themselves, under certain conditions, it'll still use the wrong blend func. - it calls
bindTexture
with a random texture but doesn't revert back to the default when it's done setLightmapTextureCoords
is set but never reset. IDK what the default is during RenderWorldLastEvent, so this is either just redundant or needs resettingdisableRescaleNormal
after the method but not enable before, so depending on the default, just redundant or incorrect
I'd have tried to check/fix a few of those but master
(01cea3d) doesn't compile for me (missing deps), so I'll leave that to you.
I cloned the repo and did some testing; and it seems like the problem is caused by GlStateManager.enableLighting();
on line 85. Commenting that line out causes Embers' particles to render correctly.
I can't confirm if it's the source of the problem with Neat's nameplates since I couldn't reproduce that issue, but it's definitely a/the cause of the particle issues.
Good to see some positive development on this issue. Hope the things you figured out will help solve the color losing issue.
Thanks to everyone who has investigated this issue. The above PR will hopefully resolve this, I should get a patch done in the next few days that will include that fix. Once that is out, if anyone can do a few tests of the things that caused rendering problems that would be great. It's entirely possible there are multiple GL state issues affecting compatibility with different mods so this fix alone may not cover them all.
if you can get me an instance where this is all happening and explain to me how to set up minecraft to get the gl state info you need then i've got more than enough spare time to run all that for you
Okay that's clearly a GL state problem. Does this happen all the time or do some things make it revert to normal? I know why it would happen but I need to narrow down the source of the problem.
happens all the time its permanent as long as i use the new version of EBWiz also happens on all mobs and i noticed it also happens to the text that apears when i use the feature from quark mod that makes mobs randomly talk nonsens (quark and neat are made by vazkii so probably using the same overlay tingy)
i've had that issue in instances even without electroblob's wizardry, it's a pretty inconsistent GL state error
@lag42 Never had this issue before I updated wizardry! It’s literally on all gui pop up plates like the “Neat” hp bar or the “Quark” random text and removing or downgrading wizardry fixes it so. All I can think of is that one of the gui overlays or shaders that get used causes this (didn’t test the bug fix version of EBWiz)
Can't seem to reproduce this with just Wizardry and Neat. Neat's HP plates are rendered in-world so it can't possibly be GUIs causing the problem, since they are rendered after the world. If anyone can help narrow this down to help me reproduce the problem, that would be helpful.
Ok I did narrow it down and found the mod causing the conflict with EBWiz.
First of all non of these problems happen without EBWiz installed.
So for embers having colorless particles I can confirm it does happen. Every time embers rekindlated is installed alongside EBWiz.
As for the Neat Nameplates: I narrowed it down to the Mod called PSI made from the same Mod maker called Vazkii PSI needs AutoRegLib to work so that mod is also installed. Making it 4 Mods to reproduce the issue! (Also it should be noted that when the Neat Config to render nameplates to only render when looked at its always the gray HP bar but when you keep it at default to render all nameplates the First Mob you spawn will have the Gray Plate and all next ones will for some reason have color again until you are out of range from the gray one to render and the next spawned after that is grayed put again.)
I had this option turned to only render the one I look at in my modpack so I noticed this on all mobs I looked at even if I changed who I looked at as the old one unrendered and the new mob I looked at rendered a new hp bar so ye. But the cause of the Problem is ebwiz Psi only triggers this when installed alongside Neat it probably also triggers this without neat installed there probably is just no way to see it otherwise maybe in one of the gazillion combinations of CAD programs or huds I think PSI hocks into Neat (Random text above mob heads from dynamic surroundings Entity Chat fucntion and player speach bubles using asimmilar render as neat) so it gets affected
Only happens with EBWiz versions 4.2.0 and 4.2.1
Here are some pictures:
The Embers stuff is just in this picture I also tested it without embers still had the same gray HP plates as long as Psi and EBWWiz where together. But the embers stuff also happens alone so that’s probably another issue or strangely related.
GZ
SirAron
VazkiiMods/Psi#525 Referenced the issue here to see if maybe the mod maker of PSI/ Neat/ AutoRegLib etc has some input on this issue!
The issue also occurs with MoreOverlays mod. I can startup a new world with just forge 14.23.5.2847, Electroblob 4.2.3 and MoreOverlays 1.15.1 and the issue happens. Both overlays, light level and chunk boundaries, show up as gray instead of the configured colors. When I use the older 4.1.4 Electroblob Wizardry, the overlays work correctly.