Skip to content

Commit

Permalink
protocol/events.go: Fixed missing fields in PlayerDiedEventData (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
egor-erm committed Aug 26, 2022
1 parent d2813a0 commit 6724e8e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions minecraft/protocol/events.go
Expand Up @@ -110,14 +110,20 @@ func (c *CauldronUsedEventData) Marshal(r IO) {
type PlayerDiedEventData struct {
// AttackerEntityID ...
AttackerEntityID int32
// AttackerVariant ...
AttackerVariant int32
// EntityDamageCause ...
EntityDamageCause int32
// InRaid ...
InRaid bool
}

// Marshal ...
func (p *PlayerDiedEventData) Marshal(r IO) {
r.Varint32(&p.AttackerEntityID)
r.Varint32(&p.AttackerVariant)
r.Varint32(&p.EntityDamageCause)
r.Bool(&p.InRaid)
}

// BossKilledEventData is the event data sent when a boss dies.
Expand Down

0 comments on commit 6724e8e

Please sign in to comment.