ServerBlockTicking: Difference between revisions

From Vintage Story Wiki
no edit summary
(Created page with "== General == By default the server randomly ticks blocks throughout the world every 50ms. It ticks a chunk radius around the player. For each chunk, 16 blocks are sampled at...")
 
No edit summary
Line 28: Line 28:
| 1.0
| 1.0
|}
|}
== How long does it take ==
Since blocks tick at random it's not entirely deterministic how long it will take for a block to receive a tick. However, here is some information to predict about when it should tick.
Every 50ms the server ticks chunks around the player. By default this is a 3 chunk radius including the chunk the player is currently standing in. That means each chunk ticks 20 times per second. Each tick loop, 16 blocks will be ticked. There are 32,768 blocks in a chunk. So that means there is a probability of 16/32768=0.00048828125 of ticking each time or 1/2048. So it will take on average 2048 tick loops for a particular block to tick. Blocks are ticked 20 times per second so it will take on average 2048/20=102.4 seconds for a block to tick.
== Configuration ==
You can change the rate at which the server ticks by editing values in the serverconfig.json file.
RandomTickDistance - How many chunks around the player to tick. Default=3
RandomTickSamples - The number of blocks to tick each loop. Default=16
RandomTickInterval - How often the tick loop runs. Default=50
MaxRandomTicks - Max queued ticks to process each loop. You shouldn't ever need to touch this. Default=10000
256

edits