}
public static void playBlockSound(World world, int x, int y, int z, String soundName, float volume, float pitch, Block block, int meta) {
if (world != null && soundName != null) {
if (soundName.contains("railcraft")) {
SoundType sound = SoundRegistry.getSound(block, meta);
if (sound != null) {
String newName = soundName.contains("dig") ? sound.getBreakSound() : soundName.contains("step") ? sound.getStepResourcePath() : sound.func_150496_b();
world.playSoundEffect(x, y, z, newName, volume, pitch * sound.getPitch());
}
}
world.playSoundEffect(x, y, z, soundName, volume, pitch);
}
}