Burger
Burger copied to clipboard
Sound IDs are incorrect for 1.19.3
Burger produces incorrect sound IDs for Minecraft 1.19.3.
From my own observations & empirical testing*, it looks like Burger is making two errors:
- ~~Sound IDs start from 1, not 0. The first sound,
entity.allay.ambient_with_item
, has ID 1, not 0.~~ - The output is missing goat horn sounds, causing all sounds after it to have IDs offset. Goat horn sounds are added in its own method (
net.minecraft.sound.SoundEvents#registerGoatHornSounds()
in yarn mappings). Probably Burger's static code analysis does not account for this.
Here are the sound IDs for 1.19.3 (by decompiling Minecraft + some vim macros). I tested a handful of sounds and these seem to be accurate. sounds.txt
*I tested this by sending a Sound Effect packet with the appropriate ID and observing the sound that gets played
It looks like data generators include minecraft:sound_event
now, which should provide the correct IDs as well. They seem to match what you have, except that they do start at 0 instead of 1 (entity.zombie_villager.step
is 1391 and entity.allay.ambient_with_item
is 0). Maybe that offset comes from elsewhere? I'm not sure how much work I want to put into fixing this, though.
Thanks! I will look into data generators.
It looks like the packet uses the sound ID plus one; see net.minecraft.network.PacketByteBuf#writeRegistryEntry
(yarn mappings). The +1 offset probably applies to more packets than just Sound Effect. Perhaps this should be documented on wiki.vg.
Ah, right. Burger actually accounts for that in the packet decompilation (see PLAY_CLIENTBOUND_5E
and the fairly jank code responsible for it). This should definitely be documented on wiki.vg. It looks like it's only used by Sound Effect and Entity Sound Effect though.