Add workaround for -1 MobType.

This commit is contained in:
Steveice10 2020-05-22 23:46:59 -07:00
parent a5bc122b93
commit aae3a9d276

View file

@ -1206,14 +1206,15 @@ 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());
} }
// Handle some protocol version translators that may send -1 for untranslatable IDs.
// Choics are based on what (I think?) vanilla would default to.
register(MobType.PIG, -1);
register(BuiltinSound.ENTITY_ITEM_PICKUP, -1);
} }
private MagicValues() { private MagicValues() {