mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
Fix Generator Tiles' client/server sidedness
This commit is contained in:
1 parent
a90680eaae
commit
b817b2840c
4 files changed
+15
-18
No files matched your search
@@ -108,10 +108,9 @@ public abstract class TileEntityAdvancedElectricMachine<RECIPE extends AdvancedM
|
||||
//Electric
|
||||
factory.electricityStored = electricityStored;
|
||||
factory.ic2Registered = ic2Registered;
|
||||
|
||||
|
||||
//Noisy
|
||||
factory.soundURL = soundURL;
|
||||
factory.sound = sound;
|
||||
|
||||
//Machine
|
||||
factory.progress[0] = operatingTicks;
|
||||
|
||||
@@ -83,7 +83,7 @@ public abstract class TileEntityElectricMachine<RECIPE extends BasicMachineRecip
|
||||
|
||||
//Noisy
|
||||
factory.soundURL = soundURL;
|
||||
factory.sound = sound;
|
||||
|
||||
|
||||
//Machine
|
||||
factory.progress[0] = operatingTicks;
|
||||
|
||||
@@ -116,17 +116,6 @@ public abstract class TileEntityGenerator extends TileEntityNoisyElectricBlock i
|
||||
return EnumSet.of(ForgeDirection.getOrientation(facing));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validate()
|
||||
{
|
||||
super.validate();
|
||||
|
||||
if(worldObj.isRemote)
|
||||
{
|
||||
sound = new TileSound(this, this);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether or not this generator can operate.
|
||||
* @return if the generator can operate
|
||||
|
||||
+13
-4
@@ -108,10 +108,9 @@ public class TileEntityReactorController extends TileEntityReactorBlock implemen
|
||||
{
|
||||
super.onUpdate();
|
||||
|
||||
if(worldObj.isRemote && shouldPlaySound() && SoundHandler.canRestartSound(getSound()) && client.enableMachineSounds)
|
||||
if(worldObj.isRemote)
|
||||
{
|
||||
getSound().reset();
|
||||
SoundHandler.playSound(getSound());
|
||||
updateSound();
|
||||
}
|
||||
|
||||
if(isFormed())
|
||||
@@ -126,7 +125,17 @@ public class TileEntityReactorController extends TileEntityReactorBlock implemen
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void updateSound()
|
||||
{
|
||||
if(shouldPlaySound() && SoundHandler.canRestartSound(getSound()) && client.enableMachineSounds)
|
||||
{
|
||||
getSound().reset();
|
||||
SoundHandler.playSound(getSound());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChunkUnload()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user