Status Effect Bars

Status Effect Bars

522k Downloads

Max Duration Resets Every 600 ticks Chunk

SoRadGaming opened this issue ยท 2 comments

commented

The Max duration of the status effect will reset if it's above a duration of 600 and will be split into 600 chunks, where the init function is called over and over again, restating the max duration.

I looked at your code base for my mod: https://github.com/SoRadGaming/Simple-HUD-Enhanced
I had this bug when using your implementation of max duration SoRadGaming/Simple-HUD-Enhanced#38

I fixed it by creating a new class that stores a map of all effects and duration (singleton instance) and only uses one mixin; I recommend implementing a similar solution for your max duration code, as it resolves this bug. I thought I would let you know about the issue, considering you were generous enough to open-source your mod.

Thank you :)

commented

Hi, thanks for the report!

I couldn't reproduce the issue (tried using /effect give @s speed 150 and waited until the effect ran out (3000 ticks in total) but I couldn't see anything wrong, neither on integrated server or dedicated server), could you provide reproduction steps?

commented

Yeah, I just tested it with no other mods, must have had another mod installed that was breaking the code.