]> git.lizzy.rs Git - mt.git/blobdiff - mt.go
Add high-level protocol (de)serialization
[mt.git] / mt.go
diff --git a/mt.go b/mt.go
index c5d665de1e3dd57353388612266b5055ed209dcb..e7ca84a2d97080e7c78cc4567ea3d1a8bb001966 100644 (file)
--- a/mt.go
+++ b/mt.go
@@ -1,5 +1,29 @@
+// Package mt implements the high-level Minetest protocol.
+// This version is compatible with
+// https://github.com/ClamityAnarchy/minetest/commit/66adeade9d5c45a5499b5ad1ad4bd91dae82482a.
 package mt
 
+type Node struct {
+       Param0         Content
+       Param1, Param2 uint8
+}
+
+type Content uint16
+
+const (
+       Unknown Content = 125
+       Air     Content = 126
+       Ignore  Content = 127
+)
+
+type Group struct {
+       Name   string
+       Rating int16
+}
+
 type Field struct {
-       Name, Value string
+       Name string
+
+       //mt:len32
+       Value string
 }