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