Crash when another mod fires RenderGameOverlayEvent.Post
yeelp opened this issue ยท 1 comments
Hi, I'm the developer of a small mod called Scaling Feast. I've received an issue regarding DankNull causing a game crash. My mod needs to redraw the hunger bar, so I subscribe to RenderGameOverlayEvent.Pre, cancel the event if the element type is set to FOOD, draw the new hunger bar, then fire a RenderGameOverlayEvent.Post with element type FOOD (which mods like ArmorToughnessBar use to draw their HUD elements).
It would appear that DankNull tries to cancel this event, although it can't be canceled, causing a crash.
I've asked the original issue opener about version info for DankNull, which I will forward to this issue as soon as I get it. I'm opening this issue now to keep you informed.
You can view the original issue posted on Scaling Feast's repository here.
What's strange is the crash log references DankNull's ModEvents.java:96 as the problem, which refers to
which of course makes so sense. You even check to see if the event is cancelable first! Since you're subscribed to RenderGameOverlayEvent, you should be canceling the RenderGameOverlayEvent.Pre that causes this problem in the first place, unless there's an issue with event priorities.
Any thoughts?
Tell your user to update their version of Dank-Null. They were on version 90 which this was a known issue (#301).