From e36ecf9f055ccd7e7ecdea6592c37aecf351be44 Mon Sep 17 00:00:00 2001 From: Ben Spiers Date: Wed, 18 Mar 2015 21:00:11 +0000 Subject: [PATCH] Clean up and fix some stuff from the rebase pull. --- .../base => client/sound}/IHasSound.java | 2 +- .../mekanism/common/base/SoundWrapper.java | 47 ------------------- .../tile/TileEntityNoisyElectricBlock.java | 1 - 3 files changed, 1 insertion(+), 49 deletions(-) rename src/main/java/mekanism/{common/base => client/sound}/IHasSound.java (91%) delete mode 100644 src/main/java/mekanism/common/base/SoundWrapper.java diff --git a/src/main/java/mekanism/common/base/IHasSound.java b/src/main/java/mekanism/client/sound/IHasSound.java similarity index 91% rename from src/main/java/mekanism/common/base/IHasSound.java rename to src/main/java/mekanism/client/sound/IHasSound.java index 813ef3256..9d9bca626 100644 --- a/src/main/java/mekanism/common/base/IHasSound.java +++ b/src/main/java/mekanism/client/sound/IHasSound.java @@ -1,4 +1,4 @@ -package mekanism.common.base; +package mekanism.client.sound; import net.minecraft.client.audio.ISound; import cpw.mods.fml.relauncher.Side; diff --git a/src/main/java/mekanism/common/base/SoundWrapper.java b/src/main/java/mekanism/common/base/SoundWrapper.java deleted file mode 100644 index 47660fb67..000000000 --- a/src/main/java/mekanism/common/base/SoundWrapper.java +++ /dev/null @@ -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); - } -} diff --git a/src/main/java/mekanism/common/tile/TileEntityNoisyElectricBlock.java b/src/main/java/mekanism/common/tile/TileEntityNoisyElectricBlock.java index f26ee242d..e1ce949bf 100644 --- a/src/main/java/mekanism/common/tile/TileEntityNoisyElectricBlock.java +++ b/src/main/java/mekanism/common/tile/TileEntityNoisyElectricBlock.java @@ -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;