refactor package
This commit is contained in:
29
pkg/protocol/packet/game/client/damage_event.go
Normal file
29
pkg/protocol/packet/game/client/damage_event.go
Normal file
@ -0,0 +1,29 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"github.com/Tnze/go-mc/data/packetid"
|
||||
pk "github.com/Tnze/go-mc/net/packet"
|
||||
)
|
||||
|
||||
var _ ClientboundPacket = (*DamageEvent)(nil)
|
||||
var _ pk.Field = (*DamageEvent)(nil)
|
||||
|
||||
//codec:gen
|
||||
type DamageEventPos struct {
|
||||
X, Y, Z float64
|
||||
}
|
||||
|
||||
// DamageEventPacket
|
||||
//
|
||||
//codec:gen
|
||||
type DamageEvent struct {
|
||||
EntityID int32 `mc:"VarInt"`
|
||||
SourceType int32 `mc:"VarInt"`
|
||||
SourceCauseID int32 `mc:"VarInt"`
|
||||
SourceDirectID int32 `mc:"VarInt"`
|
||||
SourcePos pk.Option[DamageEventPos, *DamageEventPos]
|
||||
}
|
||||
|
||||
func (DamageEvent) ClientboundPacketID() packetid.ClientboundPacketID {
|
||||
return packetid.ClientboundDamageEvent
|
||||
}
|
Reference in New Issue
Block a user