CMDred / TimeLib

A Minecraft Data Pack library that lets you get the real life date & time ingame.
MIT License
5 stars 0 forks source link

Bug: Quick desync on reload #2

Closed SilicatYT closed 10 months ago

SilicatYT commented 10 months ago

Bug:

If you /reload shortly before the "Seconds" timer would increment, the first rough time update skips a second, so when the next second starts and the thorough time update happens, the same second gets repeated and it's in sync again.

Potential cause:

The scheduled "increment" functions probably don't get cleared, as the same phenomenon can be observed when minutes are supposed to increment as well. There, it subtracts 60 from the seconds timer, indicating that it's not a problem with reading the command block's values.

https://github.com/BluesCrew/TimeLib/assets/77808092/30cc0ea4-9b87-456e-9994-b808241969a2

SilicatYT commented 10 months ago

Fixed:

It was indeed a problem that was caused by not clearing the scheduled timer functions when updating the time.