mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-24 22:04:49 +00:00
More sound fixes
This commit is contained in:
1 parent
4d65942f11
commit
b6306d0779
1 file changed
+7
-13
@@ -20,29 +20,22 @@ public abstract class TileEntityNoisyElectricBlock extends TileEntityElectricBlo
|
||||
/** The bundled URL of this machine's sound effect */
|
||||
@SideOnly(Side.CLIENT)
|
||||
public SoundWrapper sound;
|
||||
|
||||
/** The path of this machine's sound */
|
||||
public String soundPath;
|
||||
|
||||
/**
|
||||
* The base of all blocks that deal with electricity and make noise.
|
||||
*
|
||||
* @param sound - the sound path of this block
|
||||
* @param name - full name of this block
|
||||
* @param maxEnergy - how much energy this block can store
|
||||
*/
|
||||
public TileEntityNoisyElectricBlock(String soundPath, String name, double maxEnergy)
|
||||
public TileEntityNoisyElectricBlock(String sound, String name, double maxEnergy)
|
||||
{
|
||||
super(name, maxEnergy);
|
||||
|
||||
if(worldObj.isRemote)
|
||||
{
|
||||
try {
|
||||
registerSound(soundPath);
|
||||
} catch(Throwable t) {}
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private void registerSound(String soundPath)
|
||||
{
|
||||
soundURL = HolidayManager.filterSound(new ResourceLocation("mekanism", "tile." + soundPath));
|
||||
soundPath = sound;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -116,6 +109,7 @@ public abstract class TileEntityNoisyElectricBlock extends TileEntityElectricBlo
|
||||
if(worldObj.isRemote)
|
||||
{
|
||||
try {
|
||||
soundURL = HolidayManager.filterSound(new ResourceLocation("mekanism", "tile." + soundPath));
|
||||
initSounds();
|
||||
} catch(Throwable t) {}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user