Being spammed in log and ui
Xetaxheb opened this issue ยท 19 comments
Issue Description:
My console and log and ui are being spammed with "Step Assist may be disabled by another mod", how do I disable this message?
What happens:
I put on dark boots with jump, I get spammed
What you expected to happen:
Maybe a tooltip notice or something, not this spam.
Steps to reproduce:
- Put on dark boots
- Get spammed
...
Affected Versions (Do not use "latest"):
- EnderIO: 5.0.43
- EnderCore: 0.5.52
- Minecraft: 1.12.2
- Forge: 2836
- SpongeForge? no
- Optifine? yes
- Single Player
Also, if you're looking at the same commit linked above as I am, or even the current file, it distinctly does NOT check if "clienttweaks is actually modifying the player's step height", only whether clienttweaks is a loaded mod. At no point does this check clienttweaks config settings.
Because of this, the clienttweaks check is actually the opposite of helpful - if another mod is nerfing the step assist, but clienttweaks isn't installed, then the player won't even be warned.
If you trust the code to detect a nerf, then the check that clienttweaks is installed is pointless. And if you don't trust it, then it's spammy.
Fixed by 07d510b, will be in the fixed in the next release.
That doesn't look very fixed, that looks like instead of spamming every tick it spams every 6 seconds...
It needs to spam zero messages.
I don't know why you think it's fixed... the code doesn't say that it would fix it.
All it does now is add a delay instead of no delay to the spam.
It also polls for whether clienttweaks is loaded every tick since the short circuit on line 238 is backwards..
Is the fix supposed to be !Loader.isModLoaded("clienttweaks")
so it doesn't spam people with clienttweaks? because it's not coded that way.
The error message ("Step Assist may be disabled by another mod") should also make some reference to clienttweaks since it only triggers if clienttweaks is installed.
The latest jenkins builds are here:
https://ci.tterrag.com/job/EnderIO-Modules/job/EnderIO-Hourly/
Briefly, the new code checks whether clienttweaks is actually modifying the player's step height, and also fixes a subtle issue where the player's step height is alternately increased and reset every tick (this is what was actually causing the spam).
So what about the use case where clienttweaks is loaded and isn't the mod changing step height?
Say, a mod that lets you walk up fences or 7/8ths snow or soul sand but not 1 block heights?
Or botania traveller belt (and sneaking)?
Also, if you're looking at the same commit linked above as I am, or even the current file, it distinctly does NOT check if "clienttweaks is actually modifying the player's step height", only whether clienttweaks is a loaded mod. At no point does this check clienttweaks config settings.
I've looked at it.
When this function is called:
If (the player is not sneaking, and has Jumping on boots, and hasn't removed their sync flag for step assist [via hotkey toggle]) then
If the players stepheight is less than 1.0023 then
increase the warn counter then
set player step height to 1.0023 then
repeat every tick until warn counter is above 20 since another mod will be changing step height back
when warn counter is above 19:
If (the player is not sneaking, and has Jumping on boots, and hasn't removed their sync flag for step assist [via hotkey toggle]) then
If the players stepheight is less than 1.0023 then
increase the warn counter then
if (client tweaks is loaded, and counter is above 20) then
send error message
decrease warn counter to -79 [6 seconds of reprieve]
set player step height to 1.0023
repeat from beginning
If (the player sneaks at any point, OR Jumping isn't installed, OR player has removed their sync flag for step assist [via hotkey toggle]), AND step height is set to 1.0023 then
the counter is reset to 0 and step height is reset to 0.6.
As far as I can tell this updateStepHeight method runs every tick if enderio is installed, since it's called at the start of onPlayerTick if you're not a spectator.
So it doesn't warn unnecessarily. It only warns if it's changed by another, and only once every 6 seconds.
Ok so in the latest jenkins build, 5.0.953, it still spams the hell out of me and the log, only about every 2-3 seconds instead of every tick. The message never fully disappears off screen.
This still needs to happen exactly 1 or 0 times. My client tweaks isn't even set to disable step assist, and no other mod (besides enderio) is currently editing it either.