Nature's Compass

Nature's Compass

116M Downloads

Weird Text Bug in the 'overlay'?

TheMerricat opened this issue ยท 7 comments

commented

qruYpdD

Any idea what causes this? I've been using Valhelsia 6 for the past several months and I know I wasn't originally getting when I was first using the compass to look for a biome, but for some reason when I went to use it today the text from the compass looks like this.

I'm sure it's probably not directly this mod, since I don't think it's been updated on my end since the last time I've used it. But I have no idea what other mods could be futzing with this.

commented

Seems like https://www.curseforge.com/minecraft/mc-mods/hud-compass is causing the same issue.

image

commented

Hi, dev of Hud Compass here. This feels like an interaction caused by an outdated way of doing overlay renderers -- that is, drawing things in the RenderGuiOverlayEvent instead of using the overlay renderer feature I added to forge a couple years ago. A quick look at the code seems to indicate this is the case, since the code at https://github.com/MattCzyr/NaturesCompass/blob/master/src/main/java/com/chaosthedude/naturescompass/client/ClientEventHandler.java is drawing straight in the overlay event, and on top of that, it does so without any layer check so it is drawing multiple times (once for each game overlay layer). This means the issue is there even when it doesn't appear to be, but it was only discovered because of this interaction causing one of the layers to be shifted out of position.

For the less issue-prone way, it would be best to register an overlay renderer (a class that extends IGuiOverlay) like I do here: https://github.com/gigaherz/HudCompass/blob/2e075ff0f6b5cac576849a4422c3bd97e7e85626/src/main/java/dev/gigaherz/hudcompass/client/HudOverlay.java#L60-L64

Edited to add: If changing over to an overlay renderer is not wanted, the simpler solution would be to add a render check
like if(event.getType() != RenderGameOverlayEvent.ElementType.ALL) return; to ensure it only runs once.

commented

@gigaherz Thanks, you're right, that code to render the overlay has been around forever, didn't realize there was a newer way to do it. I swapped this out for an overlay renderer and this seems to have fixed the issue. Should be fixed in version 1.11.5.

commented

Might be related to #163. Do you have Advanced Compass installed? That mod seems to do something weird with its rendering which duplicates the Nature's Compass HUD. There's been an issue open about it on their issue tracker for some time now.

commented

Sorry for the delayed response. I'm actually using https://www.curseforge.com/minecraft/modpacks/valhelsia-6 - and reviewing the mods included it doesn't seem as if Advanced Compass is included in that, but I do know that it only started happening when I updated to the 6.0.0-beta_20 update. https://wiki.valhelsia.net/modpacks/valhelsia-6/changelog#6.0.0-beta_20-beta-update

Again, I doubt it's Natures Compass's problem but figured I'd add more data points to the conversation.

commented

And less than 10 minutes after I reply I re-read the changelog that I linked to and realize I know exactly which mod is the issue.

Just launched without it enabled and the visual glitch goes away. It's https://www.curseforge.com/minecraft/mc-mods/raised just opened an issue on their side yurisuika/Raised#78 referencing this one.

Sorry for the bother.

commented

Are you still supporting 1.20.1? as this is still an issue here, specifically playing on valhelsia 6