Skip to content

add LightningExplode & LightningThunder sound #1059

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions server/session/world.go
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,20 @@ func (s *Session) playSound(pos mgl64.Vec3, t world.Sound, disableRelative bool)
return
case sound.DecoratedPotInsertFailed:
pk.SoundType = packet.SoundEventDecoratedPotInsertFail
case sound.LightningExplode:
s.writePacket(&packet.PlaySound{
SoundName: "ambient.weather.lightning.impact",
Position: vec64To32(pos),
Volume: 1,
Pitch: 0.7,
})
case sound.LightningThunder:
s.writePacket(&packet.PlaySound{
SoundName: "ambient.weather.thunder",
Position: vec64To32(pos),
Volume: 1,
Pitch: 1.0,
})
}
s.writePacket(pk)
}
Expand Down
7 changes: 7 additions & 0 deletions server/world/sound/ambient.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package sound

// LightningExplode ...
type LightningExplode struct{ sound }

// LightningThunder ...
type LightningThunder struct{ sound }