Skip to content

Commit

Permalink
add quick charge sounds
Browse files Browse the repository at this point in the history
  • Loading branch information
xNatsuri committed Dec 22, 2024
1 parent 2a26e69 commit 5b51804
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server/session/world.go
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,12 @@ func (s *Session) playSound(pos mgl64.Vec3, t world.Sound, disableRelative bool)
pk.SoundType = packet.SoundEventCrossbowLoadingStart
case sound.CrossbowLoadingMiddle:
pk.SoundType = packet.SoundEventCrossbowLoadingMiddle
case sound.CrossbowQuickChargeLoadingStart:
pk.SoundType = packet.SoundEventCrossbowQuickChargeStart
case sound.CrossbowQuickChargeLoadingMiddle:
pk.SoundType = packet.SoundEventCrossbowQuickChargeMiddle
case sound.CrossbowQuickChargeEnd:
pk.SoundType = packet.SoundEventCrossbowQuickChargeEnd
case sound.ArrowHit:
pk.SoundType = packet.SoundEventBowHit
case sound.ItemThrow:
Expand Down
9 changes: 9 additions & 0 deletions server/world/sound/item.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ type CrossbowLoadingStart struct{ sound }
// CrossbowLoadingMiddle is a sound played while a crossbow is loading and when a crossbow stops loading.
type CrossbowLoadingMiddle struct{ sound }

// CrossbowQuickChargeLoadingStart is a sound played when a crossbow with Quick Charge starts to load.
type CrossbowQuickChargeLoadingStart struct{ sound }

// CrossbowQuickChargeLoadingMiddle is a sound played while a crossbow with Quick Charge is loading.
type CrossbowQuickChargeLoadingMiddle struct{ sound }

// CrossbowQuickChargeEnd is a sound played when a crossbow with Quick Charge stops loading.
type CrossbowQuickChargeEnd struct{ sound }

// ArrowHit is a sound played when an arrow hits ground.
type ArrowHit struct{ sound }

Expand Down

0 comments on commit 5b51804

Please sign in to comment.