3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-14 12:00:09 +01:00

Fix some sound rewrites

Resolves #1434
Dieser Commit ist enthalten in:
KennyTV 2019-09-26 20:27:05 +02:00
Ursprung 0c95eaa1c3
Commit dc62394c4c

Datei anzeigen

@ -378,34 +378,33 @@ public class Protocol1_11To1_10 extends Protocol {
}); });
} }
private int getNewSoundId(int id) { //TODO Make it better, suggestions are welcome. It's ugly and hardcoded now. private int getNewSoundId(int id) {
if (id == 196) // Experience orb sound got removed if (id == 196) // Experience orb sound got removed
return -1; return -1;
int newId = id; if (id >= 85) // Shulker boxes
if (id >= 85) // Hello shulker boxes id += 2;
newId += 2; if (id >= 176) // Guardian flop
if (id >= 174) // Hello Guardian flop id += 1;
newId += 1; if (id >= 197) // evocation things
if (id >= 194) // Hello evocation things id += 8;
newId += 8;
if (id >= 196) // Rip the Experience orb touch sound :'( if (id >= 196) // Rip the Experience orb touch sound :'(
newId -= 1; id -= 1;
if (id >= 269) // Hello Liama's if (id >= 279) // Liama's
newId += 9; id += 9;
if (id >= 277) // Hello Mule chest if (id >= 296) // Mule chest
newId += 1; id += 1;
if (id >= 370) // Hello Vex if (id >= 390) // Vex
newId += 4; id += 4;
if (id >= 376) // Hello vindication if (id >= 400) // vindication
newId += 3; id += 3;
if (id >= 423) // Equip Elytra if (id >= 450) // Elytra
newId += 1; id += 1;
if (id >= 427) // Hello empty bottle if (id >= 455) // Empty bottle
newId += 1; id += 1;
if (id >= 441) // Hello item totem use if (id >= 470) // Totem use
newId += 1; id += 1;
return newId; return id;
} }