space out config options

This commit is contained in:
p2r3
2025-09-07 13:55:16 +03:00
parent a72f405b7a
commit 5bcab2500c

View File

@@ -17,27 +17,37 @@
// TCP port, Minecraft's default is 25565
#define PORT 25565
// How many players to keep in memory, NOT the amount of concurrent players
// Even when offline, players who have logged on before take up a slot
#define MAX_PLAYERS 16
// How many mobs to allocate memory for
#define MAX_MOBS (MAX_PLAYERS)
// Manhattan distance at which mobs despawn
#define MOB_DESPAWN_DISTANCE 256
// Server game mode: 0 - survival; 1 - creative; 2 - adventure; 3 - spectator
#define GAMEMODE 0
// Max render distance, determines how many chunks to send
#define VIEW_DISTANCE 2
// Time between server ticks in microseconds (default = 1s)
#define TIME_BETWEEN_TICKS 1000000
// Calculated from TIME_BETWEEN_TICKS
#define TICKS_PER_SECOND ((float)1000000 / TIME_BETWEEN_TICKS)
// How many visited chunk coordinates to "remember"
// The server will not re-send chunks that the player has recently been in
#define VISITED_HISTORY 4
// How many player-made block changes to allow
// Determines the fixed amount of memory allocated to blocks
#define MAX_BLOCK_CHANGES 20000
// If defined, writes and reads world data to/from disk (or flash).
// This is a synchronous operation, and can cause performance issues if
// frequent random disk access is slow. Data is still stored in and
@@ -48,34 +58,43 @@
#ifndef ESP_PLATFORM
#define SYNC_WORLD_TO_DISK
#endif
// The minimum interval (in microseconds) at which certain data is written
// to disk/flash. Bounded on the low end by TIME_BETWEEN_TICKS. By default,
// applies only to player data. Block changes are written as soon as they
// are made, but in much smaller portions. Set DISK_SYNC_BLOCKS_ON_INTERVAL
// to make this apply to block changes as well.
#define DISK_SYNC_INTERVAL 15000000
// Whether to sync block changes to disk on an interval, instead of syncing
// on each change. On systems with fast random disk access, this shouldn't
// be necessary.
// #define DISK_SYNC_BLOCKS_ON_INTERVAL
// Time in microseconds to spend waiting for data transmission before
// timing out. Default is 15s, which leaves 5s to prevent starving other
// clients from Keep Alive packets.
#define NETWORK_TIMEOUT_TIME 15000000
// If defined, scales the frequency at which player movement updates are
// broadcast based on the amount of players, reducing overhead for higher
// player counts. For very many players, makes movement look jittery.
#define SCALE_MOVEMENT_UPDATES_TO_PLAYER_COUNT
// If defined, calculates fluid flow when blocks are updated near fluids
// Somewhat computationally expensive and potentially unstable
#define DO_FLUID_FLOW
// If defined, allows players to craft and use chests.
// Chests take up 15 block change slots each, require additional checks,
// and use some terrible memory hacks to function. On some platforms, this
// could cause bad performance or even crashes during gameplay.
#define ALLOW_CHESTS
// If defined, enables flight for all players. As a side-effect, allows
// players to sprint when starving.
// #define ENABLE_PLAYER_FLIGHT
// If defined, enables the item pickup animation when mining a block/
// Does not affect how item pickups work! Items from broken blocks still
// get placed directly in the inventory, this is just an animation.
@@ -85,10 +104,13 @@
// If defined, logs unrecognized packet IDs
// #define DEV_LOG_UNKNOWN_PACKETS
// If defined, logs cases when packet length doesn't match parsed byte count
#define DEV_LOG_LENGTH_DISCREPANCY
// If defined, log chunk generation events
#define DEV_LOG_CHUNK_GENERATION
// If defined, allows dumping world data by sending 0xBEEF (big-endian),
// and uploading world data by sending 0xFEED, followed by the data buffer.
// Doesn't implement authentication, hence disabled by default.