3 type ToSrvCmd interface {
8 //go:generate ./cmdno.sh tosrvcmds ToSrv toSrv uint16 Cmd newToSrvCmd
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 // ToSrvJoinModChan attempts to join a mod channel.
34 type ToSrvJoinModChan struct {
38 // ToSrvJoinModChan attempts to leave a mod channel.
39 type ToSrvLeaveModChan struct {
43 // ToSrvJoinModChan sends a message on a mod channel.
44 type ToSrvMsgModChan 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 //go:generate stringer -type Interaction
114 // ToSrvRemovedSounds tells the server that the client has finished playing
115 // the sounds with the given IDs.
116 type ToSrvRemovedSounds struct {
120 type ToSrvNodeMetaFields struct {
126 type ToSrvInvFields struct {
131 // ToSrvReqMedia requests media files from the server.
132 type ToSrvReqMedia struct {
136 type ToSrvCltReady struct {
137 // Version information.
138 Major, Minor, Patch uint8
144 type ToSrvFirstSRP struct {
150 type ToSrvSRPBytesA struct {
155 type ToSrvSRPBytesM struct {