From 1d87b5499e31215d7c1d3dfb2a54b87d3b8e9df8 Mon Sep 17 00:00:00 2001 From: Final Child Date: Thu, 9 Jun 2016 18:19:12 +0900 Subject: [PATCH] Fix sounds. Have a TODO --- .../org/spacehq/mc/protocol/data/MagicValues.java | 3 ++- .../data/game/world/sound/BuiltinSound.java | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/spacehq/mc/protocol/data/MagicValues.java b/src/main/java/org/spacehq/mc/protocol/data/MagicValues.java index a4f1f5f6..0f1e9ce9 100644 --- a/src/main/java/org/spacehq/mc/protocol/data/MagicValues.java +++ b/src/main/java/org/spacehq/mc/protocol/data/MagicValues.java @@ -807,7 +807,8 @@ public class MagicValues { for(BuiltinSound sound : BuiltinSound.values()) { register(sound, sound.ordinal()); - register(sound, sound.name().toLowerCase().replace('_', '.')); + // TODO: Change this + register(sound, sound.name().toLowerCase().replace('_', '.').replace("enchantment.table", "enchantment_table").replace("polar.bear", "polar_bear").replace("wither.skeleton", "wither_skeleton")); } } diff --git a/src/main/java/org/spacehq/mc/protocol/data/game/world/sound/BuiltinSound.java b/src/main/java/org/spacehq/mc/protocol/data/game/world/sound/BuiltinSound.java index 575191e8..a18f2941 100644 --- a/src/main/java/org/spacehq/mc/protocol/data/game/world/sound/BuiltinSound.java +++ b/src/main/java/org/spacehq/mc/protocol/data/game/world/sound/BuiltinSound.java @@ -25,6 +25,7 @@ public enum BuiltinSound implements Sound { BLOCK_DISPENSER_DISPENSE, BLOCK_DISPENSER_FAIL, BLOCK_DISPENSER_LAUNCH, + BLOCK_ENCHANTMENT_TABLE_USE, BLOCK_END_GATEWAY_SPAWN, BLOCK_ENDERCHEST_CLOSE, BLOCK_ENDERCHEST_OPEN, @@ -249,6 +250,10 @@ public enum BuiltinSound implements Sound { ENTITY_HOSTILE_SMALL_FALL, ENTITY_HOSTILE_SPLASH, ENTITY_HOSTILE_SWIM, + ENTITY_HUSK_AMBIENT, + ENTITY_HUSK_DEATH, + ENTITY_HUSK_HURT, + ENTITY_HUSK_STEP, ENTITY_IRONGOLEM_ATTACK, ENTITY_IRONGOLEM_DEATH, ENTITY_IRONGOLEM_HURT, @@ -297,6 +302,12 @@ public enum BuiltinSound implements Sound { ENTITY_PLAYER_SMALL_FALL, ENTITY_PLAYER_SPLASH, ENTITY_PLAYER_SWIM, + ENTITY_POLAR_BEAR_AMBIENT, + ENTITY_POLAR_BEAR_BABY_AMBIENT, + ENTITY_POLAR_BEAR_DEATH, + ENTITY_POLAR_BEAR_HURT, + ENTITY_POLAR_BEAR_STEP, + ENTITY_POLAR_BEAR_WARNING, ENTITY_RABBIT_AMBIENT, ENTITY_RABBIT_ATTACK, ENTITY_RABBIT_DEATH, @@ -372,6 +383,10 @@ public enum BuiltinSound implements Sound { ENTITY_WITHER_DEATH, ENTITY_WITHER_HURT, ENTITY_WITHER_SHOOT, + 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,