diff options
Diffstat (limited to '')
64 files changed, 128 insertions, 353 deletions
diff --git a/Server/Plugins/APIDump/APIDesc.lua b/Server/Plugins/APIDump/APIDesc.lua index d5a2f53bf..09f784a93 100644 --- a/Server/Plugins/APIDump/APIDesc.lua +++ b/Server/Plugins/APIDump/APIDesc.lua @@ -16780,7 +16780,7 @@ end E_META_HEAD_ZOMBIE = { Notes = "A flag in the metadata of heads that indicates that the head is a zombie head.", -}, + }, esBed = { Notes = "A bed explosion. The SourceData param is the {{Vector3i|position}} of the bed.", diff --git a/src/BlockEntities/DropSpenserEntity.cpp b/src/BlockEntities/DropSpenserEntity.cpp index 3a43e1073..a7cea4256 100644 --- a/src/BlockEntities/DropSpenserEntity.cpp +++ b/src/BlockEntities/DropSpenserEntity.cpp @@ -75,7 +75,7 @@ void cDropSpenserEntity::DropSpense(cChunk & a_Chunk) if (SlotsCnt == 0) { // Nothing in the dropspenser, play the click sound - m_World->BroadcastSoundEffect("random.click", static_cast<double>(m_PosX), static_cast<double>(m_PosY), static_cast<double>(m_PosZ), 1.0f, 1.2f); + m_World->BroadcastSoundEffect("block.dispenser.fail", static_cast<double>(m_PosX), static_cast<double>(m_PosY), static_cast<double>(m_PosZ), 1.0f, 1.2f); return; } @@ -97,7 +97,7 @@ void cDropSpenserEntity::DropSpense(cChunk & a_Chunk) case E_META_DROPSPENSER_FACING_ZP: SmokeDir = static_cast<int>(SmokeDirection::NORTH); break; } m_World->BroadcastSoundParticleEffect(EffectID::PARTICLE_SMOKE, m_PosX, m_PosY, m_PosZ, SmokeDir); - m_World->BroadcastSoundEffect("random.click", static_cast<double>(m_PosX), static_cast<double>(m_PosY), static_cast<double>(m_PosZ), 1.0f, 1.0f); + m_World->BroadcastSoundEffect("block.dispenser.dispense", static_cast<double>(m_PosX), static_cast<double>(m_PosY), static_cast<double>(m_PosZ), 1.0f, 1.0f); } diff --git a/src/BlockEntities/JukeboxEntity.cpp b/src/BlockEntities/JukeboxEntity.cpp index 467a3a28a..f505a3030 100644 --- a/src/BlockEntities/JukeboxEntity.cpp +++ b/src/BlockEntities/JukeboxEntity.cpp @@ -64,7 +64,7 @@ bool cJukeboxEntity::PlayRecord(int a_Record) EjectRecord(); } m_Record = a_Record; - m_World->BroadcastSoundParticleEffect(EffectID::SFX_PLAY_MUSIC_DISC, m_PosX, m_PosY, m_PosZ, m_Record); + m_World->BroadcastSoundParticleEffect(EffectID::SFX_RANDOM_PLAY_MUSIC_DISC, m_PosX, m_PosY, m_PosZ, m_Record); m_World->SetBlockMeta(m_PosX, m_PosY, m_PosZ, E_META_JUKEBOX_ON); return true; } @@ -85,7 +85,7 @@ bool cJukeboxEntity::EjectRecord(void) Drops.push_back(cItem(static_cast<short>(m_Record), 1, 0)); m_Record = 0; m_World->SpawnItemPickups(Drops, m_PosX + 0.5, m_PosY + 1, m_PosZ + 0.5, 8); - m_World->BroadcastSoundParticleEffect(EffectID::SFX_PLAY_MUSIC_DISC, m_PosX, m_PosY, m_PosZ, 0); + m_World->BroadcastSoundParticleEffect(EffectID::SFX_RANDOM_PLAY_MUSIC_DISC, m_PosX, m_PosY, m_PosZ, 0); m_World->SetBlockMeta(m_PosX, m_PosY, m_PosZ, E_META_JUKEBOX_OFF); return true; } diff --git a/src/BlockEntities/NoteEntity.cpp b/src/BlockEntities/NoteEntity.cpp index 7430cfba0..41559a8ad 100644 --- a/src/BlockEntities/NoteEntity.cpp +++ b/src/BlockEntities/NoteEntity.cpp @@ -85,16 +85,16 @@ void cNoteEntity::MakeSound(void) case E_BLOCK_WOODEN_SLAB: { instrument = E_INST_DOUBLE_BASS; - sampleName = "note.bassattack"; + sampleName = "block.note.bass"; break; } - case E_BLOCK_SAND: case E_BLOCK_GRAVEL: + case E_BLOCK_SAND: case E_BLOCK_SOULSAND: { instrument = E_INST_SNARE_DRUM; - sampleName = "note.snare"; + sampleName = "block.note.snare"; break; } @@ -107,7 +107,7 @@ void cNoteEntity::MakeSound(void) case E_BLOCK_STAINED_GLASS_PANE: { instrument = E_INST_CLICKS; - sampleName = "note.hat"; + sampleName = "block.note.hat"; break; } @@ -186,14 +186,14 @@ void cNoteEntity::MakeSound(void) case E_BLOCK_YELLOW_SHULKER_BOX: { instrument = E_INST_BASS_DRUM; - sampleName = "note.bd"; + sampleName = "block.note.basedrum"; break; } default: { instrument = E_INST_HARP_PIANO; - sampleName = "note.harp"; + sampleName = "block.note.harp"; break; } } diff --git a/src/BlockInfo.cpp b/src/BlockInfo.cpp index 7a4e87356..faa2e2808 100644 --- a/src/BlockInfo.cpp +++ b/src/BlockInfo.cpp @@ -692,197 +692,6 @@ void cBlockInfo::Initialize(cBlockInfoArray & a_Info) a_Info[E_BLOCK_SPRUCE_FENCE_GATE ].m_BlockHeight = 1.5; - // Block place sounds: - a_Info[E_BLOCK_STONE ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_GRASS ].m_PlaceSound = "dig.grass"; - a_Info[E_BLOCK_DIRT ].m_PlaceSound = "dig.gravel"; - a_Info[E_BLOCK_COBBLESTONE ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_PLANKS ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_SAPLING ].m_PlaceSound = "dig.grass"; - a_Info[E_BLOCK_BEDROCK ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_SAND ].m_PlaceSound = "dig.sand"; - a_Info[E_BLOCK_GRAVEL ].m_PlaceSound = "dig.gravel"; - a_Info[E_BLOCK_GOLD_ORE ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_IRON_ORE ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_COAL_ORE ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_LOG ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_LEAVES ].m_PlaceSound = "dig.grass"; - a_Info[E_BLOCK_SPONGE ].m_PlaceSound = "dig.grass"; - a_Info[E_BLOCK_GLASS ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_LAPIS_ORE ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_LAPIS_BLOCK ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_DISPENSER ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_SANDSTONE ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_NOTE_BLOCK ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_POWERED_RAIL ].m_PlaceSound = "dig.metal"; - a_Info[E_BLOCK_DETECTOR_RAIL ].m_PlaceSound = "dig.metal"; - a_Info[E_BLOCK_STICKY_PISTON ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_COBWEB ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_TALL_GRASS ].m_PlaceSound = "dig.grass"; - a_Info[E_BLOCK_DEAD_BUSH ].m_PlaceSound = "dig.grass"; - a_Info[E_BLOCK_PISTON ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_PISTON_EXTENSION ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_WOOL ].m_PlaceSound = "dig.cloth"; - a_Info[E_BLOCK_PISTON_MOVED_BLOCK ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_DANDELION ].m_PlaceSound = "dig.grass"; - a_Info[E_BLOCK_FLOWER ].m_PlaceSound = "dig.grass"; - a_Info[E_BLOCK_BROWN_MUSHROOM ].m_PlaceSound = "dig.grass"; - a_Info[E_BLOCK_RED_MUSHROOM ].m_PlaceSound = "dig.grass"; - a_Info[E_BLOCK_GOLD_BLOCK ].m_PlaceSound = "dig.metal"; - a_Info[E_BLOCK_IRON_BLOCK ].m_PlaceSound = "dig.metal"; - a_Info[E_BLOCK_DOUBLE_STONE_SLAB ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_STONE_SLAB ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_BRICK ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_TNT ].m_PlaceSound = "dig.grass"; - a_Info[E_BLOCK_BOOKCASE ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_MOSSY_COBBLESTONE ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_OBSIDIAN ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_TORCH ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_FIRE ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_MOB_SPAWNER ].m_PlaceSound = "dig.metal"; - a_Info[E_BLOCK_OAK_WOOD_STAIRS ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_CHEST ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_REDSTONE_WIRE ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_DIAMOND_ORE ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_DIAMOND_BLOCK ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_CRAFTING_TABLE ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_FARMLAND ].m_PlaceSound = "dig.gravel"; - a_Info[E_BLOCK_FURNACE ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_LIT_FURNACE ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_SIGN_POST ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_OAK_DOOR ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_LADDER ].m_PlaceSound = "dig.ladder"; - a_Info[E_BLOCK_RAIL ].m_PlaceSound = "dig.metal"; - a_Info[E_BLOCK_COBBLESTONE_STAIRS ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_WALLSIGN ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_LEVER ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_STONE_PRESSURE_PLATE ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_IRON_DOOR ].m_PlaceSound = "dig.metal"; - a_Info[E_BLOCK_WOODEN_PRESSURE_PLATE ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_REDSTONE_ORE ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_REDSTONE_ORE_GLOWING ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_REDSTONE_TORCH_OFF ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_REDSTONE_TORCH_ON ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_STONE_BUTTON ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_SNOW ].m_PlaceSound = "dig.snow"; - a_Info[E_BLOCK_ICE ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_SNOW_BLOCK ].m_PlaceSound = "dig.snow"; - a_Info[E_BLOCK_CACTUS ].m_PlaceSound = "dig.cloth"; - a_Info[E_BLOCK_CLAY ].m_PlaceSound = "dig.gravel"; - a_Info[E_BLOCK_SUGARCANE ].m_PlaceSound = "dig.grass"; - a_Info[E_BLOCK_JUKEBOX ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_FENCE ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_PUMPKIN ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_NETHERRACK ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_SOULSAND ].m_PlaceSound = "dig.sand"; - a_Info[E_BLOCK_GLOWSTONE ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_NETHER_PORTAL ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_JACK_O_LANTERN ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_CAKE ].m_PlaceSound = "dig.snow"; - a_Info[E_BLOCK_REDSTONE_REPEATER_OFF ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_REDSTONE_REPEATER_ON ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_STAINED_GLASS ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_TRAPDOOR ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_SILVERFISH_EGG ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_STONE_BRICKS ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_HUGE_BROWN_MUSHROOM ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_HUGE_RED_MUSHROOM ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_IRON_BARS ].m_PlaceSound = "dig.metal"; - a_Info[E_BLOCK_GLASS_PANE ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_MELON ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_PUMPKIN_STEM ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_MELON_STEM ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_VINES ].m_PlaceSound = "dig.grass"; - a_Info[E_BLOCK_OAK_FENCE_GATE ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_BRICK_STAIRS ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_STONE_BRICK_STAIRS ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_MYCELIUM ].m_PlaceSound = "dig.grass"; - a_Info[E_BLOCK_LILY_PAD ].m_PlaceSound = "dig.grass"; - a_Info[E_BLOCK_NETHER_BRICK ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_NETHER_BRICK_FENCE ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_NETHER_BRICK_STAIRS ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_NETHER_WART ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_ENCHANTMENT_TABLE ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_BREWING_STAND ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_CAULDRON ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_END_PORTAL ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_END_PORTAL_FRAME ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_END_STONE ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_DRAGON_EGG ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_REDSTONE_LAMP_OFF ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_REDSTONE_LAMP_ON ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_DOUBLE_WOODEN_SLAB ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_WOODEN_SLAB ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_COCOA_POD ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_SANDSTONE_STAIRS ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_EMERALD_ORE ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_ENDER_CHEST ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_TRIPWIRE_HOOK ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_TRIPWIRE ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_EMERALD_BLOCK ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_SPRUCE_WOOD_STAIRS ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_BIRCH_WOOD_STAIRS ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_JUNGLE_WOOD_STAIRS ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_COMMAND_BLOCK ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_BEACON ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_COBBLESTONE_WALL ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_FLOWER_POT ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_CARROTS ].m_PlaceSound = "dig.grass"; - a_Info[E_BLOCK_POTATOES ].m_PlaceSound = "dig.grass"; - a_Info[E_BLOCK_HEAD ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_ANVIL ].m_PlaceSound = "random.anvil_land"; - a_Info[E_BLOCK_TRAPPED_CHEST ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_LIGHT_WEIGHTED_PRESSURE_PLATE ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_HEAVY_WEIGHTED_PRESSURE_PLATE ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_INACTIVE_COMPARATOR ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_ACTIVE_COMPARATOR ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_DAYLIGHT_SENSOR ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_BLOCK_OF_REDSTONE ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_NETHER_QUARTZ_ORE ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_HOPPER ].m_PlaceSound = "dig.metal"; - a_Info[E_BLOCK_QUARTZ_BLOCK ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_QUARTZ_STAIRS ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_ACTIVATOR_RAIL ].m_PlaceSound = "dig.metal"; - a_Info[E_BLOCK_DROPPER ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_STAINED_CLAY ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_STAINED_GLASS_PANE ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_NEW_LEAVES ].m_PlaceSound = "dig.grass"; - a_Info[E_BLOCK_NEW_LOG ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_ACACIA_WOOD_STAIRS ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_DARK_OAK_WOOD_STAIRS ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_SLIME_BLOCK ].m_PlaceSound = "mob.slime.big"; - a_Info[E_BLOCK_BARRIER ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_IRON_TRAPDOOR ].m_PlaceSound = "dig.metal"; - a_Info[E_BLOCK_PRISMARINE_BLOCK ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_SEA_LANTERN ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_HAY_BALE ].m_PlaceSound = "dig.grass"; - a_Info[E_BLOCK_CARPET ].m_PlaceSound = "dig.cloth"; - a_Info[E_BLOCK_HARDENED_CLAY ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_BLOCK_OF_COAL ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_PACKED_ICE ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_BIG_FLOWER ].m_PlaceSound = "dig.grass"; - a_Info[E_BLOCK_STANDING_BANNER ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_WALL_BANNER ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_RED_SANDSTONE ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_RED_SANDSTONE_STAIRS].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_RED_SANDSTONE_SLAB ].m_PlaceSound = "dig.stone"; - a_Info[E_BLOCK_SPRUCE_FENCE_GATE ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_BIRCH_FENCE_GATE ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_JUNGLE_FENCE_GATE ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_DARK_OAK_FENCE_GATE ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_ACACIA_FENCE_GATE ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_SPRUCE_FENCE ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_BIRCH_FENCE ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_JUNGLE_FENCE ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_DARK_OAK_FENCE ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_ACACIA_FENCE ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_SPRUCE_DOOR ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_BIRCH_DOOR ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_JUNGLE_DOOR ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_ACACIA_DOOR ].m_PlaceSound = "dig.wood"; - a_Info[E_BLOCK_DARK_OAK_DOOR ].m_PlaceSound = "dig.wood"; - - // Block hardness: a_Info[E_BLOCK_AIR ].m_Hardness = 0.0f; a_Info[E_BLOCK_STONE ].m_Hardness = 1.5f; diff --git a/src/Blocks/BlockButton.h b/src/Blocks/BlockButton.h index 6a162e331..16283efea 100644 --- a/src/Blocks/BlockButton.h +++ b/src/Blocks/BlockButton.h @@ -35,7 +35,7 @@ public: a_ChunkInterface.SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, Meta, false); a_WorldInterface.WakeUpSimulators(a_BlockX, a_BlockY, a_BlockZ); - a_WorldInterface.GetBroadcastManager().BroadcastSoundEffect("random.click", x, y, z, 0.5f, 0.6f); + a_WorldInterface.GetBroadcastManager().BroadcastSoundEffect("block.stone_button.click_on", x, y, z, 0.5f, 0.6f); // Queue a button reset (unpress) auto TickDelay = (m_BlockType == E_BLOCK_STONE_BUTTON) ? 20 : 30; @@ -46,7 +46,7 @@ public: // Block hasn't change in the meantime; set its meta a_World.SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, a_World.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ) & 0x07, false); a_World.WakeUpSimulators(a_BlockX, a_BlockY, a_BlockZ); - a_World.BroadcastSoundEffect("random.click", x, y, z, 0.5f, 0.5f); + a_World.BroadcastSoundEffect("block.stone_button.click_off", x, y, z, 0.5f, 0.5f); } } ); diff --git a/src/Blocks/BlockDoor.cpp b/src/Blocks/BlockDoor.cpp index 6dae5a34d..c2b0f66d8 100644 --- a/src/Blocks/BlockDoor.cpp +++ b/src/Blocks/BlockDoor.cpp @@ -65,7 +65,7 @@ bool cBlockDoorHandler::OnUse(cChunkInterface & a_ChunkInterface, cWorldInterfac case E_BLOCK_OAK_DOOR: { ChangeDoor(a_ChunkInterface, a_BlockX, a_BlockY, a_BlockZ); - a_Player->GetWorld()->BroadcastSoundParticleEffect(EffectID::SFX_RANDOM_DOOR_OPEN_CLOSE, a_BlockX, a_BlockY, a_BlockZ, 0, a_Player->GetClientHandle()); + a_Player->GetWorld()->BroadcastSoundParticleEffect(EffectID::SFX_RANDOM_WOODEN_DOOR_OPEN, a_BlockX, a_BlockY, a_BlockZ, 0, a_Player->GetClientHandle()); break; } // Prevent iron door from opening on player click diff --git a/src/Blocks/BlockFenceGate.h b/src/Blocks/BlockFenceGate.h index f80502fb8..57eaeadc4 100644 --- a/src/Blocks/BlockFenceGate.h +++ b/src/Blocks/BlockFenceGate.h @@ -50,7 +50,7 @@ public: // Standing aside - use last direction a_ChunkInterface.SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, OldMetaData); } - a_Player->GetWorld()->BroadcastSoundParticleEffect(EffectID::SFX_RANDOM_DOOR_OPEN_CLOSE, a_BlockX, a_BlockY, a_BlockZ, 0, a_Player->GetClientHandle()); + a_Player->GetWorld()->BroadcastSoundParticleEffect(EffectID::SFX_RANDOM_FENCE_GATE_OPEN, a_BlockX, a_BlockY, a_BlockZ, 0, a_Player->GetClientHandle()); return true; } diff --git a/src/Blocks/BlockLever.h b/src/Blocks/BlockLever.h index 4b52df981..b294e65ef 100644 --- a/src/Blocks/BlockLever.h +++ b/src/Blocks/BlockLever.h @@ -24,7 +24,7 @@ public: a_ChunkInterface.SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, Meta); a_WorldInterface.WakeUpSimulators(a_BlockX, a_BlockY, a_BlockZ); - a_WorldInterface.GetBroadcastManager().BroadcastSoundEffect("random.click", static_cast<double>(a_BlockX), static_cast<double>(a_BlockY), static_cast<double>(a_BlockZ), 0.5f, (Meta & 0x08) ? 0.6f : 0.5f); + a_WorldInterface.GetBroadcastManager().BroadcastSoundEffect("block.lever.click", static_cast<double>(a_BlockX), static_cast<double>(a_BlockY), static_cast<double>(a_BlockZ), 0.5f, (Meta & 0x08) ? 0.6f : 0.5f); return true; } diff --git a/src/Blocks/BlockPiston.cpp b/src/Blocks/BlockPiston.cpp index a6f247150..7e5efe4ae 100644 --- a/src/Blocks/BlockPiston.cpp +++ b/src/Blocks/BlockPiston.cpp @@ -236,7 +236,7 @@ void cBlockPistonHandler::ExtendPiston(Vector3i a_BlockPos, cWorld * a_World) } a_World->BroadcastBlockAction(a_BlockPos.x, a_BlockPos.y, a_BlockPos.z, 0, pistonMeta, pistonBlock); - a_World->BroadcastSoundEffect("tile.piston.out", a_BlockPos.x, a_BlockPos.y, a_BlockPos.z, 0.5f, 0.7f); + a_World->BroadcastSoundEffect("block.piston.extend", a_BlockPos.x, a_BlockPos.y, a_BlockPos.z, 0.5f, 0.7f); PushBlocks(blocksPushed, a_World, pushDir); @@ -280,7 +280,7 @@ void cBlockPistonHandler::RetractPiston(Vector3i a_BlockPos, cWorld * a_World) a_World->SetBlock(a_BlockPos.x, a_BlockPos.y, a_BlockPos.z, pistonBlock, pistonMeta & ~(8)); a_World->BroadcastBlockAction(a_BlockPos.x, a_BlockPos.y, a_BlockPos.z, 1, pistonMeta & ~(8), pistonBlock); - a_World->BroadcastSoundEffect("tile.piston.in", a_BlockPos.x, a_BlockPos.y, a_BlockPos.z, 0.5f, 0.7f); + a_World->BroadcastSoundEffect("block.piston.contract", a_BlockPos.x, a_BlockPos.y, a_BlockPos.z, 0.5f, 0.7f); if (!IsSticky(pistonBlock)) { diff --git a/src/Blocks/BlockTrapdoor.h b/src/Blocks/BlockTrapdoor.h index 71fe4c6bb..1100cccf1 100644 --- a/src/Blocks/BlockTrapdoor.h +++ b/src/Blocks/BlockTrapdoor.h @@ -39,7 +39,7 @@ public: // Flip the ON bit on / off using the XOR bitwise operation NIBBLETYPE Meta = (a_ChunkInterface.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ) ^ 0x04); a_ChunkInterface.SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, Meta); - a_WorldInterface.GetBroadcastManager().BroadcastSoundParticleEffect(EffectID::SFX_RANDOM_DOOR_OPEN_CLOSE, a_BlockX, a_BlockY, a_BlockZ, 0, a_Player->GetClientHandle()); + a_WorldInterface.GetBroadcastManager().BroadcastSoundParticleEffect(EffectID::SFX_RANDOM_FENCE_GATE_OPEN, a_BlockX, a_BlockY, a_BlockZ, 0, a_Player->GetClientHandle()); return true; } diff --git a/src/EffectID.h b/src/EffectID.h index 2050a9d49..471266ac1 100644 --- a/src/EffectID.h +++ b/src/EffectID.h @@ -2,29 +2,44 @@ enum class EffectID : Int32 { - SFX_RANDOM_CLICK_1 = 1000, - SFX_RANDOM_CLICK_2 = 1001, - SFX_RANDOM_BOW = 1002, - SFX_RANDOM_DOOR_OPEN_CLOSE = 1003, - SFX_RANDOM_FIZZ = 1004, - SFX_PLAY_MUSIC_DISC = 1005, - // NOT ASSIGNED = 1006 - SFX_MOB_GHAST_CHARGE = 1007, - SFX_MOB_GHAST_FIREBALL = 1008, - SFX_MOB_GHAST_FIREBALL_LOW = 1009, - SFX_MOB_ZOMBIE_WOOD = 1010, - SFX_MOB_ZOMBIE_METAL = 1011, - SFX_MOB_ZOMBIE_WOOD_BREAK = 1012, - SFX_MOB_WITHER_SPAWN = 1013, - SFX_MOB_WITHER_SHOOT = 1014, - SFX_MOB_BAT_TAKEOFF = 1015, - SFX_MOB_ZOMBIE_INFECT = 1016, - SFX_MOB_ZOMBIE_UNFECT = 1017, - SFX_MOB_ENDERDRAGON_END = 1018, - // NOT ASSIGNED = 1019 - SFX_RANDOM_ANVIL_BREAK = 1020, - SFX_RANDOM_ANVIL_USE = 1021, - SFX_RANDOM_ANVIL_LAND = 1022, + SFX_RANDOM_DISPENSER_DISPENSE = 1000, + SFX_RANDOM_DISPENSER_DISPENSE_FAIL = 1001, + SFX_RANDOM_DISPENSER_SHOOT = 1002, + SFX_RANDOM_ENDER_EYE_LAUNCH = 1003, + SFX_RANDOM_FIREWORK_SHOT = 1004, + SFX_RANDOM_IRON_DOOR_OPEN = 1005, + SFX_RANDOM_WOODEN_DOOR_OPEN = 1006, + SFX_RANDOM_WOODEN_TRAPDOOR_OPEN = 1007, + SFX_RANDOM_FENCE_GATE_OPEN = 1008, + SFX_RANDOM_FIRE_EXTINGUISH = 1009, + SFX_RANDOM_PLAY_MUSIC_DISC = 1010, + SFX_RANDOM_IRON_DOOR_CLOSE = 1011, + SFX_RANDOM_WOODEN_DOOR_CLOSE = 1012, + SFX_RANDOM_WOODEN_TRAPDOOR_CLOSE = 1013, + SFX_RANDOM_FENCE_GATE_CLOSE = 1014, + SFX_MOB_GHAST_WARN = 1015, + SFX_MOB_GHAST_SHOOT = 1016, + SFX_MOB_ENDERDRAGON_SHOOT = 1017, + SFX_MOB_BLAZE_SHOOT = 1018, + SFX_MOB_ZOMBIE_WOOD = 1019, + SFX_MOB_ZOMBIE_METAL = 1020, + SFX_MOB_ZOMBIE_WOOD_BREAK = 1021, + SFX_MOB_WITHER_BREAK_BLOCK = 1022, + SFX_MOB_WITHER_SPAWN = 1023, + SFX_MOB_WITHER_SHOOT = 1024, + SFX_MOB_BAT_TAKEOFF = 1025, + SFX_MOB_ZOMBIE_INFECT = 1026, + SFX_MOB_ZOMBIE_UNFECT = 1027, + SFX_MOB_ENDERDRAGON_DEATH = 1028, + SFX_RANDOM_ANVIL_BREAK = 1029, + SFX_RANDOM_ANVIL_USE = 1030, + SFX_RANDOM_ANVIL_LAND = 1031, + SFX_RANDOM_PORTAL_TRAVEL = 1032, + SFX_RANDOM_CHORUS_FLOWER_GROW = 1033, + SFX_RANDOM_CHORUS_FLOWER_DEATH = 1034, + SFX_RANDOM_BREWING_STAND_BREW = 1035, + SFX_RANDOM_IRON_TRAPDOOR_OPEN = 1036, + SFX_RANDOM_IRON_TRAPDOOR_CLOSE = 1037, PARTICLE_SMOKE = 2000, PARTICLE_BLOCK_BREAK = 2001, @@ -32,7 +47,9 @@ enum class EffectID : Int32 PARTICLE_EYE_OF_ENDER = 2003, PARTICLE_MOBSPAWN = 2004, PARTICLE_HAPPY_VILLAGER = 2005, - PARTICLE_FALL_PARTICLES = 2006, + PARTICLE_DRAGON_BREATH = 2006, + PARTICLE_END_GATEWAY_SPAWN = 3000, + PARTICLE_ENDERDRAGON_GROWL = 3001, }; enum class SmokeDirection : Int32 diff --git a/src/Entities/ArrowEntity.cpp b/src/Entities/ArrowEntity.cpp index 532d83b23..e8430090b 100644 --- a/src/Entities/ArrowEntity.cpp +++ b/src/Entities/ArrowEntity.cpp @@ -88,7 +88,7 @@ void cArrowEntity::OnHitSolidBlock(const Vector3d & a_HitPos, eBlockFace a_HitFa m_HitBlockPos = Vector3i(X, Y, Z); // Broadcast arrow hit sound - m_World->BroadcastSoundEffect("random.bowhit", static_cast<double>(X), static_cast<double>(Y), static_cast<double>(Z), 0.5f, static_cast<float>(0.75 + (static_cast<float>((GetUniqueID() * 23) % 32)) / 64)); + m_World->BroadcastSoundEffect("entity.arrow.hit", static_cast<double>(X), static_cast<double>(Y), static_cast<double>(Z), 0.5f, static_cast<float>(0.75 + (static_cast<float>((GetUniqueID() * 23) % 32)) / 64)); if ((m_World->GetBlock(Hit) == E_BLOCK_TNT) && IsOnFire()) { @@ -143,7 +143,7 @@ void cArrowEntity::OnHitEntity(cEntity & a_EntityHit, const Vector3d & a_HitPos) } // Broadcast successful hit sound - GetWorld()->BroadcastSoundEffect("random.successful_hit", GetPosX(), GetPosY(), GetPosZ(), 0.5, static_cast<float>(0.75 + (static_cast<float>((GetUniqueID() * 23) % 32)) / 64)); + GetWorld()->BroadcastSoundEffect("entity.arrow.hit_player", GetPosX(), GetPosY(), GetPosZ(), 0.5, static_cast<float>(0.75 + (static_cast<float>((GetUniqueID() * 23) % 32)) / 64)); Destroy(); } @@ -168,7 +168,7 @@ void cArrowEntity::CollectedBy(cPlayer & a_Dest) } GetWorld()->BroadcastCollectEntity(*this, a_Dest, 1); - GetWorld()->BroadcastSoundEffect("random.pop", GetPosX(), GetPosY(), GetPosZ(), 0.5, static_cast<float>(0.75 + (static_cast<float>((GetUniqueID() * 23) % 32)) / 64)); + GetWorld()->BroadcastSoundEffect("entity.item.pickup", GetPosX(), GetPosY(), GetPosZ(), 0.5, static_cast<float>(0.75 + (static_cast<float>((GetUniqueID() * 23) % 32)) / 64)); m_bIsCollected = true; } } diff --git a/src/Entities/ExpOrb.cpp b/src/Entities/ExpOrb.cpp index 290f9e665..1b4845c09 100644 --- a/src/Entities/ExpOrb.cpp +++ b/src/Entities/ExpOrb.cpp @@ -56,7 +56,7 @@ void cExpOrb::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) LOGD("Player %s picked up an ExpOrb. His reward is %i", a_ClosestPlayer->GetName().c_str(), m_Reward); a_ClosestPlayer->DeltaExperience(m_Reward); - m_World->BroadcastSoundEffect("random.orb", GetPosX(), GetPosY(), GetPosZ(), 0.5f, (0.75f + (static_cast<float>((GetUniqueID() * 23) % 32)) / 64)); + m_World->BroadcastSoundEffect("entity.experience_orb.pickup", GetPosX(), GetPosY(), GetPosZ(), 0.5f, (0.75f + (static_cast<float>((GetUniqueID() * 23) % 32)) / 64)); Destroy(); } diff --git a/src/Entities/Floater.cpp b/src/Entities/Floater.cpp index b405c5f65..304ba6425 100644 --- a/src/Entities/Floater.cpp +++ b/src/Entities/Floater.cpp @@ -135,7 +135,7 @@ void cFloater::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) { if (m_CountDownTime <= 0) { - m_World->BroadcastSoundEffect("random.splash", GetPosX(), GetPosY(), GetPosZ(), 1, 1); + m_World->BroadcastSoundEffect("entity.bobber.splash", GetPosX(), GetPosY(), GetPosZ(), 1, 1); SetPosY(GetPosY() - 1); m_CanPickupItem = true; m_PickupCountDown = 20; diff --git a/src/Entities/Pickup.cpp b/src/Entities/Pickup.cpp index f000e60f3..d88a47187 100644 --- a/src/Entities/Pickup.cpp +++ b/src/Entities/Pickup.cpp @@ -237,7 +237,7 @@ bool cPickup::CollectedBy(cPlayer & a_Dest) m_World->BroadcastCollectEntity(*this, a_Dest, NumAdded); // Also send the "pop" sound effect with a somewhat random pitch (fast-random using EntityID ;) - m_World->BroadcastSoundEffect("random.pop", GetPosX(), GetPosY(), GetPosZ(), 0.5, (0.75f + (static_cast<float>((GetUniqueID() * 23) % 32)) / 64)); + m_World->BroadcastSoundEffect("entity.item.pickup", GetPosX(), GetPosY(), GetPosZ(), 0.5, (0.75f + (static_cast<float>((GetUniqueID() * 23) % 32)) / 64)); if (m_Item.m_ItemCount <= 0) { // All of the pickup has been collected, schedule the pickup for destroying diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp index 9fba0d015..521a12326 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -2291,7 +2291,7 @@ void cPlayer::UseEquippedItem(int a_Amount) if (GetInventory().DamageEquippedItem(static_cast<Int16>(a_Amount))) { - m_World->BroadcastSoundEffect("random.break", GetPosX(), GetPosY(), GetPosZ(), 0.5f, static_cast<float>(0.75 + (static_cast<float>((GetUniqueID() * 23) % 32)) / 64)); + m_World->BroadcastSoundEffect("entity.item.break", GetPosX(), GetPosY(), GetPosZ(), 0.5f, static_cast<float>(0.75 + (static_cast<float>((GetUniqueID() * 23) % 32)) / 64)); } } diff --git a/src/Items/ItemBow.h b/src/Items/ItemBow.h index fc0ee8434..a2f646efc 100644 --- a/src/Items/ItemBow.h +++ b/src/Items/ItemBow.h @@ -81,7 +81,7 @@ public: return; } a_Player->GetWorld()->BroadcastSoundEffect( - "random.bow", + "entity.arrow.shoot", a_Player->GetPosX(), a_Player->GetPosY(), a_Player->GetPosZ(), diff --git a/src/Items/ItemChest.h b/src/Items/ItemChest.h index 786ed1067..a714e5c96 100644 --- a/src/Items/ItemChest.h +++ b/src/Items/ItemChest.h @@ -159,20 +159,6 @@ public: a_World.FastSetBlock(a_BlockX + CrossCoords[NeighborIdx].x, a_BlockY, a_BlockZ + CrossCoords[NeighborIdx].z, ChestBlockType, Meta); } - // Play the placement sound: - AString PlaceSound = cBlockInfo::GetPlaceSound(ChestBlockType); - float Volume = 1.0f, Pitch = 0.8f; - if (PlaceSound == "dig.metal") - { - Pitch = 1.2f; - PlaceSound = "dig.stone"; - } - else if (PlaceSound == "random.anvil_land") - { - Volume = 0.65f; - } - a_World.BroadcastSoundEffect(PlaceSound, a_BlockX + 0.5, a_BlockY + 0.5, a_BlockZ + 0.5, Volume, Pitch); - // Remove the "placed" item: if (a_Player.IsGameModeSurvival()) { diff --git a/src/Items/ItemDye.h b/src/Items/ItemDye.h index c2635bcb6..c776d5244 100644 --- a/src/Items/ItemDye.h +++ b/src/Items/ItemDye.h @@ -63,7 +63,6 @@ public: // Place the cocoa pod: if (a_Player->PlaceBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_COCOA_POD, BlockMeta)) { - a_World->BroadcastSoundEffect("dig.stone", a_BlockX + 0.5, a_BlockY + 0.5, a_BlockZ + 0.5, 1.0f, 0.8f); if (a_Player->IsGameModeSurvival()) { a_Player->GetInventory().RemoveOneEquippedItem(); diff --git a/src/Items/ItemHandler.cpp b/src/Items/ItemHandler.cpp index b3ad73b25..d05364e95 100644 --- a/src/Items/ItemHandler.cpp +++ b/src/Items/ItemHandler.cpp @@ -416,29 +416,6 @@ bool cItemHandler::OnPlayerPlace( return false; } - // Play the placement sound for the main block: - for (const auto & blk: blocks) - { - // Find the main block by comparing the coords: - if ((blk.GetX() != a_BlockX) || (blk.GetY() != a_BlockY) || (blk.GetZ() != a_BlockZ)) - { - continue; - } - AString PlaceSound = cBlockInfo::GetPlaceSound(blk.m_BlockType); - float Volume = 1.0f, Pitch = 0.8f; - if (PlaceSound == "dig.metal") - { - Pitch = 1.2f; - PlaceSound = "dig.stone"; - } - else if (PlaceSound == "random.anvil_land") - { - Volume = 0.65f; - } - a_World.BroadcastSoundEffect(PlaceSound, a_BlockX + 0.5, a_BlockY + 0.5, a_BlockZ + 0.5, Volume, Pitch); - break; - } // for blk - blocks[] - // Remove the "placed" item: if (a_Player.IsGameModeSurvival()) { diff --git a/src/Items/ItemHoe.h b/src/Items/ItemHoe.h index 62581e943..9a9a2cc64 100644 --- a/src/Items/ItemHoe.h +++ b/src/Items/ItemHoe.h @@ -58,7 +58,7 @@ public: } a_World->SetBlock(a_BlockX, a_BlockY, a_BlockZ, NewBlock, 0); - a_World->BroadcastSoundEffect("dig.gravel", a_BlockX + 0.5, a_BlockY + 0.5, a_BlockZ + 0.5, 1.0f, 0.8f); + a_World->BroadcastSoundEffect("item.hoe.till", a_BlockX + 0.5, a_BlockY + 0.5, a_BlockZ + 0.5, 1.0f, 0.8f); a_Player->UseEquippedItem(); return true; } diff --git a/src/Items/ItemLighter.h b/src/Items/ItemLighter.h index eda7ed64c..72e358297 100644 --- a/src/Items/ItemLighter.h +++ b/src/Items/ItemLighter.h @@ -57,7 +57,7 @@ public: case E_BLOCK_TNT: { // Activate the TNT: - a_World->BroadcastSoundEffect("game.tnt.primed", static_cast<double>(a_BlockX), static_cast<double>(a_BlockY), static_cast<double>(a_BlockZ), 1.0f, 1.0f); + a_World->BroadcastSoundEffect("entity.tnt.primed", static_cast<double>(a_BlockX), static_cast<double>(a_BlockY), static_cast<double>(a_BlockZ), 1.0f, 1.0f); a_World->SetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_AIR, 0); a_World->SpawnPrimedTNT(a_BlockX + 0.5, a_BlockY + 0.5, a_BlockZ + 0.5); // 80 ticks to boom break; @@ -73,7 +73,7 @@ public: if (a_World->GetBlock(a_BlockX, a_BlockY, a_BlockZ) == E_BLOCK_AIR) { a_World->SetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_FIRE, 0); - a_World->BroadcastSoundEffect("fire.ignite", static_cast<double>(a_BlockX), static_cast<double>(a_BlockY), static_cast<double>(a_BlockZ), 1.0F, 1.04F); + a_World->BroadcastSoundEffect("item.flintandsteel.use", static_cast<double>(a_BlockX), static_cast<double>(a_BlockY), static_cast<double>(a_BlockZ), 1.0F, 1.04F); break; } } diff --git a/src/Items/ItemSlab.h b/src/Items/ItemSlab.h index e51c6675b..7741f5f30 100644 --- a/src/Items/ItemSlab.h +++ b/src/Items/ItemSlab.h @@ -39,10 +39,6 @@ public: int a_CursorX, int a_CursorY, int a_CursorZ ) override { - // Prepare sound effect - AString PlaceSound = cBlockInfo::GetPlaceSound(static_cast<BLOCKTYPE>(m_ItemType)); - float Volume = 1.0f, Pitch = 0.8f; - // Special slab handling - placing a slab onto another slab produces a dblslab instead: BLOCKTYPE ClickedBlockType; NIBBLETYPE ClickedBlockMeta; @@ -59,7 +55,6 @@ public: ((ClickedBlockMeta & 0x08) == 0) ) { - a_World.BroadcastSoundEffect(PlaceSound, a_BlockX + 0.5, a_BlockY + 0.5, a_BlockZ + 0.5, Volume, Pitch); if (!a_Player.PlaceBlock(a_BlockX, a_BlockY, a_BlockZ, m_DoubleSlabBlockType, ClickedBlockMeta & 0x07)) { return false; @@ -77,7 +72,6 @@ public: ((ClickedBlockMeta & 0x08) != 0) ) { - a_World.BroadcastSoundEffect(PlaceSound, a_BlockX + 0.5, a_BlockY + 0.5, a_BlockZ + 0.5, Volume, Pitch); if (!a_Player.PlaceBlock(a_BlockX, a_BlockY, a_BlockZ, m_DoubleSlabBlockType, ClickedBlockMeta & 0x07)) { return false; @@ -101,7 +95,6 @@ public: ((PlaceBlockMeta & 0x07) == a_EquippedItem.m_ItemDamage) // Placing the same slab sub-kind (and existing slab is single) ) { - a_World.BroadcastSoundEffect(PlaceSound, a_BlockX + 0.5, a_BlockY + 0.5, a_BlockZ + 0.5, Volume, Pitch); if (!a_Player.PlaceBlock(a_BlockX, a_BlockY, a_BlockZ, m_DoubleSlabBlockType, PlaceBlockMeta & 0x07)) { return false; diff --git a/src/Items/ItemThrowable.h b/src/Items/ItemThrowable.h index d5a109887..eaeb118f0 100644 --- a/src/Items/ItemThrowable.h +++ b/src/Items/ItemThrowable.h @@ -37,7 +37,7 @@ public: // Play sound cFastRandom Random; - a_World->BroadcastSoundEffect("random.bow", a_Player->GetPosX(), a_Player->GetPosY() - a_Player->GetHeight(), a_Player->GetPosZ(), 0.5f, 0.4f / (Random.NextFloat(1.0f) * 0.4f + 0.8f)); + a_World->BroadcastSoundEffect("entity.arrow.shoot", a_Player->GetPosX(), a_Player->GetPosY() - a_Player->GetHeight(), a_Player->GetPosZ(), 0.5f, 0.4f / (Random.NextFloat(1.0f) * 0.4f + 0.8f)); if (a_World->CreateProjectile(Pos.x, Pos.y, Pos.z, m_ProjectileKind, a_Player, &a_Player->GetEquippedItem(), &Speed) == cEntity::INVALID_ID) { diff --git a/src/Mobs/Bat.cpp b/src/Mobs/Bat.cpp index e187e928a..5fa8ffc9b 100644 --- a/src/Mobs/Bat.cpp +++ b/src/Mobs/Bat.cpp @@ -7,7 +7,7 @@ cBat::cBat(void) : - super("Bat", mtBat, "mob.bat.hurt", "mob.bat.death", 0.5, 0.9) + super("Bat", mtBat, "entity.bat.hurt", "entity.bat.death", 0.5, 0.9) { SetGravity(-2.0f); SetAirDrag(0.05f); diff --git a/src/Mobs/Blaze.cpp b/src/Mobs/Blaze.cpp index d002e14e7..8cdac12d1 100644 --- a/src/Mobs/Blaze.cpp +++ b/src/Mobs/Blaze.cpp @@ -9,7 +9,7 @@ cBlaze::cBlaze(void) : - super("Blaze", mtBlaze, "mob.blaze.hit", "mob.blaze.death", 0.6, 1.8) + super("Blaze", mtBlaze, "entity.blaze.hurt", "entity.blaze.death", 0.6, 1.8) { SetGravity(-8.0f); SetAirDrag(0.05f); diff --git a/src/Mobs/CaveSpider.cpp b/src/Mobs/CaveSpider.cpp index 9f2524c1b..c6aa8af61 100644 --- a/src/Mobs/CaveSpider.cpp +++ b/src/Mobs/CaveSpider.cpp @@ -8,7 +8,7 @@ cCaveSpider::cCaveSpider(void) : - super("CaveSpider", mtCaveSpider, "mob.spider.say", "mob.spider.death", 0.7, 0.5) + super("CaveSpider", mtCaveSpider, "entity.spider.hurt", "entity.spider.death", 0.7, 0.5) { } diff --git a/src/Mobs/Chicken.cpp b/src/Mobs/Chicken.cpp index 2c9e86e85..0224078f5 100644 --- a/src/Mobs/Chicken.cpp +++ b/src/Mobs/Chicken.cpp @@ -10,7 +10,7 @@ cChicken::cChicken(void) : - super("Chicken", mtChicken, "mob.chicken.hurt", "mob.chicken.hurt", 0.3, 0.4), + super("Chicken", mtChicken, "entity.chicken.hurt", "entity.chicken.death", 0.3, 0.4), m_EggDropTimer(0) { SetGravity(-2.0f); diff --git a/src/Mobs/Cow.cpp b/src/Mobs/Cow.cpp index dec8eface..9736fe440 100644 --- a/src/Mobs/Cow.cpp +++ b/src/Mobs/Cow.cpp @@ -11,7 +11,7 @@ cCow::cCow(void) : - super("Cow", mtCow, "mob.cow.hurt", "mob.cow.hurt", 0.9, 1.3) + super("Cow", mtCow, "entity.cow.hurt", "entity.cow.death", 0.9, 1.3) { } diff --git a/src/Mobs/Creeper.cpp b/src/Mobs/Creeper.cpp index 2e7d35ed3..fc31422f1 100644 --- a/src/Mobs/Creeper.cpp +++ b/src/Mobs/Creeper.cpp @@ -11,7 +11,7 @@ cCreeper::cCreeper(void) : - super("Creeper", mtCreeper, "mob.creeper.say", "mob.creeper.say", 0.6, 1.8), + super("Creeper", mtCreeper, "entity.creeper.hurt", "entity.creeper.death", 0.6, 1.8), m_bIsBlowing(false), m_bIsCharged(false), m_BurnedWithFlintAndSteel(false), @@ -132,7 +132,7 @@ bool cCreeper::Attack(std::chrono::milliseconds a_Dt) if (!m_bIsBlowing) { - m_World->BroadcastSoundEffect("game.tnt.primed", GetPosX(), GetPosY(), GetPosZ(), 1.f, (0.75f + (static_cast<float>((GetUniqueID() * 23) % 32)) / 64)); + m_World->BroadcastSoundEffect("entity.creeper.primed", GetPosX(), GetPosY(), GetPosZ(), 1.f, (0.75f + (static_cast<float>((GetUniqueID() * 23) % 32)) / 64)); m_bIsBlowing = true; m_World->BroadcastEntityMetadata(*this); @@ -153,7 +153,7 @@ void cCreeper::OnRightClicked(cPlayer & a_Player) { a_Player.UseEquippedItem(); } - m_World->BroadcastSoundEffect("game.tnt.primed", GetPosX(), GetPosY(), GetPosZ(), 1.f, (0.75f + (static_cast<float>((GetUniqueID() * 23) % 32)) / 64)); + m_World->BroadcastSoundEffect("entity.creeper.primed", GetPosX(), GetPosY(), GetPosZ(), 1.f, (0.75f + (static_cast<float>((GetUniqueID() * 23) % 32)) / 64)); m_bIsBlowing = true; m_World->BroadcastEntityMetadata(*this); m_BurnedWithFlintAndSteel = true; diff --git a/src/Mobs/EnderDragon.cpp b/src/Mobs/EnderDragon.cpp index acd81cde1..360fe581b 100644 --- a/src/Mobs/EnderDragon.cpp +++ b/src/Mobs/EnderDragon.cpp @@ -9,7 +9,7 @@ cEnderDragon::cEnderDragon(void) : // TODO: Vanilla source says this, but is it right? Dragons fly, they don't stand - super("EnderDragon", mtEnderDragon, "mob.enderdragon.hit", "mob.enderdragon.end", 16.0, 8.0) + super("EnderDragon", mtEnderDragon, "entity.enderdragon.hurt", "entity.enderdragon.death", 16.0, 8.0) { } diff --git a/src/Mobs/Enderman.cpp b/src/Mobs/Enderman.cpp index 4e2e67f8a..f58e2132c 100644 --- a/src/Mobs/Enderman.cpp +++ b/src/Mobs/Enderman.cpp @@ -78,7 +78,7 @@ protected: cEnderman::cEnderman(void) : - super("Enderman", mtEnderman, "mob.endermen.hit", "mob.endermen.death", 0.5, 2.9), + super("Enderman", mtEnderman, "entity.endermen.hurt", "entity.endermen.death", 0.5, 2.9), m_bIsScreaming(false), CarriedBlock(E_BLOCK_AIR), CarriedMeta(0) diff --git a/src/Mobs/Ghast.cpp b/src/Mobs/Ghast.cpp index 0544255df..6f5a93d93 100644 --- a/src/Mobs/Ghast.cpp +++ b/src/Mobs/Ghast.cpp @@ -9,7 +9,7 @@ cGhast::cGhast(void) : - super("Ghast", mtGhast, "mob.ghast.scream", "mob.ghast.death", 4, 4) + super("Ghast", mtGhast, "entity.ghast.hurt", "entity.ghast.death", 4, 4) { } diff --git a/src/Mobs/Giant.cpp b/src/Mobs/Giant.cpp index bbcad46f0..0f235e10f 100644 --- a/src/Mobs/Giant.cpp +++ b/src/Mobs/Giant.cpp @@ -8,7 +8,7 @@ cGiant::cGiant(void) : - super("Giant", mtGiant, "mob.zombie.hurt", "mob.zombie.death", 3.6, 10.8) + super("Giant", mtGiant, "entity.zombie.hurt", "entity.zombie.death", 3.6, 10.8) { } diff --git a/src/Mobs/Guardian.cpp b/src/Mobs/Guardian.cpp index 1bee8fdfb..5e98094b1 100644 --- a/src/Mobs/Guardian.cpp +++ b/src/Mobs/Guardian.cpp @@ -10,7 +10,7 @@ cGuardian::cGuardian(void) : - super("Guardian", mtGuardian, "mob.guardian.idle", "mob.guardian.death", 0.875, 0.8) + super("Guardian", mtGuardian, "entity.guardian.hurt", "entity.guardian.death", 0.875, 0.8) { } diff --git a/src/Mobs/Horse.cpp b/src/Mobs/Horse.cpp index ce4121a45..ab06704d6 100644 --- a/src/Mobs/Horse.cpp +++ b/src/Mobs/Horse.cpp @@ -10,7 +10,7 @@ cHorse::cHorse(int Type, int Color, int Style, int TameTimes) : - super("Horse", mtHorse, "mob.horse.hit", "mob.horse.death", 1.4, 1.6), + super("Horse", mtHorse, "entity.horse.hurt", "entity.horse.death", 1.4, 1.6), m_bHasChest(false), m_bIsEating(false), m_bIsRearing(false), diff --git a/src/Mobs/IronGolem.cpp b/src/Mobs/IronGolem.cpp index b0e76daca..448ed8dc0 100644 --- a/src/Mobs/IronGolem.cpp +++ b/src/Mobs/IronGolem.cpp @@ -8,7 +8,7 @@ cIronGolem::cIronGolem(void) : - super("IronGolem", mtIronGolem, "mob.irongolem.hit", "mob.irongolem.death", 1.4, 2.9) + super("IronGolem", mtIronGolem, "entity.irongolem.hurt", "entity.irongolem.death", 1.4, 2.9) { } diff --git a/src/Mobs/MagmaCube.cpp b/src/Mobs/MagmaCube.cpp index c5dd0def0..4d70a0291 100644 --- a/src/Mobs/MagmaCube.cpp +++ b/src/Mobs/MagmaCube.cpp @@ -7,7 +7,7 @@ cMagmaCube::cMagmaCube(int a_Size) : - super("MagmaCube", mtMagmaCube, Printf("mob.magmacube.%s", GetSizeName(a_Size).c_str()), Printf("mob.magmacube.%s", GetSizeName(a_Size).c_str()), 0.6 * a_Size, 0.6 * a_Size), + super("MagmaCube", mtMagmaCube, Printf("entity.%smagmacube.hurt", GetSizeName(a_Size).c_str()), Printf("entity.%smagmacube.death", GetSizeName(a_Size).c_str()), 0.6 * a_Size, 0.6 * a_Size), m_Size(a_Size) { } @@ -29,12 +29,9 @@ void cMagmaCube::GetDrops(cItems & a_Drops, cEntity * a_Killer) AString cMagmaCube::GetSizeName(int a_Size) { - if (a_Size > 1) + if (a_Size == 1) { - return "big"; - } - else - { - return "small"; + return "small_"; } + return ""; } diff --git a/src/Mobs/Mooshroom.cpp b/src/Mobs/Mooshroom.cpp index 08cabe143..b6feca76e 100644 --- a/src/Mobs/Mooshroom.cpp +++ b/src/Mobs/Mooshroom.cpp @@ -14,7 +14,7 @@ cMooshroom::cMooshroom(void) : - super("Mooshroom", mtMooshroom, "mob.cow.hurt", "mob.cow.hurt", 0.9, 1.3) + super("Mooshroom", mtMooshroom, "entity.cow.hurt", "entity.cow.death", 0.9, 1.3) { } diff --git a/src/Mobs/Ocelot.h b/src/Mobs/Ocelot.h index 1f513a6d6..a352e5854 100644 --- a/src/Mobs/Ocelot.h +++ b/src/Mobs/Ocelot.h @@ -14,7 +14,7 @@ class cOcelot : public: cOcelot(void) : - super("Ocelot", mtOcelot, "mob.cat.hitt", "mob.cat.hitt", 0.6, 0.8) + super("Ocelot", mtOcelot, "entity.cat.hurt", "entity.cat.death", 0.6, 0.8) { } diff --git a/src/Mobs/Pig.cpp b/src/Mobs/Pig.cpp index 6b420b235..82901b061 100644 --- a/src/Mobs/Pig.cpp +++ b/src/Mobs/Pig.cpp @@ -10,7 +10,7 @@ cPig::cPig(void) : - super("Pig", mtPig, "mob.pig.say", "mob.pig.death", 0.9, 0.9), + super("Pig", mtPig, "entity.pig.hurt", "entity.pig.death", 0.9, 0.9), m_bIsSaddled(false) { } diff --git a/src/Mobs/Rabbit.cpp b/src/Mobs/Rabbit.cpp index 9d10212bf..9750ed5d1 100644 --- a/src/Mobs/Rabbit.cpp +++ b/src/Mobs/Rabbit.cpp @@ -21,7 +21,7 @@ cRabbit::cRabbit(void) : cRabbit::cRabbit(eRabbitType Type, int MoreCarrotTicks) : - super("Rabbit", mtRabbit, "mob.rabbit.idle", "mob.rabbit.death", 0.82, 0.68), + super("Rabbit", mtRabbit, "entity.rabbit.hurt", "entity.rabbit.death", 0.82, 0.68), m_Type(Type), m_MoreCarrotTicks(MoreCarrotTicks) { diff --git a/src/Mobs/Sheep.cpp b/src/Mobs/Sheep.cpp index b0fc68d44..810d37a70 100644 --- a/src/Mobs/Sheep.cpp +++ b/src/Mobs/Sheep.cpp @@ -13,7 +13,7 @@ cSheep::cSheep(int a_Color) : - super("Sheep", mtSheep, "mob.sheep.say", "mob.sheep.say", 0.6, 1.3), + super("Sheep", mtSheep, "entity.sheep.hurt", "entity.sheep.death", 0.6, 1.3), m_IsSheared(false), m_WoolColor(a_Color), m_TimeToStopEating(-1) @@ -68,7 +68,7 @@ void cSheep::OnRightClicked(cPlayer & a_Player) int NumDrops = m_World->GetTickRandomNumber(2) + 1; Drops.push_back(cItem(E_BLOCK_WOOL, static_cast<char>(NumDrops), static_cast<short>(m_WoolColor))); m_World->SpawnItemPickups(Drops, GetPosX(), GetPosY(), GetPosZ(), 10); - m_World->BroadcastSoundEffect("mob.sheep.shear", GetPosX(), GetPosY(), GetPosZ(), 1.0f, 1.0f); + m_World->BroadcastSoundEffect("entity.sheep.shear", GetPosX(), GetPosY(), GetPosZ(), 1.0f, 1.0f); } else if ((EquippedItem.m_ItemType == E_ITEM_DYE) && (m_WoolColor != 15 - EquippedItem.m_ItemDamage)) { diff --git a/src/Mobs/Silverfish.h b/src/Mobs/Silverfish.h index be325a7aa..90ef5ea5d 100644 --- a/src/Mobs/Silverfish.h +++ b/src/Mobs/Silverfish.h @@ -14,7 +14,7 @@ class cSilverfish : public: cSilverfish(void) : - super("Silverfish", mtSilverfish, "mob.silverfish.hit", "mob.silverfish.kill", 0.3, 0.7) + super("Silverfish", mtSilverfish, "entity.silverfish.hurt", "entity.silverfish.death", 0.3, 0.7) { } diff --git a/src/Mobs/Skeleton.cpp b/src/Mobs/Skeleton.cpp index 7697f1279..311533b69 100644 --- a/src/Mobs/Skeleton.cpp +++ b/src/Mobs/Skeleton.cpp @@ -10,7 +10,7 @@ cSkeleton::cSkeleton(bool IsWither) : - super("Skeleton", mtSkeleton, "mob.skeleton.hurt", "mob.skeleton.death", 0.6, 1.8), + super("Skeleton", mtSkeleton, "entity.skeleton.hurt", "entity.skeleton.death", 0.6, 1.8), m_bIsWither(IsWither) { SetBurnsInDaylight(true); diff --git a/src/Mobs/Slime.cpp b/src/Mobs/Slime.cpp index 316f68523..dca5c5887 100644 --- a/src/Mobs/Slime.cpp +++ b/src/Mobs/Slime.cpp @@ -12,8 +12,8 @@ cSlime::cSlime(int a_Size) : super("Slime", mtSlime, - Printf("mob.slime.%s", GetSizeName(a_Size).c_str()), - Printf("mob.slime.%s", GetSizeName(a_Size).c_str()), + Printf("entity.%sslime.hurt", GetSizeName(a_Size).c_str()), + Printf("entity.%sslime.death", GetSizeName(a_Size).c_str()), 0.6 * a_Size, 0.6 * a_Size ), @@ -93,14 +93,11 @@ void cSlime::KilledBy(TakeDamageInfo & a_TDI) AString cSlime::GetSizeName(int a_Size) { - if (a_Size > 1) + if (a_Size == 1) { - return "big"; - } - else - { - return "small"; + return "small_"; } + return ""; } diff --git a/src/Mobs/SnowGolem.cpp b/src/Mobs/SnowGolem.cpp index b4089d179..c86577a1e 100644 --- a/src/Mobs/SnowGolem.cpp +++ b/src/Mobs/SnowGolem.cpp @@ -9,7 +9,7 @@ cSnowGolem::cSnowGolem(void) : - super("SnowGolem", mtSnowGolem, "", "", 0.4, 1.8) + super("SnowGolem", mtSnowGolem, "entity.snowman.hurt", "entity.snowman.death", 0.4, 1.8) { } diff --git a/src/Mobs/Spider.cpp b/src/Mobs/Spider.cpp index 5ee3e3294..226b1d0a7 100644 --- a/src/Mobs/Spider.cpp +++ b/src/Mobs/Spider.cpp @@ -9,7 +9,7 @@ cSpider::cSpider(void) : - super("Spider", mtSpider, "mob.spider.say", "mob.spider.death", 1.4, 0.9) + super("Spider", mtSpider, "entity.spider.hurt", "entity.spider.death", 1.4, 0.9) { } diff --git a/src/Mobs/Squid.cpp b/src/Mobs/Squid.cpp index 1b0163e30..cab409cb3 100644 --- a/src/Mobs/Squid.cpp +++ b/src/Mobs/Squid.cpp @@ -10,7 +10,7 @@ cSquid::cSquid(void) : - super("Squid", mtSquid, "", "", 0.95, 0.95) + super("Squid", mtSquid, "entity.squid.hurt", "entity.squid.death", 0.95, 0.95) { } diff --git a/src/Mobs/Villager.cpp b/src/Mobs/Villager.cpp index 6bfc5594f..46a448eb5 100644 --- a/src/Mobs/Villager.cpp +++ b/src/Mobs/Villager.cpp @@ -12,7 +12,7 @@ cVillager::cVillager(eVillagerType VillagerType) : - super("Villager", mtVillager, "", "", 0.6, 1.8), + super("Villager", mtVillager, "entity.villager.hurt", "entity.villager.death", 0.6, 1.8), m_ActionCountDown(-1), m_Type(VillagerType), m_VillagerAction(false) diff --git a/src/Mobs/Witch.cpp b/src/Mobs/Witch.cpp index 1f672b4f7..fa4074a54 100644 --- a/src/Mobs/Witch.cpp +++ b/src/Mobs/Witch.cpp @@ -9,7 +9,7 @@ cWitch::cWitch(void) : - super("Witch", mtWitch, "", "", 0.6, 1.8) + super("Witch", mtWitch, "entity.witch.hurt", "entity.witch.death", 0.6, 1.8) { } diff --git a/src/Mobs/Wither.cpp b/src/Mobs/Wither.cpp index 19399953e..fad51c05f 100644 --- a/src/Mobs/Wither.cpp +++ b/src/Mobs/Wither.cpp @@ -11,7 +11,7 @@ cWither::cWither(void) : - super("Wither", mtWither, "mob.wither.hurt", "mob.wither.death", 0.9, 4.0), + super("Wither", mtWither, "entity.wither.hurt", "entity.wither.death", 0.9, 4.0), m_WitherInvulnerableTicks(220) { SetMaxHealth(300); diff --git a/src/Mobs/Wolf.cpp b/src/Mobs/Wolf.cpp index 6751cd7c7..325c47183 100644 --- a/src/Mobs/Wolf.cpp +++ b/src/Mobs/Wolf.cpp @@ -12,7 +12,7 @@ cWolf::cWolf(void) : - super("Wolf", mtWolf, "mob.wolf.hurt", "mob.wolf.death", 0.6, 0.8), + super("Wolf", mtWolf, "entity.wolf.hurt", "entity.wolf.death", 0.6, 0.8), m_IsSitting(false), m_IsTame(false), m_IsBegging(false), diff --git a/src/Mobs/Zombie.cpp b/src/Mobs/Zombie.cpp index a5b44e6c0..882e98bf1 100644 --- a/src/Mobs/Zombie.cpp +++ b/src/Mobs/Zombie.cpp @@ -10,7 +10,7 @@ cZombie::cZombie(bool a_IsVillagerZombie) : - super("Zombie", mtZombie, "mob.zombie.hurt", "mob.zombie.death", 0.6, 1.8), + super("Zombie", mtZombie, "entity.zombie.hurt", "entity.zombie.death", 0.6, 1.8), m_IsVillagerZombie(a_IsVillagerZombie), m_IsConverting(false) { diff --git a/src/Mobs/ZombiePigman.cpp b/src/Mobs/ZombiePigman.cpp index 73ad81b36..39e7ba9c7 100644 --- a/src/Mobs/ZombiePigman.cpp +++ b/src/Mobs/ZombiePigman.cpp @@ -8,7 +8,7 @@ cZombiePigman::cZombiePigman(void) : - super("ZombiePigman", mtZombiePigman, "mob.zombiepig.zpighurt", "mob.zombiepig.zpigdeath", 0.6, 1.8) + super("ZombiePigman", mtZombiePigman, "entity.zombie_pig.hurt", "entity.zombie_pig.death", 0.6, 1.8) { } diff --git a/src/Simulator/FloodyFluidSimulator.cpp b/src/Simulator/FloodyFluidSimulator.cpp index afa54b2ad..8d712824f 100644 --- a/src/Simulator/FloodyFluidSimulator.cpp +++ b/src/Simulator/FloodyFluidSimulator.cpp @@ -259,7 +259,7 @@ void cFloodyFluidSimulator::SpreadToNeighbor(cChunk * a_NearChunk, int a_RelX, i a_NearChunk->SetBlock(a_RelX, a_RelY, a_RelZ, NewBlock, 0); a_NearChunk->BroadcastSoundEffect( - "random.fizz", + "block.lava.extinguish", static_cast<double>(BlockX), static_cast<double>(a_RelY), static_cast<double>(BlockZ), @@ -281,7 +281,7 @@ void cFloodyFluidSimulator::SpreadToNeighbor(cChunk * a_NearChunk, int a_RelX, i a_NearChunk->SetBlock(a_RelX, a_RelY, a_RelZ, NewBlock, 0); a_NearChunk->BroadcastSoundEffect( - "random.fizz", + "block.lava.extinguish", static_cast<double>(BlockX), static_cast<double>(a_RelY), static_cast<double>(BlockZ), diff --git a/src/Simulator/IncrementalRedstoneSimulator/DoorHandler.h b/src/Simulator/IncrementalRedstoneSimulator/DoorHandler.h index 70da1c54d..702c79fee 100644 --- a/src/Simulator/IncrementalRedstoneSimulator/DoorHandler.h +++ b/src/Simulator/IncrementalRedstoneSimulator/DoorHandler.h @@ -44,7 +44,7 @@ public: { cChunkInterface ChunkInterface(m_World.GetChunkMap()); cBlockDoorHandler::SetOpen(ChunkInterface, a_Position.x, a_Position.y, a_Position.z, (a_PoweringData.PowerLevel != 0)); - m_World.BroadcastSoundParticleEffect(EffectID::SFX_RANDOM_DOOR_OPEN_CLOSE, a_Position.x, a_Position.y, a_Position.z, 0); + m_World.BroadcastSoundParticleEffect(EffectID::SFX_RANDOM_WOODEN_DOOR_OPEN, a_Position.x, a_Position.y, a_Position.z, 0); } return {}; diff --git a/src/Simulator/IncrementalRedstoneSimulator/TNTHandler.h b/src/Simulator/IncrementalRedstoneSimulator/TNTHandler.h index 21dd7e898..c313bd07d 100644 --- a/src/Simulator/IncrementalRedstoneSimulator/TNTHandler.h +++ b/src/Simulator/IncrementalRedstoneSimulator/TNTHandler.h @@ -42,7 +42,7 @@ public: // LOGD("Evaluating explodinator the trinitrotoluene (%d %d %d)", a_Position.x, a_Position.y, a_Position.z); if (a_PoweringData.PowerLevel != 0) { - m_World.BroadcastSoundEffect("game.tnt.primed", static_cast<double>(a_Position.x), static_cast<double>(a_Position.y), static_cast<double>(a_Position.z), 0.5f, 0.6f); + m_World.BroadcastSoundEffect("entity.tnt.primed", static_cast<double>(a_Position.x), static_cast<double>(a_Position.y), static_cast<double>(a_Position.z), 0.5f, 0.6f); m_World.SetBlock(a_Position.x, a_Position.y, a_Position.z, E_BLOCK_AIR, 0); m_World.SpawnPrimedTNT(a_Position.x + 0.5, a_Position.y + 0.5, a_Position.z + 0.5); // 80 ticks to boom } diff --git a/src/Simulator/VaporizeFluidSimulator.cpp b/src/Simulator/VaporizeFluidSimulator.cpp index d766b069f..1d2db58fb 100644 --- a/src/Simulator/VaporizeFluidSimulator.cpp +++ b/src/Simulator/VaporizeFluidSimulator.cpp @@ -36,7 +36,7 @@ void cVaporizeFluidSimulator::AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, { a_Chunk->SetBlock(RelX, a_BlockY, RelZ, E_BLOCK_AIR, 0); a_Chunk->BroadcastSoundEffect( - "random.fizz", + "block.fire.extinguish", static_cast<double>(a_BlockX), static_cast<double>(a_BlockY), static_cast<double>(a_BlockZ), diff --git a/src/UI/ChestWindow.cpp b/src/UI/ChestWindow.cpp index bc94ec8fd..e889f9c44 100644 --- a/src/UI/ChestWindow.cpp +++ b/src/UI/ChestWindow.cpp @@ -27,7 +27,7 @@ cChestWindow::cChestWindow(cChestEntity * a_Chest) : m_SlotAreas.push_back(new cSlotAreaHotBar(*this)); // Play the opening sound: - m_World->BroadcastSoundEffect("random.chestopen", static_cast<double>(m_BlockX), static_cast<double>(m_BlockY), static_cast<double>(m_BlockZ), 1, 1); + m_World->BroadcastSoundEffect("block.chest.open", static_cast<double>(m_BlockX), static_cast<double>(m_BlockY), static_cast<double>(m_BlockZ), 1, 1); // Send out the chest-open packet: m_World->BroadcastBlockAction(m_BlockX, m_BlockY, m_BlockZ, 1, 1, a_Chest->GetBlockType()); @@ -51,7 +51,7 @@ cChestWindow::cChestWindow(cChestEntity * a_PrimaryChest, cChestEntity * a_Secon m_SlotAreas.push_back(new cSlotAreaHotBar(*this)); // Play the opening sound: - m_World->BroadcastSoundEffect("random.chestopen", static_cast<double>(m_BlockX), static_cast<double>(m_BlockY), static_cast<double>(m_BlockZ), 1, 1); + m_World->BroadcastSoundEffect("block.chest.open", static_cast<double>(m_BlockX), static_cast<double>(m_BlockY), static_cast<double>(m_BlockZ), 1, 1); // Send out the chest-open packet: m_World->BroadcastBlockAction(m_BlockX, m_BlockY, m_BlockZ, 1, 1, a_PrimaryChest->GetBlockType()); @@ -66,7 +66,7 @@ cChestWindow::~cChestWindow() // Send out the chest-close packet: m_World->BroadcastBlockAction(m_BlockX, m_BlockY, m_BlockZ, 1, 0, m_PrimaryChest->GetBlockType()); - m_World->BroadcastSoundEffect("random.chestclosed", static_cast<double>(m_BlockX), static_cast<double>(m_BlockY), static_cast<double>(m_BlockZ), 1, 1); + m_World->BroadcastSoundEffect("block.chest.close", static_cast<double>(m_BlockX), static_cast<double>(m_BlockY), static_cast<double>(m_BlockZ), 1, 1); } diff --git a/src/UI/EnderChestWindow.cpp b/src/UI/EnderChestWindow.cpp index c597f3a9b..ed0fb499f 100644 --- a/src/UI/EnderChestWindow.cpp +++ b/src/UI/EnderChestWindow.cpp @@ -25,7 +25,7 @@ cEnderChestWindow::cEnderChestWindow(cEnderChestEntity * a_EnderChest) : // Play the opening sound: m_World->BroadcastSoundEffect( - "random.chestopen", + "block.enderchest.open", static_cast<double>(m_BlockX), static_cast<double>(m_BlockY), static_cast<double>(m_BlockZ), @@ -48,7 +48,7 @@ cEnderChestWindow::~cEnderChestWindow() // Play the closing sound m_World->BroadcastSoundEffect( - "random.chestclosed", + "block.enderchest.close", static_cast<double>(m_BlockX), static_cast<double>(m_BlockY), static_cast<double>(m_BlockZ), diff --git a/src/UI/MinecartWithChestWindow.h b/src/UI/MinecartWithChestWindow.h index 87e8f6137..5e3c28512 100644 --- a/src/UI/MinecartWithChestWindow.h +++ b/src/UI/MinecartWithChestWindow.h @@ -30,7 +30,7 @@ public: m_SlotAreas.push_back(new cSlotAreaInventory(*this)); m_SlotAreas.push_back(new cSlotAreaHotBar(*this)); - a_ChestCart->GetWorld()->BroadcastSoundEffect("random.chestopen", a_ChestCart->GetPosX(), a_ChestCart->GetPosY(), a_ChestCart->GetPosZ(), 1, 1); + a_ChestCart->GetWorld()->BroadcastSoundEffect("block.chest.open", a_ChestCart->GetPosX(), a_ChestCart->GetPosY(), a_ChestCart->GetPosZ(), 1, 1); } virtual void DistributeStack(cItem & a_ItemStack, int a_Slot, cPlayer & a_Player, cSlotArea * a_ClickedArea, bool a_ShouldApply) override @@ -55,7 +55,7 @@ public: ~cMinecartWithChestWindow() { - m_ChestCart->GetWorld()->BroadcastSoundEffect("random.chestclosed", m_ChestCart->GetPosX(), m_ChestCart->GetPosY(), m_ChestCart->GetPosZ(), 1, 1); + m_ChestCart->GetWorld()->BroadcastSoundEffect("block.chest.close", m_ChestCart->GetPosX(), m_ChestCart->GetPosY(), m_ChestCart->GetPosZ(), 1, 1); } private: diff --git a/src/World.cpp b/src/World.cpp index 38b86827f..b07bc5468 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -240,7 +240,7 @@ cWorld::~cWorld() void cWorld::CastThunderbolt (int a_BlockX, int a_BlockY, int a_BlockZ) { BroadcastThunderbolt(a_BlockX, a_BlockY, a_BlockZ); - BroadcastSoundEffect("ambient.weather.thunder", a_BlockX, a_BlockY, a_BlockZ, 50, 1); + BroadcastSoundEffect("entity.lightning.thunder", a_BlockX, a_BlockY, a_BlockZ, 50, 1); } @@ -1387,7 +1387,7 @@ void cWorld::DoExplosionAt(double a_ExplosionSize, double a_BlockX, double a_Blo Vector3d explosion_pos = Vector3d(a_BlockX, a_BlockY, a_BlockZ); cVector3iArray BlocksAffected; m_ChunkMap->DoExplosionAt(a_ExplosionSize, a_BlockX, a_BlockY, a_BlockZ, BlocksAffected); - BroadcastSoundEffect("random.explode", static_cast<double>(a_BlockX), static_cast<double>(a_BlockY), static_cast<double>(a_BlockZ), 1.0f, 0.6f); + BroadcastSoundEffect("entity.generic.explode", static_cast<double>(a_BlockX), static_cast<double>(a_BlockY), static_cast<double>(a_BlockZ), 1.0f, 0.6f); { cCSLock Lock(m_CSPlayers); @@ -3440,7 +3440,7 @@ bool cWorld::SetTrapdoorOpen(int a_BlockX, int a_BlockY, int a_BlockZ, bool a_Op if (a_Open != IsOpen) { SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, Meta ^ 0x4); - BroadcastSoundParticleEffect(EffectID::SFX_RANDOM_DOOR_OPEN_CLOSE, a_BlockX, a_BlockY, a_BlockZ, 0); + BroadcastSoundParticleEffect(EffectID::SFX_RANDOM_WOODEN_TRAPDOOR_OPEN, a_BlockX, a_BlockY, a_BlockZ, 0); return true; } return false; |