Bossbar offset wrong
Flemmli97 opened this issue ยท 4 comments
Mod loader
Please select
Minecraft version
1.21.1
Mod version
15.10.1
Modloader version
NeoForge + Fabric
Modpack info
No response
[IMPORTANT] If bug:
- I have confirmed this bug is reproducible on a minimal setup, not a modpack with many other mods.
[IMPORTANT] If bug: The latest.log file, not the crash report
No response
Issue description
Currently if a mod is adding custom bossbars the offset is calculated wrongly.
On Neo:
https://github.com/Snownee/Jade/blob/1.21-neoforge/src/main/java/snownee/jade/util/ClientProxy.java#L257
It would be better to check for an increment of 0.
To render a custom bossbar mods NEED to cancel the event to prevent the vanilla bar from rendering.
On Fabric:
Since no API.
I suggest extending the mixin into BossHealthOverlay by capturing the integer variable in the render method which is the offset directly. Not too sure about future versions but there is a pop call at the end of the loop which can be targeted to capture the offset
Do you know of example mods for NeoForge and Fabric so I can know the implementation is correct?
a mod needs to cancel the event to render their own bossbar. but if the mod is coded properly they will update the offset in the event. and imo this is the best way
It would be better to check for an increment of 0.
Hi, I am not sure what you mean. If a mod canceled the event, how do I know the correct offset?
