Skip to content

Region-Threading tick Command#180

Merged
Dueris merged 9 commits intover/1.21.11from
feat/region-tick-loops
Apr 8, 2026
Merged

Region-Threading tick Command#180
Dueris merged 9 commits intover/1.21.11from
feat/region-tick-loops

Conversation

@Dueris
Copy link
Copy Markdown
Member

@Dueris Dueris commented Mar 30, 2026

Canvas previously added back the tick command, allowing server-wide modifiable tick rate, sprinting, freezing, etc. This patch was incomplete, because "stepping" was never implemented, and this way was always kinda janky and messy, and a bit all over the place.

This new implementation provides a replacement set of logic for the tick command, offering the ability to change the server-wide tick rate, and allowing to toggle schedule-handle-specific features like:

  • Sprinting -- allows ignoring "deadlines" and speeding up to the next tick immediately until a certain amount of ticks have been run
  • Pause -- allows "freezing" the schedule handle, making it so that it will not run specific game elements
  • Play -- allows "unfreezing" the schedule handle, now letting it run game elements again
  • Walking -- tells the schedule handle to stop sprinting if the schedule handle specified is sprinting

These features allow server admins to modify region-independent tick states, without effecting the rest of the server. There ofc is the option to enable effecting the whole server, since the new command accepts a few arguments:

  • global - Global tick thread
  • server - Every single schedule handle
  • <block X coord> <block Z coord> - To select a specific region. This region must be loaded though, and this is only available to players.

This is a much more clean and efficient way to modify and track the independent tick states of regions and the global tick, which can be very useful for debugging, even in production.

@Dueris Dueris requested review from a team, MrMasrozYTLIVE and Toffikk and removed request for a team March 30, 2026 07:22
@Dueris Dueris added enhancement New feature or request needs-docs labels Mar 30, 2026
@Dueris Dueris requested review from R00tB33rMan and coredex-source and removed request for a team March 30, 2026 07:22
@Dueris
Copy link
Copy Markdown
Member Author

Dueris commented Apr 5, 2026

Ready for review now, all features are in and tested

@Dueris
Copy link
Copy Markdown
Member Author

Dueris commented Apr 5, 2026

Now that I think abt it, redstone tick time should pause in the region if the region is paused. Ill work on that in the morning probably

@Dueris
Copy link
Copy Markdown
Member Author

Dueris commented Apr 5, 2026

image

Redstone tick time is already covered by the if statement here. runsNormally is doesRunGameElements()

Dueris added 2 commits April 6, 2026 19:00
# Conflicts:
#	canvas-server/minecraft-patches/base/0007-Improve-Region-Scheduler.patch
Comment thread canvas-server/src/main/java/io/canvasmc/canvas/command/sub/RegionTickCommand.java Outdated
@Dueris Dueris merged commit d629526 into ver/1.21.11 Apr 8, 2026
1 check passed
@Dueris Dueris deleted the feat/region-tick-loops branch April 8, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants