From aae3a9d2765d8ff23093d6e8fd958639ff8eb676 Mon Sep 17 00:00:00 2001 From: Steveice10 Date: Fri, 22 May 2020 23:46:59 -0700 Subject: [PATCH] Add workaround for -1 MobType. --- .../github/steveice10/mc/protocol/data/MagicValues.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/github/steveice10/mc/protocol/data/MagicValues.java b/src/main/java/com/github/steveice10/mc/protocol/data/MagicValues.java index 2571aed7..74a74ac7 100644 --- a/src/main/java/com/github/steveice10/mc/protocol/data/MagicValues.java +++ b/src/main/java/com/github/steveice10/mc/protocol/data/MagicValues.java @@ -1206,14 +1206,15 @@ public class MagicValues { register(SoundCategory.AMBIENT, 8); 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()) { register(sound, sound.ordinal()); 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() {