refactor package

This commit is contained in:
2025-08-22 05:14:59 +08:00
parent bec0a56a3d
commit 65690e51ab
371 changed files with 835 additions and 627 deletions

View 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{}
})
}