summaryrefslogtreecommitdiff
path: root/server/server.go
diff options
context:
space:
mode:
authorraven <citrons@mondecitronne.com>2026-03-25 10:37:41 -0500
committerraven <citrons@mondecitronne.com>2026-03-25 10:42:21 -0500
commit0401572b269d50499a0ae091b9acd474647c2c3e (patch)
treeb52bf5e51f6a1695f6b75f7aadcddf90d4ea0461 /server/server.go
parent80c73873aa09f7f4cc825aa65269b7650993574c (diff)
custom block definitions
Diffstat (limited to 'server/server.go')
-rw-r--r--server/server.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/server/server.go b/server/server.go
index 5e3ffe9..00e7cef 100644
--- a/server/server.go
+++ b/server/server.go
@@ -23,12 +23,16 @@ var supportedExtensions = []string {
"FullCP437",
"CustomBlocks",
"ExtPlayerList.2",
+ "BlockDefinitions",
+ "BlockDefinitionsExt.2",
}
var requiredExtensions = []string {
"ExtEntityPositions",
"EnvMapAspect.2",
"CustomBlocks",
"ExtPlayerList.2",
+ "BlockDefinitions",
+ "BlockDefinitionsExt.2",
}
type ServerInfo struct {
@@ -543,14 +547,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,
})
+ // it doesn't matter what the client sends in response to this
if cl.handleError(err) != nil {
return false
}
- // it doesn't matter what the client sends in response to this
+
+ cl.SendPackets(nil, getBlockDefPackets())
cl.extensions = ext
return true