Clean up and fix some stuff from the rebase pull.

This commit is contained in:
Ben Spiers 2015-03-18 21:00:11 +00:00
parent a21e679a1d
commit e36ecf9f05
3 changed files with 1 additions and 49 deletions

View file

@ -1,4 +1,4 @@
package mekanism.common.base;
package mekanism.client.sound;
import net.minecraft.client.audio.ISound;
import cpw.mods.fml.relauncher.Side;

View file

@ -1,47 +0,0 @@
package mekanism.common.base;
import net.minecraft.util.ResourceLocation;
import mekanism.client.sound.IResettableSound;
import mekanism.client.sound.ISoundSource;
import mekanism.client.sound.SoundHandler;
import mekanism.client.sound.TileSound;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class SoundWrapper
{
@SideOnly(Side.CLIENT)
public IResettableSound sound;
public SoundWrapper(IHasSound tile, ISoundSource source)
{
try {
sound = new TileSound(tile, source);
} catch(Throwable t) {}
}
public SoundWrapper(IHasSound tile, ISoundSource source, ResourceLocation location)
{
try {
sound = new TileSound(tile, source, location);
} catch(Throwable t) {}
}
@SideOnly(Side.CLIENT)
public void reset()
{
sound.reset();
}
@SideOnly(Side.CLIENT)
public void play()
{
SoundHandler.playSound(sound);
}
@SideOnly(Side.CLIENT)
public boolean canRestart()
{
return SoundHandler.canRestartSound(sound);
}
}

View file

@ -11,7 +11,6 @@ import mekanism.common.base.IActiveState;
import net.minecraft.client.audio.ISound.AttenuationType;
import net.minecraft.util.ResourceLocation;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;