Update sound list.

This commit is contained in:
Steveice10 2017-03-01 20:00:35 -08:00
parent ef649efd7b
commit 71414243f8
2 changed files with 170 additions and 4 deletions

View file

@ -79,6 +79,7 @@ import com.github.steveice10.mc.protocol.data.handshake.HandshakeIntent;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.UUID;
@ -854,14 +855,146 @@ public class MagicValues {
for(BuiltinSound sound : BuiltinSound.values()) {
register(sound, sound.ordinal());
// TODO: Change this
register(sound, sound.name().toLowerCase().replace('_', '.').replace("enchantment.table", "enchantment_table").replace("polar.bear", "polar_bear").replace("wither.skeleton", "wither_skeleton"));
register(sound, sound.name().toLowerCase().replace('_', '.'));
}
// Properly register sounds that actually have names containing underscores.
register(BuiltinSound.BLOCK_BREWING_STAND_BREW, "block.brewing_stand.brew");
register(BuiltinSound.BLOCK_CHORUS_FLOWER_DEATH, "block.chorus_flower.death");
register(BuiltinSound.BLOCK_CHORUS_FLOWER_GROW, "block.chorus_flower.grow");
register(BuiltinSound.BLOCK_ENCHANTMENT_TABLE_USE, "block.enchantment_table.use");
register(BuiltinSound.BLOCK_END_GATEWAY_SPAWN, "block.end_gateway.spawn");
register(BuiltinSound.BLOCK_FENCE_GATE_CLOSE, "block.fence_gate.close");
register(BuiltinSound.BLOCK_FENCE_GATE_OPEN, "block.fence_gate.open");
register(BuiltinSound.BLOCK_FURNACE_FIRE_CRACKLE, "block.furnace.fire_crackle");
register(BuiltinSound.BLOCK_IRON_DOOR_CLOSE, "block.iron_door.close");
register(BuiltinSound.BLOCK_IRON_DOOR_OPEN, "block.iron_door.open");
register(BuiltinSound.BLOCK_IRON_TRAPDOOR_CLOSE, "block.iron_trapdoor.close");
register(BuiltinSound.BLOCK_IRON_TRAPDOOR_CLOSE, "block.iron_trapdoor.open");
register(BuiltinSound.BLOCK_METAL_PRESSUREPLATE_CLICK_OFF, "block.metal_pressureplate.click_off");
register(BuiltinSound.BLOCK_METAL_PRESSUREPLATE_CLICK_ON, "block.metal_pressureplate.click_on");
register(BuiltinSound.BLOCK_REDSTONE_TORCH_BURNOUT, "block.redstone_torch.burnout");
register(BuiltinSound.BLOCK_SHULKER_BOX_CLOSE, "block.shulker_box.close");
register(BuiltinSound.BLOCK_SHULKER_BOX_OPEN, "block.shulker_box.open");
register(BuiltinSound.BLOCK_STONE_BUTTON_CLICK_OFF, "block.stone_button.click_off");
register(BuiltinSound.BLOCK_STONE_BUTTON_CLICK_ON, "block.stone_button.click_on");
register(BuiltinSound.BLOCK_STONE_PRESSUREPLATE_CLICK_OFF, "block.stone_pressureplate.click_off");
register(BuiltinSound.BLOCK_STONE_PRESSUREPLATE_CLICK_ON, "block.stone_pressureplate.click_on");
register(BuiltinSound.BLOCK_TRIPWIRE_CLICK_OFF, "block.tripwire.click_off");
register(BuiltinSound.BLOCK_TRIPWIRE_CLICK_ON, "block.tripwire.click_on");
register(BuiltinSound.BLOCK_WOOD_BUTTON_CLICK_OFF, "block.wood_button.click_off");
register(BuiltinSound.BLOCK_WOOD_BUTTON_CLICK_ON, "block.wood_button.click_on");
register(BuiltinSound.BLOCK_WOOD_PRESSUREPLATE_CLICK_OFF, "block.wood_pressureplate.click_off");
register(BuiltinSound.BLOCK_WOOD_PRESSUREPLATE_CLICK_ON, "block.wood_pressureplate.click_on");
register(BuiltinSound.BLOCK_WOODEN_DOOR_CLOSE, "block.wooden_door.close");
register(BuiltinSound.BLOCK_WOODEN_DOOR_OPEN, "block.wooden_door.open");
register(BuiltinSound.BLOCK_WOODEN_TRAPDOOR_CLOSE, "block.wooden_trapdoor.close");
register(BuiltinSound.BLOCK_WOODEN_TRAPDOOR_CLOSE, "block.wooden_trapdoor.open");
register(BuiltinSound.ENTITY_ARROW_HIT_PLAYER, "entity.arrow.hit_player");
register(BuiltinSound.ENTITY_ELDER_GUARDIAN_AMBIENT, "entity.elder_guardian.ambient");
register(BuiltinSound.ENTITY_ELDER_GUARDIAN_AMBIENT_LAND, "entity.elder_guardian.ambient_land");
register(BuiltinSound.ENTITY_ELDER_GUARDIAN_CURSE, "entity.elder_guardian.curse");
register(BuiltinSound.ENTITY_ELDER_GUARDIAN_DEATH, "entity.elder_guardian.death");
register(BuiltinSound.ENTITY_ELDER_GUARDIAN_DEATH_LAND, "entity.elder_guardian.death_land");
register(BuiltinSound.ENTITY_ELDER_GUARDIAN_FLOP, "entity.elder_guardian.flop");
register(BuiltinSound.ENTITY_ELDER_GUARDIAN_HURT, "entity.elder_guardian.hurt");
register(BuiltinSound.ENTITY_ELDER_GUARDIAN_HURT_LAND, "entity.elder_guardian.hurt_land");
register(BuiltinSound.ENTITY_ENDERDRAGON_FIREBALL_EXPLODE, "entity.enderdragon_fireball.explode");
register(BuiltinSound.ENTITY_EVOCATION_FANGS_ATTACK, "entity.evocation_fangs.attack");
register(BuiltinSound.ENTITY_EVOCATION_ILLAGER_AMBIENT, "entity.evocation_illager.ambient");
register(BuiltinSound.ENTITY_EVOCATION_ILLAGER_CAST_SPELL, "entity.evocation_illager.cast_spell");
register(BuiltinSound.ENTITY_EVOCATION_ILLAGER_DEATH, "entity.evocation_illager.death");
register(BuiltinSound.ENTITY_EVOCATION_ILLAGER_HURT, "entity.evocation_illager.hurt");
register(BuiltinSound.ENTITY_EVOCATION_ILLAGER_PREPARE_ATTACK, "entity.evocation_illager.prepare_attack");
register(BuiltinSound.ENTITY_EVOCATION_ILLAGER_PREPARE_SUMMON, "entity.evocation_illager.prepare_summon");
register(BuiltinSound.ENTITY_EVOCATION_ILLAGER_PREPARE_WOLOLO, "entity.evocation_illager.prepare_wololo");
register(BuiltinSound.ENTITY_EXPERIENCE_BOTTLE_THROW, "entity.experience_bottle.throw");
register(BuiltinSound.ENTITY_EXPERIENCE_ORB_PICKUP, "entity.experience_orb.pickup");
register(BuiltinSound.ENTITY_FIREWORK_BLAST_FAR, "entity.firework.blast_far");
register(BuiltinSound.ENTITY_FIREWORK_LARGE_BLAST, "entity.firework.large_blast");
register(BuiltinSound.ENTITY_FIREWORK_LARGE_BLAST_FAR, "entity.firework.large_blast_far");
register(BuiltinSound.ENTITY_FIREWORK_TWINKLE_FAR, "entity.firework.twinkle_far");
register(BuiltinSound.ENTITY_GENERIC_BIG_FALL, "entity.generic.big_fall");
register(BuiltinSound.ENTITY_GENERIC_EXTINGUISH_FIRE, "entity.generic.extinguish_fire");
register(BuiltinSound.ENTITY_GENERIC_SMALL_FALL, "entity.generic.small_fall");
register(BuiltinSound.ENTITY_GUARDIAN_AMBIENT_LAND, "entity.guardian.ambient_land");
register(BuiltinSound.ENTITY_GUARDIAN_DEATH_LAND, "entity.guardian.death_land");
register(BuiltinSound.ENTITY_GUARDIAN_HURT_LAND, "entity.guardian.hurt_land");
register(BuiltinSound.ENTITY_HORSE_STEP_WOOD, "entity.horse.step_wood");
register(BuiltinSound.ENTITY_HOSTILE_BIG_FALL, "entity.hostile.big_fall");
register(BuiltinSound.ENTITY_HOSTILE_SMALL_FALL, "entity.hostile.small_fall");
register(BuiltinSound.ENTITY_ITEMFRAME_ADD_ITEM, "entity.itemframe.add_item");
register(BuiltinSound.ENTITY_ITEMFRAME_REMOVE_ITEM, "entity.itemframe.remove_item");
register(BuiltinSound.ENTITY_ITEMFRAME_ROTATE_ITEM, "entity.itemframe.rotate_item");
register(BuiltinSound.ENTITY_PLAYER_BIG_FALL, "entity.player.big_fall");
register(BuiltinSound.ENTITY_PLAYER_SMALL_FALL, "entity.player.small_fall");
register(BuiltinSound.ENTITY_POLAR_BEAR_AMBIENT, "entity.polar_bear.ambient");
register(BuiltinSound.ENTITY_POLAR_BEAR_BABY_AMBIENT, "entity.polar_bear.baby_ambient");
register(BuiltinSound.ENTITY_POLAR_BEAR_DEATH, "entity.polar_bear.death");
register(BuiltinSound.ENTITY_POLAR_BEAR_HURT, "entity.polar_bear.hurt");
register(BuiltinSound.ENTITY_POLAR_BEAR_STEP, "entity.polar_bear.step");
register(BuiltinSound.ENTITY_POLAR_BEAR_WARNING, "entity.polar_bear.warning");
register(BuiltinSound.ENTITY_SHULKER_HURT_CLOSED, "entity.shulker.hurt_closed");
register(BuiltinSound.ENTITY_SHULKER_BULLET_HIT, "entity.shulker_bullet.hit");
register(BuiltinSound.ENTITY_SHULKER_BULLET_HURT, "entity.shulker_bullet.hurt");
register(BuiltinSound.ENTITY_SKELETON_HORSE_AMBIENT, "entity.skeleton_horse.ambient");
register(BuiltinSound.ENTITY_SKELETON_HORSE_DEATH, "entity.skeleton_horse.death");
register(BuiltinSound.ENTITY_SKELETON_HORSE_HURT, "entity.skeleton_horse.hurt");
register(BuiltinSound.ENTITY_SMALL_MAGMACUBE_DEATH, "entity.small_magmacube.death");
register(BuiltinSound.ENTITY_SMALL_MAGMACUBE_HURT, "entity.small_magmacube.hurt");
register(BuiltinSound.ENTITY_SMALL_MAGMACUBE_SQUISH, "entity.small_magmacube.squish");
register(BuiltinSound.ENTITY_SMALL_SLIME_DEATH, "entity.small_slime.death");
register(BuiltinSound.ENTITY_SMALL_SLIME_HURT, "entity.small_slime.hurt");
register(BuiltinSound.ENTITY_SMALL_SLIME_JUMP, "entity.small_slime.jump");
register(BuiltinSound.ENTITY_SMALL_SLIME_SQUISH, "entity.small_slime.squish");
register(BuiltinSound.ENTITY_SPLASH_POTION_BREAK, "entity.splash_potion.break");
register(BuiltinSound.ENTITY_SPLASH_POTION_THROW, "entity.splash_potion.throw");
register(BuiltinSound.ENTITY_VINDICATION_ILLAGER_AMBIENT, "entity.vindication_illager.ambient");
register(BuiltinSound.ENTITY_VINDICATION_ILLAGER_DEATH, "entity.vindication_illager.death");
register(BuiltinSound.ENTITY_VINDICATION_ILLAGER_HURT, "entity.vindication_illager.hurt");
register(BuiltinSound.ENTITY_WITHER_BREAK_BLOCK, "entity.wither.break_block");
register(BuiltinSound.ENTITY_WITHER_SKELETON_AMBIENT, "entity.wither_skeleton.ambient");
register(BuiltinSound.ENTITY_WITHER_SKELETON_DEATH, "entity.wither_skeleton.death");
register(BuiltinSound.ENTITY_WITHER_SKELETON_HURT, "entity.wither_skeleton.hurt");
register(BuiltinSound.ENTITY_WITHER_SKELETON_STEP, "entity.wither_skeleton.step");
register(BuiltinSound.ENTITY_ZOMBIE_ATTACK_DOOR_WOOD, "entity.zombie.attack_door_wood");
register(BuiltinSound.ENTITY_ZOMBIE_ATTACK_IRON_DOOR, "entity.zombie.attack_iron_door");
register(BuiltinSound.ENTITY_ZOMBIE_BREAK_DOOR_WOOD, "entity.zombie.break_door_wood");
register(BuiltinSound.ENTITY_ZOMBIE_HORSE_AMBIENT, "entity.zombie_horse.ambient");
register(BuiltinSound.ENTITY_ZOMBIE_HORSE_DEATH, "entity.zombie_horse.death");
register(BuiltinSound.ENTITY_ZOMBIE_HORSE_HURT, "entity.zombie_horse.hurt");
register(BuiltinSound.ENTITY_ZOMBIE_PIG_AMBIENT, "entity.zombie_pig.ambient");
register(BuiltinSound.ENTITY_ZOMBIE_PIG_ANGRY, "entity.zombie_pig.angry");
register(BuiltinSound.ENTITY_ZOMBIE_PIG_DEATH, "entity.zombie_pig.death");
register(BuiltinSound.ENTITY_ZOMBIE_PIG_HURT, "entity.zombie_pig.hurt");
register(BuiltinSound.ENTITY_ZOMBIE_VILLAGER_AMBIENT, "entity.zombie_villager.ambient");
register(BuiltinSound.ENTITY_ZOMBIE_VILLAGER_CONVERTED, "entity.zombie_villager.converted");
register(BuiltinSound.ENTITY_ZOMBIE_VILLAGER_CURE, "entity.zombie_villager.cure");
register(BuiltinSound.ENTITY_ZOMBIE_VILLAGER_DEATH, "entity.zombie_villager.death");
register(BuiltinSound.ENTITY_ZOMBIE_VILLAGER_HURT, "entity.zombie_villager.hurt");
register(BuiltinSound.ENTITY_ZOMBIE_VILLAGER_STEP, "entity.zombie_villager.step");
register(BuiltinSound.ITEM_ARMOR_EQUIP_CHAIN, "item.armor.equip_chain");
register(BuiltinSound.ITEM_ARMOR_EQUIP_DIAMOND, "item.armor.equip_diamond");
register(BuiltinSound.ITEM_ARMOR_EQUIP_ELYTRA, "item.armor.equip_elytra");
register(BuiltinSound.ITEM_ARMOR_EQUIP_GENERIC, "item.armor.equip_generic");
register(BuiltinSound.ITEM_ARMOR_EQUIP_GOLD, "item.armor.equip_gold");
register(BuiltinSound.ITEM_ARMOR_EQUIP_IRON, "item.armor.equip_iron");
register(BuiltinSound.ITEM_ARMOR_EQUIP_LEATHER, "item.armor.equip_leather");
register(BuiltinSound.ITEM_BOTTLE_FILL_DRAGONBREATH, "item.bottle.fill_dragonbreath");
register(BuiltinSound.ITEM_BUCKET_EMPTY_LAVA, "item.bucket.empty_lava");
register(BuiltinSound.ITEM_BUCKET_FILL_LAVA, "item.bucket.fill_lava");
register(BuiltinSound.ITEM_CHORUS_FRUIT_TELEPORT, "item.chorus_fruit.teleport");
}
private static void register(Enum<?> key, Object value) {
if(!values.containsKey(key)) {
values.put(key, new ArrayList<Object>());
} else {
for(Iterator<Object> it = values.get(key).iterator(); it.hasNext();) {
if(value.getClass().isAssignableFrom(it.next().getClass())) {
it.remove();
}
}
}
values.get(key).add(value);

View file

@ -86,6 +86,8 @@ public enum BuiltinSound implements Sound {
BLOCK_SAND_HIT,
BLOCK_SAND_PLACE,
BLOCK_SAND_STEP,
BLOCK_SHULKER_BOX_CLOSE,
BLOCK_SHULKER_BOX_OPEN,
BLOCK_SLIME_BREAK,
BLOCK_SLIME_FALL,
BLOCK_SLIME_HIT,
@ -174,6 +176,7 @@ public enum BuiltinSound implements Sound {
ENTITY_ELDER_GUARDIAN_CURSE,
ENTITY_ELDER_GUARDIAN_DEATH,
ENTITY_ELDER_GUARDIAN_DEATH_LAND,
ENTITY_ELDER_GUARDIAN_FLOP,
ENTITY_ELDER_GUARDIAN_HURT,
ENTITY_ELDER_GUARDIAN_HURT_LAND,
ENTITY_ENDERDRAGON_AMBIENT,
@ -195,9 +198,16 @@ public enum BuiltinSound implements Sound {
ENTITY_ENDERMITE_HURT,
ENTITY_ENDERMITE_STEP,
ENTITY_ENDERPEARL_THROW,
ENTITY_EVOCATION_FANGS_ATTACK,
ENTITY_EVOCATION_ILLAGER_AMBIENT,
ENTITY_EVOCATION_ILLAGER_CAST_SPELL,
ENTITY_EVOCATION_ILLAGER_DEATH,
ENTITY_EVOCATION_ILLAGER_HURT,
ENTITY_EVOCATION_ILLAGER_PREPARE_ATTACK,
ENTITY_EVOCATION_ILLAGER_PREPARE_SUMMON,
ENTITY_EVOCATION_ILLAGER_PREPARE_WOLOLO,
ENTITY_EXPERIENCE_BOTTLE_THROW,
ENTITY_EXPERIENCE_ORB_PICKUP,
ENTITY_EXPERIENCE_ORB_TOUCH,
ENTITY_FIREWORK_BLAST,
ENTITY_FIREWORK_BLAST_FAR,
ENTITY_FIREWORK_LARGE_BLAST,
@ -270,6 +280,15 @@ public enum BuiltinSound implements Sound {
ENTITY_LIGHTNING_IMPACT,
ENTITY_LIGHTNING_THUNDER,
ENTITY_LINGERINGPOTION_THROW,
ENTITY_LLAMA_AMBIENT,
ENTITY_LLAMA_ANGRY,
ENTITY_LLAMA_CHEST,
ENTITY_LLAMA_DEATH,
ENTITY_LLAMA_EAT,
ENTITY_LLAMA_HURT,
ENTITY_LLAMA_SPIT,
ENTITY_LLAMA_STEP,
ENTITY_LLAMA_SWAG,
ENTITY_MAGMACUBE_DEATH,
ENTITY_MAGMACUBE_HURT,
ENTITY_MAGMACUBE_JUMP,
@ -366,13 +385,24 @@ public enum BuiltinSound implements Sound {
ENTITY_SQUID_AMBIENT,
ENTITY_SQUID_DEATH,
ENTITY_SQUID_HURT,
ENTITY_STRAY_AMBIENT,
ENTITY_STRAY_DEATH,
ENTITY_STRAY_HURT,
ENTITY_STRAY_STEP,
ENTITY_TNT_PRIMED,
ENTITY_VEX_AMBIENT,
ENTITY_VEX_CHARGE,
ENTITY_VEX_DEATH,
ENTITY_VEX_HURT,
ENTITY_VILLAGER_AMBIENT,
ENTITY_VILLAGER_DEATH,
ENTITY_VILLAGER_HURT,
ENTITY_VILLAGER_NO,
ENTITY_VILLAGER_TRADING,
ENTITY_VILLAGER_YES,
ENTITY_VINDICATION_ILLAGER_AMBIENT,
ENTITY_VINDICATION_ILLAGER_DEATH,
ENTITY_VINDICATION_ILLAGER_HURT,
ENTITY_WITCH_AMBIENT,
ENTITY_WITCH_DEATH,
ENTITY_WITCH_DRINK,
@ -383,11 +413,11 @@ public enum BuiltinSound implements Sound {
ENTITY_WITHER_DEATH,
ENTITY_WITHER_HURT,
ENTITY_WITHER_SHOOT,
ENTITY_WITHER_SPAWN,
ENTITY_WITHER_SKELETON_AMBIENT,
ENTITY_WITHER_SKELETON_DEATH,
ENTITY_WITHER_SKELETON_HURT,
ENTITY_WITHER_SKELETON_STEP,
ENTITY_WITHER_SPAWN,
ENTITY_WOLF_AMBIENT,
ENTITY_WOLF_DEATH,
ENTITY_WOLF_GROWL,
@ -420,10 +450,12 @@ public enum BuiltinSound implements Sound {
ENTITY_ZOMBIE_VILLAGER_STEP,
ITEM_ARMOR_EQUIP_CHAIN,
ITEM_ARMOR_EQUIP_DIAMOND,
ITEM_ARMOR_EQUIP_ELYTRA,
ITEM_ARMOR_EQUIP_GENERIC,
ITEM_ARMOR_EQUIP_GOLD,
ITEM_ARMOR_EQUIP_IRON,
ITEM_ARMOR_EQUIP_LEATHER,
ITEM_BOTTLE_EMPTY,
ITEM_BOTTLE_FILL,
ITEM_BOTTLE_FILL_DRAGONBREATH,
ITEM_BUCKET_EMPTY,
@ -438,6 +470,7 @@ public enum BuiltinSound implements Sound {
ITEM_SHIELD_BLOCK,
ITEM_SHIELD_BREAK,
ITEM_SHOVEL_FLATTEN,
ITEM_TOTEM_USE,
MUSIC_CREATIVE,
MUSIC_CREDITS,
MUSIC_DRAGON,