Skip to content

fix configurable daylight cycle not working#1788

Merged
granny merged 1 commit into
PurpurMC:ver/26.2from
kacimiamine:fix/daylight-cycle
Jun 21, 2026
Merged

fix configurable daylight cycle not working#1788
granny merged 1 commit into
PurpurMC:ver/26.2from
kacimiamine:fix/daylight-cycle

Conversation

@kacimiamine

Copy link
Copy Markdown
Contributor

Add back the configurable daylight cycle feature by updating the clock instances on every tick.

incrementTicks is the config value that gets multiplied by the clock instance rate (So that our custom daylight cycle will also respect the rate if provided using /time etc).

Clock instance's rate goes back to the original value so it won't overflow if it gets multiplied again and again.

Sync with the client's time using broadcastUpdates()

Note:

  • This respects the Paper's config value time.affects-all-worlds meaning if this value is true, the daylight cycle will use the overworld ones (The cycle will be global than per-world, since this is easier to work with and maintain)

I tested various values, along with the time commands and rate, it works as intended.

Fixes #1776

@granny granny left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love you

@granny granny changed the title Enable configurable daylight cycle fix configurable daylight cycle not working Jun 21, 2026
@granny granny merged commit 335be89 into PurpurMC:ver/26.2 Jun 21, 2026
1 check passed
@kacimiamine kacimiamine deleted the fix/daylight-cycle branch June 22, 2026 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable and use daylight cycle / night cycle and put in higher ticks than vanilla

2 participants