Skip to content

Commit

Permalink
feat: add sound
Browse files Browse the repository at this point in the history
  • Loading branch information
Lete114 committed Oct 6, 2023
1 parent a444b31 commit 462ccdc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/behavior_pack/scripts/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ world.afterEvents.blockBreak.subscribe(async (e) => {
const is = getRandomProbability(prob)
if (!is) return

player.playSound('random.orb', { pitch: 0.5, volume: 0.5 })
const itemTypes = Object.keys(MinecraftItemTypes) as MinecraftItemTypesKeys[]
const randomIndex = Math.floor(Math.random() * itemTypes.length)
const randomKey = itemTypes[randomIndex]
Expand Down

0 comments on commit 462ccdc

Please sign in to comment.