summaryrefslogtreecommitdiff
path: root/development.md
diff options
context:
space:
mode:
authorKeuin <[email protected]>2020-12-24 00:09:03 +0800
committerKeuin <[email protected]>2020-12-24 00:09:03 +0800
commitf2730853bd6ca7cd96033b94909614e27fcdcab2 (patch)
tree43e25fdffb80499988178442ca43ebf57df818e5 /development.md
parent18519c14332c75b365be6f46ee7b3dd2b23b2f08 (diff)
Nearly finished (but the db updating still fails)
Diffstat (limited to 'development.md')
-rw-r--r--development.md33
1 files changed, 33 insertions, 0 deletions
diff --git a/development.md b/development.md
new file mode 100644
index 0000000..d64223c
--- /dev/null
+++ b/development.md
@@ -0,0 +1,33 @@
+# 数据库结构
+
+基于MongoDB。
+
+## Collection: logs
+
+```json
+{
+ "version": 1, // int
+ "subject": {
+ "uuid": player_uuid_bytes, // bytes
+ "id": player_id, // string
+ "pos": {
+ "world": world_id, // string
+ "x": pos_x, // float
+ "y": pos_y, // float
+ "z": pos_z, // float
+ }
+ },
+ "action": BLOCK_BREAK | BLOCK_PLACE | BLOCK_USE | ENTITY_USE | ENTITY_ATTACK | ITEM_USE, // int
+ "object": {
+ "type": OBJECT_BLOCK | OBJECT_ENTITY, // int
+ "id": object_id, // string
+ "pos": {
+ "world": world_id, // string
+ "x": pos_x, // float
+ "y": pos_y, // float
+ "z": pos_z, // float
+ }
+ }
+}
+```
+