Don't Show Energy Cell info if the NBT Came from the client.

This commit is contained in:
AlgorithmX2
2014-05-25 11:06:59 -05:00
parent 8f474b8baf
commit 4cf6f4e5f9
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -96,7 +96,7 @@ public class Waila extends BaseModule implements IWailaDataProvider
if ( ThingOfInterest instanceof TileEnergyCell ) if ( ThingOfInterest instanceof TileEnergyCell )
{ {
NBTTagCompound c = accessor.getNBTData(); NBTTagCompound c = accessor.getNBTData();
if ( c != null ) if ( c != null && c.hasKey( "internalCurrentPower" ) )
{ {
TileEnergyCell tec = (TileEnergyCell) ThingOfInterest; TileEnergyCell tec = (TileEnergyCell) ThingOfInterest;
long power = (long) (100 * c.getDouble( "internalCurrentPower" )); long power = (long) (100 * c.getDouble( "internalCurrentPower" ));
+2 -1
View File
@@ -56,7 +56,8 @@ public class TileEnergyCell extends AENetworkTile implements IAEPowerStorage
@Override @Override
public void writeToNBT(NBTTagCompound data) public void writeToNBT(NBTTagCompound data)
{ {
data.setDouble( "internalCurrentPower", internalCurrentPower ); if ( !worldObj.isRemote )
data.setDouble( "internalCurrentPower", internalCurrentPower );
} }
@Override @Override