refactor package
This commit is contained in:
20
pkg/protocol/packet/game/server/player_command.go
Normal file
20
pkg/protocol/packet/game/server/player_command.go
Normal file
@ -0,0 +1,20 @@
|
||||
package server
|
||||
|
||||
import "github.com/Tnze/go-mc/data/packetid"
|
||||
|
||||
//codec:gen
|
||||
type PlayerCommand struct {
|
||||
EntityID int32 `mc:"VarInt"`
|
||||
ActionID int32 `mc:"VarInt"`
|
||||
JumpBoost int32 `mc:"VarInt"`
|
||||
}
|
||||
|
||||
func (PlayerCommand) PacketID() packetid.ServerboundPacketID {
|
||||
return packetid.ServerboundPlayerCommand
|
||||
}
|
||||
|
||||
func init() {
|
||||
registerPacket(packetid.ServerboundPlayerCommand, func() ServerboundPacket {
|
||||
return &PlayerCommand{}
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user