PrismarineJS / minecraft-data

Language independent module providing minecraft data for minecraft clients, servers and libraries.
https://prismarinejs.github.io/minecraft-data
661 stars 223 forks source link

Add sound id - sound name map for each version #820

Open zardoy opened 10 months ago

zardoy commented 10 months ago

sound ids (those are used in sound packet) are completely different between versions, however this is not a case with sound names. Anyway it’s always much easier to work with sound names, so any data related to sound ids would be really handy here

I don’t think it’s related to https://github.com/PrismarineJS/minecraft-data/issues/77 which should contain names instead

wgaylord commented 10 months ago

What do you mean by sound names?

Do you mean the actual sound Identifier vs the Varint ID? (Since you can use either one on "modern" MC version in the packet)

If you mean the Varint ID then yes it should be simple enough to do.

zardoy commented 10 months ago

https://pokechu22.github.io/Burger/1.19.2.html#sounds see fields. each sound has sound id and name (didn't know its called variant id). Also I noticed that mapping for some ids seems incorrect here

zardoy commented 10 months ago

Also I noticed that mapping for some ids seems incorrect here

Nevermind its just a sound_effect packet incorrectly parsed here on 1.19.2 and above

wgaylord commented 10 months ago

Ah this will work well for 1.19.2 and lower. Since 1.19.3 and up you don't need the numerical ID to actually play the sound, you can use its full Identifier. But having it allows you to send sounds with smaller packets.

So still good data to have.

wgaylord commented 10 months ago

btw are you in the discord, as that would be a nicer why to discuss all these additions.

zardoy commented 10 months ago

Since 1.19.3 and up you don't need the numerical ID to actually play the sound

hm, what do you mean? i still receive hardcodedSoundEffectHeard with numerical sound ID from most events of the world (sound to play) on 1.19.2 and above

btw are you in the discord, as that would be a nicer why to discuss all these additions.

yes

wgaylord commented 10 months ago

https://github.com/PrismarineJS/minecraft-data-generator-server/pull/17 Will have to make a schema here for the tests but this should work. Also I was thinking more of as a server you can send the text ids, forgot mojang would probably always use the numerical for builtin sounds.

zardoy commented 10 months ago

Also I was thinking more of as a server you can send the text ids

WDYM? server sends numerical ids

wgaylord commented 10 months ago

The Mojang server does (atleast for sounds that are built into the game), its perfectly valid for a server to send an ID of 0 and fill in the other information of a packet instead of using the IDs.

zardoy commented 4 months ago

can be closed now (since it seems to be automated now)?