refactor package
This commit is contained in:
29
pkg/protocol/packet/game/server/chat.go
Normal file
29
pkg/protocol/packet/game/server/chat.go
Normal file
@ -0,0 +1,29 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"github.com/Tnze/go-mc/data/packetid"
|
||||
pk "github.com/Tnze/go-mc/net/packet"
|
||||
)
|
||||
|
||||
//codec:gen
|
||||
type Chat struct {
|
||||
Message string
|
||||
Timestamp int64
|
||||
Salt int64
|
||||
HasSignature bool
|
||||
//opt:optional:HasSignature
|
||||
Signature []byte `mc:"ByteArray"`
|
||||
MessageCount int32 `mc:"VarInt"`
|
||||
Acknowledged pk.FixedBitSet `mc:"FixedBitSet" size:"20"`
|
||||
Checksum int8
|
||||
}
|
||||
|
||||
func (Chat) PacketID() packetid.ServerboundPacketID {
|
||||
return packetid.ServerboundChat
|
||||
}
|
||||
|
||||
func init() {
|
||||
registerPacket(packetid.ServerboundChat, func() ServerboundPacket {
|
||||
return &Chat{}
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user