1
0
mirror of https://github.com/p2r3/bareiron.git synced 2025-10-01 23:25:09 +02:00

fix block changes not syncing on interval

This commit is contained in:
p2r3
2025-09-13 21:58:03 +03:00
parent bdb4e4b72c
commit 61eb38a83d
3 changed files with 19 additions and 15 deletions

View File

@@ -1483,11 +1483,8 @@ void handleServerTick (int64_t time_since_last_tick) {
sc_setHealth(player->client_fd, player->health, player->hunger, player->saturation);
}
// Write data to file (if applicable)
writePlayerDataToDisk();
#ifdef DISK_SYNC_BLOCKS_ON_INTERVAL
writeBlockChangesToDisk(0, block_changes_count);
#endif
// Perform regular checks for if it's time to write to disk
writeDataToDiskOnInterval();
/**
* If the RNG seed ever hits 0, it'll never generate anything