mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-12-04 21:01:02 -05:00
Handle protocol version translators that may send -1 for sound IDs.
This commit is contained in:
parent
898b45ec6c
commit
a5bc122b93
1 changed files with 4 additions and 0 deletions
|
@ -1206,6 +1206,10 @@ public class MagicValues {
|
||||||
register(SoundCategory.AMBIENT, 8);
|
register(SoundCategory.AMBIENT, 8);
|
||||||
register(SoundCategory.VOICE, 9);
|
register(SoundCategory.VOICE, 9);
|
||||||
|
|
||||||
|
// Handle some protocol version translators that may send -1 for untranslatable sound IDs.
|
||||||
|
// Choice of sound is based on what (I think?) vanilla would default to.
|
||||||
|
register(BuiltinSound.ENTITY_ITEM_PICKUP, -1);
|
||||||
|
|
||||||
for(BuiltinSound sound : BuiltinSound.values()) {
|
for(BuiltinSound sound : BuiltinSound.values()) {
|
||||||
register(sound, sound.ordinal());
|
register(sound, sound.ordinal());
|
||||||
register(sound, sound.getName());
|
register(sound, sound.getName());
|
||||||
|
|
Loading…
Reference in a new issue