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