1
0
Fork 0

Updated sounds and effect IDs (#3422)

This commit is contained in:
mathiascode 2017-02-15 07:05:24 +02:00 committed by Mattes D
parent 4311f4a658
commit dae2adde65
64 changed files with 128 additions and 353 deletions

View File

@ -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.",

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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;
}
}

View File

@ -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;

View File

@ -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);
}
}
);

View File

@ -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

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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))
{

View File

@ -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;
}

View File

@ -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

View File

@ -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;
}
}

View File

@ -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();
}

View File

@ -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;

View File

@ -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

View File

@ -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));
}
}

View File

@ -81,7 +81,7 @@ public:
return;
}
a_Player->GetWorld()->BroadcastSoundEffect(
"random.bow",
"entity.arrow.shoot",
a_Player->GetPosX(),
a_Player->GetPosY(),
a_Player->GetPosZ(),

View File

@ -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())
{

View File

@ -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();

View File

@ -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())
{

View File

@ -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;
}

View File

@ -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;
}
}

View File

@ -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;

View File

@ -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)
{

View File

@ -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);

View File

@ -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);

View File

@ -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)
{
}

View File

@ -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);

View File

@ -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)
{
}

View File

@ -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;

View File

@ -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)
{
}

View File

@ -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)

View File

@ -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)
{
}

View File

@ -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)
{
}

View File

@ -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)
{
}

View File

@ -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),

View File

@ -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)
{
}

View File

@ -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 "";
}

View File

@ -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)
{
}

View File

@ -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)
{
}

View File

@ -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)
{
}

View File

@ -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)
{

View File

@ -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))
{

View File

@ -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)
{
}

View File

@ -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);

View File

@ -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 "";
}

View File

@ -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)
{
}

View File

@ -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)
{
}

View File

@ -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)
{
}

View File