2024-10-28 15:57:39 +01:00
|
|
|
// Luanti
|
|
|
|
// SPDX-License-Identifier: LGPL-2.1-or-later
|
|
|
|
// Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
2010-11-29 20:13:04 +02:00
|
|
|
|
2017-07-18 21:39:55 +02:00
|
|
|
#pragma once
|
|
|
|
|
2024-10-02 11:01:30 +02:00
|
|
|
#include "irrTypes.h"
|
|
|
|
using namespace irr;
|
2010-11-27 01:02:21 +02:00
|
|
|
|
2024-10-02 11:01:30 +02:00
|
|
|
extern const u16 LATEST_PROTOCOL_VERSION;
|
2011-10-15 15:02:28 +03:00
|
|
|
|
2012-11-26 23:58:27 +02:00
|
|
|
// Server's supported network protocol range
|
2024-10-02 11:01:30 +02:00
|
|
|
constexpr u16 SERVER_PROTOCOL_VERSION_MIN = 37;
|
2012-11-26 23:58:27 +02:00
|
|
|
|
|
|
|
// Client's supported network protocol range
|
2024-10-02 11:01:30 +02:00
|
|
|
constexpr u16 CLIENT_PROTOCOL_VERSION_MIN = 37;
|
2012-11-26 09:49:07 +02:00
|
|
|
|
2024-10-02 11:01:30 +02:00
|
|
|
extern const u16 FORMSPEC_API_VERSION;
|
2014-06-25 19:04:47 +02:00
|
|
|
|
2014-02-02 15:34:33 +01:00
|
|
|
#define TEXTURENAME_ALLOWED_CHARS "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_.-"
|
2012-01-04 00:37:46 +02:00
|
|
|
|
2017-09-27 19:47:36 +02:00
|
|
|
typedef u16 session_t;
|
|
|
|
|
2024-01-24 18:23:11 +01:00
|
|
|
enum ToClientCommand : u16
|
2010-11-27 01:02:21 +02:00
|
|
|
{
|
2015-03-13 16:35:21 +01:00
|
|
|
TOCLIENT_HELLO = 0x02,
|
2015-03-13 14:14:48 +01:00
|
|
|
/*
|
2015-04-12 04:49:13 +02:00
|
|
|
Sent after TOSERVER_INIT.
|
|
|
|
|
2022-11-09 17:57:19 +01:00
|
|
|
u8 deployed serialization version
|
2024-09-02 20:50:43 +01:00
|
|
|
u16 unused (network compression, never implemeneted)
|
2015-05-16 01:19:43 +02:00
|
|
|
u16 deployed protocol version
|
2015-04-12 04:49:13 +02:00
|
|
|
u32 supported auth methods
|
2024-09-02 20:50:43 +01:00
|
|
|
std::string unused (used to be username)
|
2015-03-13 14:14:48 +01:00
|
|
|
*/
|
2015-04-12 04:49:13 +02:00
|
|
|
TOCLIENT_AUTH_ACCEPT = 0x03,
|
|
|
|
/*
|
|
|
|
Message from server to accept auth.
|
2015-03-13 14:14:48 +01:00
|
|
|
|
2015-04-12 04:49:13 +02:00
|
|
|
v3s16 player's position + v3f(0,BS/2,0) floatToInt'd
|
|
|
|
u64 map seed
|
|
|
|
f1000 recommended send interval
|
|
|
|
u32 : supported auth methods for sudo mode
|
|
|
|
(where the user can change their password)
|
|
|
|
*/
|
|
|
|
TOCLIENT_ACCEPT_SUDO_MODE = 0x04,
|
|
|
|
/*
|
|
|
|
Sent to client to show it is in sudo mode now.
|
|
|
|
*/
|
|
|
|
TOCLIENT_DENY_SUDO_MODE = 0x05,
|
|
|
|
/*
|
|
|
|
Signals client that sudo mode auth failed.
|
|
|
|
*/
|
|
|
|
TOCLIENT_ACCESS_DENIED = 0x0A,
|
|
|
|
/*
|
|
|
|
u8 reason
|
2015-07-17 16:40:41 +02:00
|
|
|
std::string custom reason (if needed, otherwise "")
|
|
|
|
u8 (bool) reconnect
|
2015-04-12 04:49:13 +02:00
|
|
|
*/
|
2017-09-12 19:48:09 +02:00
|
|
|
|
2024-01-24 18:23:11 +01:00
|
|
|
TOCLIENT_BLOCKDATA = 0x20,
|
2010-11-27 17:18:34 +02:00
|
|
|
TOCLIENT_ADDNODE = 0x21,
|
2013-11-23 15:35:49 +01:00
|
|
|
/*
|
|
|
|
v3s16 position
|
|
|
|
serialized mapnode
|
|
|
|
u8 keep_metadata // Added in protocol version 22
|
|
|
|
*/
|
2010-11-27 17:18:34 +02:00
|
|
|
TOCLIENT_REMOVENODE = 0x22,
|
2014-04-28 23:41:27 +02:00
|
|
|
|
2010-11-27 17:18:34 +02:00
|
|
|
TOCLIENT_INVENTORY = 0x27,
|
2010-11-27 01:02:21 +02:00
|
|
|
/*
|
|
|
|
[0] u16 command
|
|
|
|
[2] serialized inventory
|
|
|
|
*/
|
2014-04-28 23:41:27 +02:00
|
|
|
|
2010-12-20 14:04:31 +02:00
|
|
|
TOCLIENT_TIME_OF_DAY = 0x29,
|
|
|
|
/*
|
|
|
|
u16 time (0-23999)
|
2012-03-16 16:34:30 +02:00
|
|
|
f1000 time_speed
|
2010-12-20 14:04:31 +02:00
|
|
|
*/
|
2010-12-23 22:35:53 +02:00
|
|
|
|
2018-06-20 22:36:08 +02:00
|
|
|
TOCLIENT_CSM_RESTRICTION_FLAGS = 0x2A,
|
2017-07-18 21:39:55 +02:00
|
|
|
/*
|
2018-06-20 22:36:08 +02:00
|
|
|
u32 CSMRestrictionFlags byteflag
|
2017-07-18 21:39:55 +02:00
|
|
|
*/
|
|
|
|
|
2019-07-16 14:00:42 +02:00
|
|
|
TOCLIENT_PLAYER_SPEED = 0x2B,
|
|
|
|
/*
|
|
|
|
v3f added_vel
|
|
|
|
*/
|
|
|
|
|
2020-06-13 19:03:26 +02:00
|
|
|
TOCLIENT_MEDIA_PUSH = 0x2C,
|
|
|
|
/*
|
|
|
|
std::string raw_hash
|
|
|
|
std::string filename
|
2021-09-09 16:51:35 +02:00
|
|
|
u32 callback_token
|
2020-06-13 19:03:26 +02:00
|
|
|
bool should_be_cached
|
|
|
|
*/
|
|
|
|
|
2017-07-16 10:47:31 +02:00
|
|
|
TOCLIENT_CHAT_MESSAGE = 0x2F,
|
|
|
|
/*
|
|
|
|
u8 version
|
|
|
|
u8 message_type
|
|
|
|
u16 sendername length
|
|
|
|
wstring sendername
|
|
|
|
u16 length
|
|
|
|
wstring message
|
|
|
|
*/
|
|
|
|
|
2011-02-21 00:45:14 +02:00
|
|
|
TOCLIENT_ACTIVE_OBJECT_REMOVE_ADD = 0x31,
|
|
|
|
/*
|
|
|
|
u16 count of removed objects
|
|
|
|
for all removed objects {
|
|
|
|
u16 id
|
|
|
|
}
|
|
|
|
u16 count of added objects
|
|
|
|
for all added objects {
|
|
|
|
u16 id
|
|
|
|
u8 type
|
2011-08-22 22:04:46 +03:00
|
|
|
u32 initialization data length
|
2011-02-21 16:10:36 +02:00
|
|
|
string initialization data
|
2011-02-21 00:45:14 +02:00
|
|
|
}
|
|
|
|
*/
|
2014-04-28 23:41:27 +02:00
|
|
|
|
2011-02-21 00:45:14 +02:00
|
|
|
TOCLIENT_ACTIVE_OBJECT_MESSAGES = 0x32,
|
|
|
|
/*
|
|
|
|
for all objects
|
|
|
|
{
|
|
|
|
u16 id
|
|
|
|
u16 message length
|
|
|
|
string message
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
|
2011-04-21 19:35:17 +03:00
|
|
|
TOCLIENT_HP = 0x33,
|
|
|
|
/*
|
|
|
|
u8 hp
|
|
|
|
*/
|
|
|
|
|
|
|
|
TOCLIENT_MOVE_PLAYER = 0x34,
|
|
|
|
/*
|
|
|
|
v3f1000 player position
|
|
|
|
f1000 player pitch
|
|
|
|
f1000 player yaw
|
|
|
|
*/
|
2011-05-20 20:28:03 +01:00
|
|
|
|
2015-03-13 13:40:48 +01:00
|
|
|
TOCLIENT_ACCESS_DENIED_LEGACY = 0x35,
|
2011-05-20 20:28:03 +01:00
|
|
|
/*
|
2011-05-29 21:11:16 +03:00
|
|
|
u16 reason_length
|
|
|
|
wstring reason
|
2011-05-20 20:28:03 +01:00
|
|
|
*/
|
2011-08-11 07:02:57 +02:00
|
|
|
|
2018-07-15 05:56:30 +05:30
|
|
|
TOCLIENT_FOV = 0x36,
|
|
|
|
/*
|
|
|
|
Sends an FOV override/multiplier to client.
|
|
|
|
|
2020-05-02 16:22:11 +05:30
|
|
|
f32 fov
|
2018-07-15 05:56:30 +05:30
|
|
|
bool is_multiplier
|
2020-05-02 16:22:11 +05:30
|
|
|
f32 transition_time
|
2018-07-15 05:56:30 +05:30
|
|
|
*/
|
2011-10-15 14:46:59 +03:00
|
|
|
|
2024-09-24 22:37:44 +02:00
|
|
|
TOCLIENT_DEATHSCREEN_LEGACY = 0x37,
|
2011-10-15 14:46:59 +03:00
|
|
|
/*
|
2024-09-24 22:37:44 +02:00
|
|
|
u8 bool unused
|
|
|
|
v3f1000 unused
|
2011-10-15 14:46:59 +03:00
|
|
|
*/
|
2011-11-15 01:00:16 +02:00
|
|
|
|
2012-03-25 11:50:29 +03:00
|
|
|
TOCLIENT_MEDIA = 0x38,
|
2011-11-15 11:02:47 +02:00
|
|
|
/*
|
2011-11-15 23:58:56 +02:00
|
|
|
u16 total number of texture bunches
|
|
|
|
u16 index of this bunch
|
2012-03-25 11:50:29 +03:00
|
|
|
u32 number of files in this bunch
|
|
|
|
for each file {
|
2011-11-15 11:02:47 +02:00
|
|
|
u16 length of name
|
|
|
|
string name
|
|
|
|
u32 length of data
|
|
|
|
data
|
|
|
|
}
|
2012-12-14 15:30:17 +04:00
|
|
|
u16 length of remote media server url (if applicable)
|
|
|
|
string url
|
2011-11-15 11:02:47 +02:00
|
|
|
*/
|
2014-04-28 23:41:27 +02:00
|
|
|
|
2011-11-15 23:58:56 +02:00
|
|
|
TOCLIENT_NODEDEF = 0x3a,
|
2011-11-15 01:00:16 +02:00
|
|
|
/*
|
2011-11-15 23:58:56 +02:00
|
|
|
u32 length of the next item
|
|
|
|
serialized NodeDefManager
|
2011-11-15 01:00:16 +02:00
|
|
|
*/
|
2014-04-28 23:41:27 +02:00
|
|
|
|
2012-03-25 11:50:29 +03:00
|
|
|
TOCLIENT_ANNOUNCE_MEDIA = 0x3c,
|
2012-01-02 13:31:50 +02:00
|
|
|
/*
|
2012-03-25 11:50:29 +03:00
|
|
|
u32 number of files
|
2012-01-02 13:31:50 +02:00
|
|
|
for each texture {
|
|
|
|
u16 length of name
|
|
|
|
string name
|
|
|
|
u16 length of sha1_digest
|
|
|
|
string sha1_digest
|
|
|
|
}
|
|
|
|
*/
|
2012-01-12 06:10:39 +01:00
|
|
|
|
|
|
|
TOCLIENT_ITEMDEF = 0x3d,
|
|
|
|
/*
|
|
|
|
u32 length of next item
|
|
|
|
serialized ItemDefManager
|
|
|
|
*/
|
2014-04-28 23:41:27 +02:00
|
|
|
|
2012-03-24 19:01:26 +02:00
|
|
|
TOCLIENT_PLAY_SOUND = 0x3f,
|
|
|
|
/*
|
2023-06-16 20:15:21 +02:00
|
|
|
s32 server_id
|
2012-03-24 19:01:26 +02:00
|
|
|
u16 len
|
|
|
|
u8[len] sound name
|
2023-06-16 20:15:21 +02:00
|
|
|
f32 gain
|
|
|
|
u8 type (SoundLocation: 0=local, 1=positional, 2=object)
|
|
|
|
v3f pos_nodes (in BS-space)
|
2012-03-24 19:01:26 +02:00
|
|
|
u16 object_id
|
|
|
|
u8 loop (bool)
|
2023-06-16 20:15:21 +02:00
|
|
|
f32 fade
|
|
|
|
f32 pitch
|
2020-01-25 21:19:29 +01:00
|
|
|
u8 ephemeral (bool)
|
2023-06-16 20:15:21 +02:00
|
|
|
f32 start_time (in seconds)
|
2012-03-24 19:01:26 +02:00
|
|
|
*/
|
2012-01-12 06:10:39 +01:00
|
|
|
|
2012-03-24 19:01:26 +02:00
|
|
|
TOCLIENT_STOP_SOUND = 0x40,
|
|
|
|
/*
|
|
|
|
s32 sound_id
|
|
|
|
*/
|
2012-03-31 16:23:26 +03:00
|
|
|
|
|
|
|
TOCLIENT_PRIVILEGES = 0x41,
|
|
|
|
/*
|
|
|
|
u16 number of privileges
|
|
|
|
for each privilege
|
|
|
|
u16 len
|
|
|
|
u8[len] privilege
|
|
|
|
*/
|
2012-07-19 14:09:16 +03:00
|
|
|
|
|
|
|
TOCLIENT_INVENTORY_FORMSPEC = 0x42,
|
|
|
|
/*
|
|
|
|
u32 len
|
|
|
|
u8[len] formspec
|
|
|
|
*/
|
2012-07-24 20:57:17 +03:00
|
|
|
|
|
|
|
TOCLIENT_DETACHED_INVENTORY = 0x43,
|
|
|
|
/*
|
|
|
|
[0] u16 command
|
|
|
|
u16 len
|
|
|
|
u8[len] name
|
|
|
|
[2] serialized inventory
|
|
|
|
*/
|
2013-01-23 18:32:02 +01:00
|
|
|
|
2013-01-02 19:45:04 +00:00
|
|
|
TOCLIENT_SHOW_FORMSPEC = 0x44,
|
|
|
|
/*
|
|
|
|
[0] u16 command
|
2013-01-03 17:59:28 +00:00
|
|
|
u32 len
|
2013-01-02 19:45:04 +00:00
|
|
|
u8[len] formspec
|
2013-01-03 17:59:28 +00:00
|
|
|
u16 len
|
|
|
|
u8[len] formname
|
2013-01-02 19:45:04 +00:00
|
|
|
*/
|
2013-02-08 22:54:01 +02:00
|
|
|
|
|
|
|
TOCLIENT_MOVEMENT = 0x45,
|
|
|
|
/*
|
|
|
|
f1000 movement_acceleration_default
|
|
|
|
f1000 movement_acceleration_air
|
|
|
|
f1000 movement_acceleration_fast
|
|
|
|
f1000 movement_speed_walk
|
|
|
|
f1000 movement_speed_crouch
|
|
|
|
f1000 movement_speed_fast
|
|
|
|
f1000 movement_speed_climb
|
|
|
|
f1000 movement_speed_jump
|
|
|
|
f1000 movement_liquid_fluidity
|
|
|
|
f1000 movement_liquid_fluidity_smooth
|
|
|
|
f1000 movement_liquid_sink
|
|
|
|
f1000 movement_gravity
|
|
|
|
*/
|
2013-01-23 18:32:02 +01:00
|
|
|
|
|
|
|
TOCLIENT_SPAWN_PARTICLE = 0x46,
|
|
|
|
/*
|
2024-07-06 18:02:31 +02:00
|
|
|
using range<T> = RangedParameter<T> {
|
|
|
|
T min, max
|
|
|
|
f32 bias
|
|
|
|
}
|
|
|
|
using tween<T> = TweenedParameter<T> {
|
|
|
|
u8 style
|
|
|
|
u16 reps
|
|
|
|
f32 beginning
|
|
|
|
T start, end
|
|
|
|
}
|
|
|
|
|
2022-07-13 11:57:12 +02:00
|
|
|
v3f pos
|
|
|
|
v3f velocity
|
|
|
|
v3f acceleration
|
|
|
|
f32 expirationtime
|
|
|
|
f32 size
|
2013-01-23 18:32:02 +01:00
|
|
|
u8 bool collisiondetection
|
2024-07-06 18:02:31 +02:00
|
|
|
|
2013-01-23 18:32:02 +01:00
|
|
|
u32 len
|
|
|
|
u8[len] texture
|
2024-07-06 18:02:31 +02:00
|
|
|
|
2018-09-08 00:38:35 +01:00
|
|
|
u8 bool vertical
|
2024-07-06 18:02:31 +02:00
|
|
|
u8 bool collision_removal
|
|
|
|
|
2018-09-08 00:38:35 +01:00
|
|
|
TileAnimation animation
|
2024-07-06 18:02:31 +02:00
|
|
|
|
2018-09-08 00:38:35 +01:00
|
|
|
u8 glow
|
2024-07-06 18:02:31 +02:00
|
|
|
u8 bool object_collision
|
|
|
|
|
|
|
|
u16 node_param0
|
|
|
|
u8 node_param2
|
|
|
|
u8 node_tile
|
|
|
|
|
2022-07-13 11:57:12 +02:00
|
|
|
v3f drag
|
2024-07-06 18:02:31 +02:00
|
|
|
range<v3f> jitter
|
|
|
|
range<f32> bounce
|
|
|
|
|
|
|
|
texture {
|
|
|
|
u8 flags (ParticleTextureFlags)
|
|
|
|
-- bit 0: animated
|
|
|
|
-- next bits: blend mode (BlendMode)
|
|
|
|
tween<f32> alpha
|
|
|
|
tween<v2f> scale
|
|
|
|
}
|
2013-01-23 18:32:02 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
TOCLIENT_ADD_PARTICLESPAWNER = 0x47,
|
|
|
|
/*
|
2023-04-05 20:23:16 +02:00
|
|
|
using range<T> = RangedParameter<T> {
|
|
|
|
T min, max
|
|
|
|
f32 bias
|
|
|
|
}
|
|
|
|
using tween<T> = TweenedParameter<T> {
|
|
|
|
u8 style
|
|
|
|
u16 reps
|
|
|
|
f32 beginning
|
|
|
|
T start, end
|
|
|
|
}
|
|
|
|
|
2013-01-23 18:32:02 +01:00
|
|
|
u16 amount
|
2022-07-13 11:57:12 +02:00
|
|
|
f32 spawntime
|
2023-04-05 20:23:16 +02:00
|
|
|
if PROTOCOL_VERSION >= 42 {
|
2024-07-06 18:02:31 +02:00
|
|
|
tween<range<T>> pos, vel, acc, exptime, size
|
2023-04-05 20:23:16 +02:00
|
|
|
} else {
|
|
|
|
v3f minpos
|
|
|
|
v3f maxpos
|
|
|
|
v3f minvel
|
|
|
|
v3f maxvel
|
|
|
|
v3f minacc
|
|
|
|
v3f maxacc
|
|
|
|
f32 minexptime
|
|
|
|
f32 maxexptime
|
|
|
|
f32 minsize
|
|
|
|
f32 maxsize
|
|
|
|
}
|
2013-01-23 18:32:02 +01:00
|
|
|
u8 bool collisiondetection
|
2024-07-06 18:02:31 +02:00
|
|
|
|
2013-01-23 18:32:02 +01:00
|
|
|
u32 len
|
|
|
|
u8[len] texture
|
2024-07-06 18:02:31 +02:00
|
|
|
|
|
|
|
u32 spawner_id
|
2018-09-08 00:38:35 +01:00
|
|
|
u8 bool vertical
|
2024-07-06 18:02:31 +02:00
|
|
|
u8 bool collision_removal
|
|
|
|
u32 attached_id
|
|
|
|
|
2018-09-08 00:38:35 +01:00
|
|
|
TileAnimation animation
|
2024-07-06 18:02:31 +02:00
|
|
|
|
2018-09-08 00:38:35 +01:00
|
|
|
u8 glow
|
2024-07-06 18:02:31 +02:00
|
|
|
u8 bool object_collision
|
|
|
|
|
|
|
|
u16 node_param0
|
|
|
|
u8 node_param2
|
|
|
|
u8 node_tile
|
2022-07-13 11:57:12 +02:00
|
|
|
|
2023-04-05 20:23:16 +02:00
|
|
|
if PROTOCOL_VERSION < 42 {
|
|
|
|
f32 pos_start_bias
|
|
|
|
f32 vel_start_bias
|
|
|
|
f32 acc_start_bias
|
|
|
|
f32 exptime_start_bias
|
|
|
|
f32 size_start_bias
|
|
|
|
|
|
|
|
range<v3f> pos_end
|
|
|
|
-- i.e v3f pos_end_min
|
|
|
|
-- v3f pos_end_max
|
|
|
|
-- f32 pos_end_bias
|
|
|
|
range<v3f> vel_end
|
|
|
|
range<v3f> acc_end
|
2024-07-06 18:02:31 +02:00
|
|
|
range<f32> exptime_end
|
|
|
|
range<f32> size_end
|
|
|
|
}
|
|
|
|
|
|
|
|
texture {
|
|
|
|
u8 flags (ParticleTextureFlags)
|
|
|
|
-- bit 0: animated
|
|
|
|
-- next bits: blend mode (BlendMode)
|
|
|
|
tween<f32> alpha
|
|
|
|
tween<v2f> scale
|
|
|
|
|
|
|
|
if (flags.animated)
|
|
|
|
TileAnimation animation
|
2023-04-05 20:23:16 +02:00
|
|
|
}
|
2022-07-13 11:57:12 +02:00
|
|
|
|
|
|
|
tween<range<v3f>> drag
|
|
|
|
-- i.e. v3f drag_start_min
|
|
|
|
-- v3f drag_start_max
|
|
|
|
-- f32 drag_start_bias
|
|
|
|
-- v3f drag_end_min
|
|
|
|
-- v3f drag_end_max
|
|
|
|
-- f32 drag_end_bias
|
|
|
|
tween<range<v3f>> jitter
|
|
|
|
tween<range<f32>> bounce
|
|
|
|
|
|
|
|
u8 attraction_kind
|
|
|
|
none = 0
|
|
|
|
point = 1
|
|
|
|
line = 2
|
|
|
|
plane = 3
|
|
|
|
|
|
|
|
if attraction_kind > none {
|
|
|
|
tween<range<f32>> attract_strength
|
|
|
|
tween<v3f> attractor_origin
|
|
|
|
u16 attractor_origin_attachment_object_id
|
|
|
|
u8 spawner_flags
|
|
|
|
bit 1: attractor_kill (particles dies on contact)
|
|
|
|
if attraction_mode > point {
|
2024-07-06 18:02:31 +02:00
|
|
|
tween<v3f> attractor_direction
|
|
|
|
u16 attractor_direction_attachment_object_id
|
2022-07-13 11:57:12 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
tween<range<v3f>> radius
|
|
|
|
|
2024-07-06 18:02:31 +02:00
|
|
|
u16 texpool_size
|
|
|
|
texpool_size.times {
|
|
|
|
u8 flags (ParticleTextureFlags)
|
2022-07-13 11:57:12 +02:00
|
|
|
-- bit 0: animated
|
2024-07-06 18:02:31 +02:00
|
|
|
-- next bits: blend mode (BlendMode)
|
2022-07-13 11:57:12 +02:00
|
|
|
tween<f32> alpha
|
|
|
|
tween<v2f> scale
|
2024-07-06 18:02:31 +02:00
|
|
|
|
|
|
|
u32 len
|
|
|
|
u8[len] texture
|
|
|
|
|
|
|
|
if (flags.animated)
|
2022-07-13 11:57:12 +02:00
|
|
|
TileAnimation animation
|
|
|
|
}
|
|
|
|
|
2013-01-23 18:32:02 +01:00
|
|
|
*/
|
|
|
|
|
2025-02-19 18:45:45 +01:00
|
|
|
TOCLIENT_CAMERA = 0x48,
|
|
|
|
/*
|
|
|
|
u8 allowed_camera_mode
|
|
|
|
*/
|
|
|
|
|
2013-04-11 13:23:38 -05:00
|
|
|
TOCLIENT_HUDADD = 0x49,
|
|
|
|
/*
|
|
|
|
u32 id
|
|
|
|
u8 type
|
|
|
|
v2f1000 pos
|
2020-05-11 21:40:45 +02:00
|
|
|
u16 len
|
2013-04-11 13:23:38 -05:00
|
|
|
u8[len] name
|
|
|
|
v2f1000 scale
|
2020-05-11 21:40:45 +02:00
|
|
|
u16 len2
|
2013-04-11 13:23:38 -05:00
|
|
|
u8[len2] text
|
|
|
|
u32 number
|
|
|
|
u32 item
|
|
|
|
u32 dir
|
2013-04-22 06:53:55 -03:00
|
|
|
v2f1000 align
|
2013-04-22 20:47:59 -03:00
|
|
|
v2f1000 offset
|
2014-04-28 23:41:27 +02:00
|
|
|
v3f1000 world_pos
|
|
|
|
v2s32 size
|
2019-11-04 09:30:02 +01:00
|
|
|
s16 z_index
|
2020-05-11 21:40:45 +02:00
|
|
|
u16 len3
|
|
|
|
u8[len3] text2
|
2013-04-11 13:23:38 -05:00
|
|
|
*/
|
|
|
|
|
2013-04-24 07:52:46 -03:00
|
|
|
TOCLIENT_HUDRM = 0x4a,
|
2013-04-11 13:23:38 -05:00
|
|
|
/*
|
|
|
|
u32 id
|
|
|
|
*/
|
|
|
|
|
2013-04-24 07:52:46 -03:00
|
|
|
TOCLIENT_HUDCHANGE = 0x4b,
|
2013-04-11 13:23:38 -05:00
|
|
|
/*
|
|
|
|
u32 id
|
|
|
|
u8 stat
|
|
|
|
[v2f1000 data |
|
|
|
|
u32 len
|
|
|
|
u8[len] data |
|
|
|
|
u32 data]
|
|
|
|
*/
|
2013-04-24 07:52:46 -03:00
|
|
|
|
2013-04-25 19:27:22 -04:00
|
|
|
TOCLIENT_HUD_SET_FLAGS = 0x4c,
|
2013-04-24 07:52:46 -03:00
|
|
|
/*
|
2013-04-25 19:27:22 -04:00
|
|
|
u32 flags
|
|
|
|
u32 mask
|
2013-04-24 07:52:46 -03:00
|
|
|
*/
|
2013-05-04 02:08:52 +02:00
|
|
|
|
|
|
|
TOCLIENT_HUD_SET_PARAM = 0x4d,
|
|
|
|
/*
|
|
|
|
u16 param
|
|
|
|
u16 len
|
|
|
|
u8[len] value
|
|
|
|
*/
|
2013-07-19 19:50:33 +02:00
|
|
|
|
|
|
|
TOCLIENT_BREATH = 0x4e,
|
|
|
|
/*
|
|
|
|
u16 breath
|
|
|
|
*/
|
2013-05-02 23:52:50 +03:00
|
|
|
|
|
|
|
TOCLIENT_SET_SKY = 0x4f,
|
|
|
|
/*
|
2019-08-21 21:47:45 +01:00
|
|
|
Protocol 38:
|
|
|
|
u8[4] base_color (ARGB)
|
2013-05-02 23:52:50 +03:00
|
|
|
u8 len
|
|
|
|
u8[len] type
|
|
|
|
u16 count
|
|
|
|
foreach count:
|
|
|
|
u8 len
|
|
|
|
u8[len] param
|
2017-04-28 03:06:49 +01:00
|
|
|
u8 clouds (boolean)
|
2019-08-21 21:47:45 +01:00
|
|
|
|
|
|
|
Protocol 39:
|
|
|
|
u8[4] bgcolor (ARGB)
|
|
|
|
std::string type
|
|
|
|
int texture_count
|
|
|
|
std::string[6] param
|
|
|
|
bool clouds
|
|
|
|
bool bgcolor_fog
|
|
|
|
u8[4] day_sky (ARGB)
|
|
|
|
u8[4] day_horizon (ARGB)
|
|
|
|
u8[4] dawn_sky (ARGB)
|
|
|
|
u8[4] dawn_horizon (ARGB)
|
|
|
|
u8[4] night_sky (ARGB)
|
|
|
|
u8[4] night_horizon (ARGB)
|
|
|
|
u8[4] indoors (ARGB)
|
2020-05-04 20:19:12 +02:00
|
|
|
u8[4] fog_sun_tint (ARGB)
|
|
|
|
u8[4] fog_moon_tint (ARGB)
|
|
|
|
std::string fog_tint_type
|
2023-02-25 16:08:33 -08:00
|
|
|
float body_orbit_tilt
|
2013-05-02 23:52:50 +03:00
|
|
|
*/
|
2013-10-18 11:53:19 +03:00
|
|
|
|
|
|
|
TOCLIENT_OVERRIDE_DAY_NIGHT_RATIO = 0x50,
|
|
|
|
/*
|
|
|
|
u8 do_override (boolean)
|
|
|
|
u16 day-night ratio 0...65535
|
|
|
|
*/
|
2014-04-28 23:41:27 +02:00
|
|
|
|
2014-01-08 13:47:53 +01:00
|
|
|
TOCLIENT_LOCAL_PLAYER_ANIMATIONS = 0x51,
|
|
|
|
/*
|
2014-04-12 13:50:22 +02:00
|
|
|
v2s32 stand/idle
|
|
|
|
v2s32 walk
|
|
|
|
v2s32 dig
|
|
|
|
v2s32 walk+dig
|
2014-01-08 13:47:53 +01:00
|
|
|
f1000 frame_speed
|
|
|
|
*/
|
2014-04-11 15:32:46 +02:00
|
|
|
|
|
|
|
TOCLIENT_EYE_OFFSET = 0x52,
|
|
|
|
/*
|
|
|
|
v3f1000 first
|
|
|
|
v3f1000 third
|
2023-10-02 13:44:03 +02:00
|
|
|
v3f1000 third_front
|
2014-04-11 15:32:46 +02:00
|
|
|
*/
|
2015-01-12 17:01:41 +01:00
|
|
|
|
2015-03-13 14:14:48 +01:00
|
|
|
TOCLIENT_DELETE_PARTICLESPAWNER = 0x53,
|
|
|
|
/*
|
|
|
|
u32 id
|
|
|
|
*/
|
|
|
|
|
2017-03-17 10:39:47 +01:00
|
|
|
TOCLIENT_CLOUD_PARAMS = 0x54,
|
|
|
|
/*
|
|
|
|
f1000 density
|
|
|
|
u8[4] color_diffuse (ARGB)
|
|
|
|
u8[4] color_ambient (ARGB)
|
|
|
|
f1000 height
|
|
|
|
f1000 thickness
|
|
|
|
v2f1000 speed
|
|
|
|
*/
|
|
|
|
|
2016-07-10 00:08:26 -05:00
|
|
|
TOCLIENT_FADE_SOUND = 0x55,
|
|
|
|
/*
|
|
|
|
s32 sound_id
|
|
|
|
float step
|
|
|
|
float gain
|
|
|
|
*/
|
2017-06-08 14:30:09 +01:00
|
|
|
TOCLIENT_UPDATE_PLAYER_LIST = 0x56,
|
|
|
|
/*
|
|
|
|
u8 type
|
|
|
|
u16 number of players
|
|
|
|
for each player
|
|
|
|
u16 len
|
|
|
|
u8[len] player name
|
|
|
|
*/
|
2016-07-10 00:08:26 -05:00
|
|
|
|
2017-09-26 00:11:20 +02:00
|
|
|
TOCLIENT_MODCHANNEL_MSG = 0x57,
|
|
|
|
/*
|
|
|
|
u16 channel name length
|
|
|
|
std::string channel name
|
|
|
|
u16 channel name sender
|
|
|
|
std::string channel name
|
|
|
|
u16 message length
|
|
|
|
std::string message
|
2018-12-04 20:37:48 +01:00
|
|
|
*/
|
|
|
|
|
2017-09-26 00:11:20 +02:00
|
|
|
TOCLIENT_MODCHANNEL_SIGNAL = 0x58,
|
|
|
|
/*
|
|
|
|
u8 signal id
|
|
|
|
u16 channel name length
|
|
|
|
std::string channel name
|
2018-12-04 20:37:48 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
TOCLIENT_NODEMETA_CHANGED = 0x59,
|
|
|
|
/*
|
|
|
|
serialized and compressed node metadata
|
|
|
|
*/
|
2017-09-26 00:11:20 +02:00
|
|
|
|
2019-08-21 21:47:45 +01:00
|
|
|
TOCLIENT_SET_SUN = 0x5a,
|
|
|
|
/*
|
|
|
|
bool visible
|
|
|
|
std::string texture
|
|
|
|
std::string tonemap
|
|
|
|
std::string sunrise
|
|
|
|
f32 scale
|
|
|
|
*/
|
|
|
|
|
|
|
|
TOCLIENT_SET_MOON = 0x5b,
|
|
|
|
/*
|
|
|
|
bool visible
|
|
|
|
std::string texture
|
|
|
|
std::string tonemap
|
|
|
|
f32 scale
|
|
|
|
*/
|
|
|
|
|
|
|
|
TOCLIENT_SET_STARS = 0x5c,
|
|
|
|
/*
|
|
|
|
bool visible
|
|
|
|
u32 count
|
|
|
|
u8[4] starcolor (ARGB)
|
|
|
|
f32 scale
|
2022-07-02 18:57:48 +00:00
|
|
|
f32 day_opacity
|
2019-08-21 21:47:45 +01:00
|
|
|
*/
|
|
|
|
|
2024-01-01 22:48:56 +01:00
|
|
|
TOCLIENT_MOVE_PLAYER_REL = 0x5d,
|
|
|
|
/*
|
|
|
|
v3f added_pos
|
|
|
|
*/
|
|
|
|
|
2015-04-12 04:49:13 +02:00
|
|
|
TOCLIENT_SRP_BYTES_S_B = 0x60,
|
|
|
|
/*
|
2017-09-12 19:48:09 +02:00
|
|
|
Belonging to AUTH_MECHANISM_SRP.
|
2015-04-12 04:49:13 +02:00
|
|
|
|
|
|
|
std::string bytes_s
|
|
|
|
std::string bytes_B
|
|
|
|
*/
|
|
|
|
|
2018-03-28 16:04:41 +01:00
|
|
|
TOCLIENT_FORMSPEC_PREPEND = 0x61,
|
|
|
|
/*
|
|
|
|
u16 len
|
|
|
|
u8[len] formspec
|
|
|
|
*/
|
|
|
|
|
2020-10-04 15:24:29 +02:00
|
|
|
TOCLIENT_MINIMAP_MODES = 0x62,
|
|
|
|
/*
|
|
|
|
u16 count // modes
|
|
|
|
u16 mode // wanted current mode index after change
|
|
|
|
for each mode
|
|
|
|
u16 type
|
|
|
|
std::string label
|
|
|
|
u16 size
|
|
|
|
std::string extra
|
|
|
|
*/
|
|
|
|
|
2022-03-26 16:58:26 +01:00
|
|
|
TOCLIENT_SET_LIGHTING = 0x63,
|
|
|
|
/*
|
|
|
|
f32 shadow_intensity
|
2022-12-25 16:15:32 -08:00
|
|
|
f32 saturation
|
2023-01-06 22:33:25 +01:00
|
|
|
exposure parameters
|
|
|
|
f32 luminance_min
|
|
|
|
f32 luminance_max
|
|
|
|
f32 exposure_correction
|
|
|
|
f32 speed_dark_bright
|
|
|
|
f32 speed_bright_dark
|
|
|
|
f32 center_weight_power
|
2022-03-26 16:58:26 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
TOCLIENT_NUM_MSG_TYPES = 0x64,
|
2010-11-27 01:02:21 +02:00
|
|
|
};
|
|
|
|
|
2024-01-24 18:23:11 +01:00
|
|
|
enum ToServerCommand : u16
|
2010-11-27 01:02:21 +02:00
|
|
|
{
|
2015-03-13 16:35:21 +01:00
|
|
|
TOSERVER_INIT = 0x02,
|
2015-03-13 14:14:48 +01:00
|
|
|
/*
|
|
|
|
Sent first after connected.
|
|
|
|
|
2022-11-09 17:57:19 +01:00
|
|
|
u8 serialization version (=SER_FMT_VER_HIGHEST_READ)
|
2024-09-02 20:50:43 +01:00
|
|
|
u16 unused (supported network compression modes, never implemeneted)
|
2015-05-16 01:19:43 +02:00
|
|
|
u16 minimum supported network protocol version
|
|
|
|
u16 maximum supported network protocol version
|
|
|
|
std::string player name
|
2015-03-13 14:14:48 +01:00
|
|
|
*/
|
|
|
|
|
2010-11-27 17:18:34 +02:00
|
|
|
TOSERVER_INIT2 = 0x11,
|
2010-11-27 01:02:21 +02:00
|
|
|
/*
|
2024-01-24 18:23:11 +01:00
|
|
|
Sent as an ACK for TOCLIENT_AUTH_ACCEPT.
|
2010-11-27 01:02:21 +02:00
|
|
|
After this, the server can send data.
|
|
|
|
*/
|
|
|
|
|
2017-09-26 00:11:20 +02:00
|
|
|
TOSERVER_MODCHANNEL_JOIN = 0x17,
|
|
|
|
/*
|
|
|
|
u16 channel name length
|
|
|
|
std::string channel name
|
|
|
|
*/
|
|
|
|
|
|
|
|
TOSERVER_MODCHANNEL_LEAVE = 0x18,
|
|
|
|
/*
|
|
|
|
u16 channel name length
|
|
|
|
std::string channel name
|
|
|
|
*/
|
|
|
|
|
|
|
|
TOSERVER_MODCHANNEL_MSG = 0x19,
|
|
|
|
/*
|
|
|
|
u16 channel name length
|
|
|
|
std::string channel name
|
|
|
|
u16 message length
|
|
|
|
std::string message
|
|
|
|
*/
|
|
|
|
|
2010-11-27 17:18:34 +02:00
|
|
|
TOSERVER_PLAYERPOS = 0x23,
|
2010-11-27 01:02:21 +02:00
|
|
|
/*
|
|
|
|
[0] u16 command
|
|
|
|
[2] v3s32 position*100
|
|
|
|
[2+12] v3s32 speed*100
|
|
|
|
[2+12+12] s32 pitch*100
|
|
|
|
[2+12+12+4] s32 yaw*100
|
2012-11-22 21:01:31 +02:00
|
|
|
[2+12+12+4+4] u32 keyPressed
|
2023-05-29 10:26:42 -07:00
|
|
|
[2+12+12+4+4+4] u8 fov*80
|
2016-12-11 19:49:49 +01:00
|
|
|
[2+12+12+4+4+4+1] u8 ceil(wanted_range / MAP_BLOCKSIZE)
|
2023-05-29 10:26:42 -07:00
|
|
|
[2+12+12+4+4+4+1+1] u8 camera_inverted (bool)
|
2024-10-01 17:21:42 +02:00
|
|
|
[2+12+12+4+4+4+1+1+1] f32 movement_speed
|
|
|
|
[2+12+12+4+4+4+1+1+1+4] f32 movement_direction
|
2023-05-29 10:26:42 -07:00
|
|
|
|
2010-11-27 01:02:21 +02:00
|
|
|
*/
|
|
|
|
|
2010-11-27 17:18:34 +02:00
|
|
|
TOSERVER_GOTBLOCKS = 0x24,
|
2010-11-27 01:02:21 +02:00
|
|
|
/*
|
|
|
|
[0] u16 command
|
|
|
|
[2] u8 count
|
|
|
|
[3] v3s16 pos_0
|
|
|
|
[3+6] v3s16 pos_1
|
|
|
|
...
|
|
|
|
*/
|
|
|
|
|
2010-11-27 17:18:34 +02:00
|
|
|
TOSERVER_DELETEDBLOCKS = 0x25,
|
2010-11-27 01:02:21 +02:00
|
|
|
/*
|
|
|
|
[0] u16 command
|
|
|
|
[2] u8 count
|
|
|
|
[3] v3s16 pos_0
|
|
|
|
[3+6] v3s16 pos_1
|
|
|
|
...
|
|
|
|
*/
|
|
|
|
|
2010-12-22 16:30:23 +02:00
|
|
|
TOSERVER_INVENTORY_ACTION = 0x31,
|
|
|
|
/*
|
2015-02-19 20:03:22 +01:00
|
|
|
See InventoryAction in inventorymanager.h
|
2010-12-22 16:30:23 +02:00
|
|
|
*/
|
2010-12-23 22:35:53 +02:00
|
|
|
|
|
|
|
TOSERVER_CHAT_MESSAGE = 0x32,
|
|
|
|
/*
|
|
|
|
u16 length
|
|
|
|
wstring message
|
|
|
|
*/
|
|
|
|
|
2011-04-21 19:35:17 +03:00
|
|
|
TOSERVER_DAMAGE = 0x35,
|
|
|
|
/*
|
|
|
|
u8 amount
|
|
|
|
*/
|
2011-05-22 21:09:12 +01:00
|
|
|
|
2015-03-13 13:40:48 +01:00
|
|
|
TOSERVER_PLAYERITEM = 0x37,
|
2011-08-10 21:43:40 +02:00
|
|
|
/*
|
|
|
|
Sent to change selected item.
|
|
|
|
|
|
|
|
[0] u16 TOSERVER_PLAYERITEM
|
|
|
|
[2] u16 item
|
|
|
|
*/
|
2014-04-28 23:41:27 +02:00
|
|
|
|
2024-09-24 22:37:44 +02:00
|
|
|
TOSERVER_RESPAWN_LEGACY = 0x38,
|
2011-11-29 17:15:18 +02:00
|
|
|
|
|
|
|
TOSERVER_INTERACT = 0x39,
|
|
|
|
/*
|
|
|
|
[0] u16 command
|
|
|
|
[2] u8 action
|
|
|
|
[3] u16 item
|
|
|
|
[5] u32 length of the next item
|
|
|
|
[9] serialized PointedThing
|
|
|
|
actions:
|
|
|
|
0: start digging (from undersurface) or use
|
|
|
|
1: stop digging (all parameters ignored)
|
|
|
|
2: digging completed
|
|
|
|
3: place block or item (to abovesurface)
|
|
|
|
4: use item
|
|
|
|
*/
|
2014-04-28 23:41:27 +02:00
|
|
|
|
2012-03-24 19:01:26 +02:00
|
|
|
TOSERVER_REMOVED_SOUNDS = 0x3a,
|
|
|
|
/*
|
|
|
|
u16 len
|
|
|
|
s32[len] sound_id
|
|
|
|
*/
|
2012-01-02 13:31:50 +02:00
|
|
|
|
2012-06-01 20:51:15 +03:00
|
|
|
TOSERVER_NODEMETA_FIELDS = 0x3b,
|
|
|
|
/*
|
|
|
|
v3s16 p
|
|
|
|
u16 len
|
|
|
|
u8[len] form name (reserved for future use)
|
|
|
|
u16 number of fields
|
|
|
|
for each field:
|
|
|
|
u16 len
|
|
|
|
u8[len] field name
|
|
|
|
u32 len
|
|
|
|
u8[len] field value
|
|
|
|
*/
|
|
|
|
|
2012-07-22 17:10:58 +03:00
|
|
|
TOSERVER_INVENTORY_FIELDS = 0x3c,
|
|
|
|
/*
|
|
|
|
u16 len
|
|
|
|
u8[len] form name (reserved for future use)
|
|
|
|
u16 number of fields
|
|
|
|
for each field:
|
|
|
|
u16 len
|
|
|
|
u8[len] field name
|
|
|
|
u32 len
|
|
|
|
u8[len] field value
|
|
|
|
*/
|
|
|
|
|
2012-03-25 11:50:29 +03:00
|
|
|
TOSERVER_REQUEST_MEDIA = 0x40,
|
2012-01-02 13:31:50 +02:00
|
|
|
/*
|
2012-03-25 11:50:29 +03:00
|
|
|
u16 number of files requested
|
|
|
|
for each file {
|
2012-03-24 19:01:26 +02:00
|
|
|
u16 length of name
|
|
|
|
string name
|
|
|
|
}
|
2012-12-14 15:30:17 +04:00
|
|
|
*/
|
2013-07-19 19:50:33 +02:00
|
|
|
|
2021-09-09 16:51:35 +02:00
|
|
|
TOSERVER_HAVE_MEDIA = 0x41,
|
|
|
|
/*
|
|
|
|
u8 number of callback tokens
|
|
|
|
for each:
|
|
|
|
u32 token
|
|
|
|
*/
|
|
|
|
|
2014-02-13 20:17:42 +01:00
|
|
|
TOSERVER_CLIENT_READY = 0x43,
|
|
|
|
/*
|
|
|
|
u8 major
|
|
|
|
u8 minor
|
|
|
|
u8 patch
|
|
|
|
u8 reserved
|
|
|
|
u16 len
|
|
|
|
u8[len] full_version_string
|
|
|
|
*/
|
2015-01-12 17:01:41 +01:00
|
|
|
|
2015-04-12 04:49:13 +02:00
|
|
|
TOSERVER_FIRST_SRP = 0x50,
|
|
|
|
/*
|
|
|
|
Belonging to AUTH_MECHANISM_FIRST_SRP.
|
|
|
|
|
|
|
|
std::string srp salt
|
|
|
|
std::string srp verification key
|
|
|
|
u8 is_empty (=1 if password is empty, 0 otherwise)
|
|
|
|
*/
|
|
|
|
|
|
|
|
TOSERVER_SRP_BYTES_A = 0x51,
|
|
|
|
/*
|
2017-09-12 19:48:09 +02:00
|
|
|
Belonging to AUTH_MECHANISM_SRP,
|
2015-04-12 04:49:13 +02:00
|
|
|
depending on current_login_based_on.
|
|
|
|
|
|
|
|
std::string bytes_A
|
|
|
|
u8 current_login_based_on : on which version of the password's
|
|
|
|
hash this login is based on (0 legacy hash,
|
|
|
|
or 1 directly the password)
|
|
|
|
*/
|
|
|
|
|
|
|
|
TOSERVER_SRP_BYTES_M = 0x52,
|
|
|
|
/*
|
2017-09-12 19:48:09 +02:00
|
|
|
Belonging to AUTH_MECHANISM_SRP.
|
2015-04-12 04:49:13 +02:00
|
|
|
|
|
|
|
std::string bytes_M
|
|
|
|
*/
|
|
|
|
|
2023-02-27 22:58:41 +00:00
|
|
|
TOSERVER_UPDATE_CLIENT_INFO = 0x53,
|
|
|
|
/*
|
|
|
|
v2s16 render_target_size
|
|
|
|
f32 gui_scaling
|
|
|
|
f32 hud_scaling
|
|
|
|
v2f32 max_fs_info
|
2023-03-26 14:32:19 +02:00
|
|
|
*/
|
2023-02-27 22:58:41 +00:00
|
|
|
|
|
|
|
TOSERVER_NUM_MSG_TYPES = 0x54,
|
2015-04-12 04:49:13 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
enum AuthMechanism
|
|
|
|
{
|
|
|
|
// reserved
|
|
|
|
AUTH_MECHANISM_NONE = 0,
|
|
|
|
|
|
|
|
// SRP based on the legacy hash
|
|
|
|
AUTH_MECHANISM_LEGACY_PASSWORD = 1 << 0,
|
|
|
|
|
|
|
|
// SRP based on the srp verification key
|
|
|
|
AUTH_MECHANISM_SRP = 1 << 1,
|
|
|
|
|
|
|
|
// Establishes a srp verification key, for first login and password changing
|
|
|
|
AUTH_MECHANISM_FIRST_SRP = 1 << 2,
|
2010-11-27 01:02:21 +02:00
|
|
|
};
|
|
|
|
|
2022-04-27 19:55:13 +02:00
|
|
|
enum AccessDeniedCode : u8 {
|
2015-03-27 20:24:04 -04:00
|
|
|
SERVER_ACCESSDENIED_WRONG_PASSWORD,
|
|
|
|
SERVER_ACCESSDENIED_UNEXPECTED_DATA,
|
|
|
|
SERVER_ACCESSDENIED_SINGLEPLAYER,
|
|
|
|
SERVER_ACCESSDENIED_WRONG_VERSION,
|
|
|
|
SERVER_ACCESSDENIED_WRONG_CHARS_IN_NAME,
|
|
|
|
SERVER_ACCESSDENIED_WRONG_NAME,
|
|
|
|
SERVER_ACCESSDENIED_TOO_MANY_USERS,
|
|
|
|
SERVER_ACCESSDENIED_EMPTY_PASSWORD,
|
|
|
|
SERVER_ACCESSDENIED_ALREADY_CONNECTED,
|
|
|
|
SERVER_ACCESSDENIED_SERVER_FAIL,
|
|
|
|
SERVER_ACCESSDENIED_CUSTOM_STRING,
|
2015-07-17 16:40:41 +02:00
|
|
|
SERVER_ACCESSDENIED_SHUTDOWN,
|
|
|
|
SERVER_ACCESSDENIED_CRASH,
|
2015-03-27 20:24:04 -04:00
|
|
|
SERVER_ACCESSDENIED_MAX,
|
2015-03-13 14:14:48 +01:00
|
|
|
};
|
|
|
|
|
2020-07-30 00:16:21 +03:00
|
|
|
enum PlayerListModifer : u8
|
2017-06-08 14:30:09 +01:00
|
|
|
{
|
|
|
|
PLAYER_LIST_INIT,
|
|
|
|
PLAYER_LIST_ADD,
|
|
|
|
PLAYER_LIST_REMOVE,
|
|
|
|
};
|
|
|
|
|
2018-06-20 22:36:08 +02:00
|
|
|
enum CSMRestrictionFlags : u64 {
|
|
|
|
CSM_RF_NONE = 0x00000000,
|
2019-01-03 11:10:07 +00:00
|
|
|
// Until server-sent CSM and verifying of builtin are complete,
|
|
|
|
// 'CSM_RF_LOAD_CLIENT_MODS' also disables loading 'builtin'.
|
|
|
|
// When those are complete, this should return to only being a restriction on the
|
|
|
|
// loading of client mods.
|
|
|
|
CSM_RF_LOAD_CLIENT_MODS = 0x00000001, // Don't load client-provided mods or 'builtin'
|
2019-08-04 10:23:59 +05:30
|
|
|
CSM_RF_CHAT_MESSAGES = 0x00000002, // Disable chat message sending from CSM
|
|
|
|
CSM_RF_READ_ITEMDEFS = 0x00000004, // Disable itemdef lookups
|
|
|
|
CSM_RF_READ_NODEDEFS = 0x00000008, // Disable nodedef lookups
|
|
|
|
CSM_RF_LOOKUP_NODES = 0x00000010, // Limit node lookups
|
|
|
|
CSM_RF_READ_PLAYERINFO = 0x00000020, // Disable player info lookups
|
2018-06-20 22:36:08 +02:00
|
|
|
CSM_RF_ALL = 0xFFFFFFFF,
|
2017-07-18 21:39:55 +02:00
|
|
|
};
|
2019-08-04 10:23:59 +05:30
|
|
|
|
|
|
|
enum InteractAction : u8
|
|
|
|
{
|
|
|
|
INTERACT_START_DIGGING, // 0: start digging (from undersurface) or use
|
|
|
|
INTERACT_STOP_DIGGING, // 1: stop digging (all parameters ignored)
|
|
|
|
INTERACT_DIGGING_COMPLETED, // 2: digging completed
|
|
|
|
INTERACT_PLACE, // 3: place block or item (to abovesurface)
|
|
|
|
INTERACT_USE, // 4: use item
|
|
|
|
INTERACT_ACTIVATE // 5: rightclick air ("activate")
|
2024-09-27 11:08:35 +02:00
|
|
|
};
|