summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorraven <citrons@mondecitronne.com>2026-03-22 15:22:52 -0500
committerraven <citrons@mondecitronne.com>2026-03-22 15:24:00 -0500
commit0dbe6d3c10621adf1552741ce2cba4178304fecd (patch)
tree7fc3a26e544a7c637cd680779ba81918ca93ad6b /server
parentc8ccf29f3154299b7f692e75cfe835935e9b8362 (diff)
support CustomBlocks
Diffstat (limited to 'server')
-rw-r--r--server/server.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/server/server.go b/server/server.go
index a7a08ca..bc12b5f 100644
--- a/server/server.go
+++ b/server/server.go
@@ -20,10 +20,12 @@ var supportedExtensions = []string {
"HackControl",
"LongerMessages",
"FullCP437",
+ "CustomBlocks",
}
var requiredExtensions = []string {
"ExtEntityPositions",
"EnvMapAspect.2",
+ "CustomBlocks",
}
type ServerInfo struct {
@@ -502,6 +504,15 @@ func (cl *client) cpeHandshake(conn net.Conn, ext map[string]bool) bool {
cl.disconnect("Missing required extension: " + req)
}
}
+
+ err = classic.WritePacket(conn, &classic.CustomBlocksSupportLevel {
+ SupportLevel: 1,
+ })
+ if cl.handleError(err) != nil {
+ return false
+ }
+ // it doesn't matter what the client sends in response to this
+
cl.extensions = ext
return true
}