diff options
Diffstat (limited to 'server/server.go')
| -rw-r--r-- | server/server.go | 9 |
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 |
