1 //go:generate ./cmdno.sh tosrvcmds ToSrv toSrv uint16 Cmd newToSrvCmd
5 type ToSrvCmd interface {
10 // ToSrvNil is the first packet sent in a connection.
11 type ToSrvNil struct{}
13 // ToSrvInit is sent as unreliable after ToSrvNil and is re-sent repeatedly
14 // until either the server replies with ToCltHello or 10 seconds pass and
15 // the connection times out.
16 type ToSrvInit struct {
18 SupportedCompression CompressionModes
19 MinProtoVer, MaxProtoVer uint16
26 // ToSrvInit2 is sent after ToCltAcceptAuth is received.
27 // The server responds to ToSrvInit2 by sending ToCltItemDefs, ToCltNodeDefs,
28 // ToCltAnnounceMedia, ToCltMovement and ToCltCSMRestrictionFlags.
29 type ToSrvInit2 struct {
33 // ToSrvModChanJoin attempts to join a mod channel.
34 type ToSrvModChanJoin struct {
38 // ToSrvModChanJoin attempts to leave a mod channel.
39 type ToSrvModChanLeave struct {
43 // ToSrvModChanJoin sends a message on a mod channel.
44 type ToSrvModChanMsg struct {
49 // ToSrvPlayerPos tells the server that the client's PlayerPos has changed.
50 type ToSrvPlayerPos struct {
54 // ToSrvGotBlks tells the server that the client has received Blks.
55 type ToSrvGotBlks struct {
60 // ToSrvDeletedBlks tells the server that the client has deleted Blks.
61 type ToSrvDeletedBlks struct {
66 // ToSrvInvAction tells the server that the client has performed an inventory action.
67 type ToSrvInvAction struct {
72 // ToSrvChatMsg tells the server that the client has sent a chat message.
73 type ToSrvChatMsg struct {
78 // ToSrvFallDmg tells the server that the client has taken fall damage.
79 type ToSrvFallDmg struct {
83 // ToSrvSelectItem tells the server the selected item in the client's hotbar.
84 type ToSrvSelectItem struct {
88 // ToSrvRespawn tells the server that the player has respawned.
89 type ToSrvRespawn struct{}
91 // ToSrvInteract tells the server that a node or AO has been interacted with.
92 type ToSrvInteract struct {
101 type Interaction uint8
104 Dig Interaction = iota
108 Use // Left click snowball-like.
109 Activate // Right click air.
112 // ToSrvRemovedSounds tells the server that the client has finished playing
113 // the sounds with the given IDs.
114 type ToSrvRemovedSounds struct {
118 type ToSrvNodeMetaFields struct {
124 type ToSrvInvFields struct {
129 // ToSrvReqMedia requests media files from the server.
130 type ToSrvReqMedia struct {
134 type ToSrvCltReady struct {
135 // Version information.
136 Major, Minor, Patch uint8
142 type ToSrvFirstSRP struct {
148 type ToSrvSRPBytesA struct {
153 type ToSrvSRPBytesM struct {