refactor package
This commit is contained in:
19
pkg/protocol/packet/game/server/custom_payload.go
Normal file
19
pkg/protocol/packet/game/server/custom_payload.go
Normal file
@ -0,0 +1,19 @@
|
||||
package server
|
||||
|
||||
import "github.com/Tnze/go-mc/data/packetid"
|
||||
|
||||
//codec:gen
|
||||
type CustomPayload struct {
|
||||
Channel string `mc:"Identifier"`
|
||||
Data []byte `mc:"ByteArray"`
|
||||
}
|
||||
|
||||
func (CustomPayload) PacketID() packetid.ServerboundPacketID {
|
||||
return packetid.ServerboundCustomPayload
|
||||
}
|
||||
|
||||
func init() {
|
||||
registerPacket(packetid.ServerboundCustomPayload, func() ServerboundPacket {
|
||||
return &CustomPayload{}
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user