Serene Seasons

Serene Seasons

53M Downloads

TimeSkipHandler doesn't support multiple worlds

LXGaming opened this issue ยท 1 comments

commented

Bug Report

I found this issue while investigating a "Compatibility issue" that was reported LXGaming/MixinBootstrap#6

What's the issue you encountered?

Things to be aware of:

  1. The /time set <amount> command will set the DayTime for every world.
  2. The End and Nether share the same DayTime as the Overworld, See DerivedWorldInfo and ServerMultiWorld (Mod developers supposedly have the ability to override this behavior when implementing custom worlds, Keep this in mind for mod support).
  3. Due to the DerivedWorldInfo the time only increments when the overworld is ticked.

Because worlds can share the same time when the TimeSkipHandler ticks a world it will store this value in the lastDayTime field causing subsequent worlds with the same time to not be updated due to the difference being calculated to 0.

There is also these additional issues:

  • difference may be calculated using the lastDayTime of a different world which may have a different time.
  • Worlds having a difference greater than -24000 will result in it never getting updated (unless it's the first dimension to get ticked in which case it'll be updated once).

How can the issue be reproduced?

  1. Have one player in the Overworld and another player in the Nether. (Or get a mod like Immersive Portals to keep the Nether loaded)
  2. Run /time set night
  3. Sleep

What happens is the Nether gets updated but not the overworld, what should happen is all worlds should get updated.

Logs

Note: I added the dimension id to the preexisting log message in the TimeSkipHandler.

[21:29:00] [Server thread/INFO] [minecraft/DedicatedServer]: [LX_Gaming: Set the time to 13000]
[21:29:09] [Server thread/INFO] [sereneseasons/]: Season time skipped by 10815 for -1

Mod Version

SereneSeasons v1.15.2-3.0.0.67

commented

Closing this as this has already been resolved