Skip to content
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

soundEvent.resource is ignored in sound_effect packet #3433

Open
zardoy opened this issue Aug 4, 2024 · 0 comments
Open

soundEvent.resource is ignored in sound_effect packet #3433

zardoy opened this issue Aug 4, 2024 · 0 comments
Labels
new feature Stage1 just created by someone new to the project, we don't know yet if it deserves an implementation / a f

Comments

@zardoy
Copy link
Contributor

zardoy commented Aug 4, 2024

In newer versions (> 1.19) It must emit hardcodedSoundEffectHeard when there is packet['soundEvent']?.resource in the packet of sound_effect like so:

bot._client.on('sound_effect', async (packet) => {
    const soundResource = packet['soundEvent']?.resource as string | undefined
    if (packet.soundId !== 0 || !soundResource) return
    const pos = new Vec3(packet.x / 8, packet.y / 8, packet.z / 8)
    // emit event
  })
@zardoy zardoy added new feature Stage1 just created by someone new to the project, we don't know yet if it deserves an implementation / a f labels Aug 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature Stage1 just created by someone new to the project, we don't know yet if it deserves an implementation / a f
Projects
None yet
Development

No branches or pull requests

1 participant