Basic reformat, hit once, hope never again
This commit is contained in:
@@ -57,13 +57,13 @@ public final class ChargerWailaDataProvider extends BaseWailaDataProvider
|
||||
public List<String> getWailaBody( ItemStack itemStack, List<String> currentToolTip, IWailaDataAccessor accessor, IWailaConfigHandler config )
|
||||
{
|
||||
final TileEntity te = accessor.getTileEntity();
|
||||
if ( te instanceof TileCharger )
|
||||
if( te instanceof TileCharger )
|
||||
{
|
||||
final TileCharger charger = ( TileCharger ) te;
|
||||
final TileCharger charger = (TileCharger) te;
|
||||
final IInventory chargerInventory = charger.getInternalInventory();
|
||||
final ItemStack chargingItem = chargerInventory.getStackInSlot( 0 );
|
||||
|
||||
if ( chargingItem != null )
|
||||
if( chargingItem != null )
|
||||
{
|
||||
final String currentInventory = chargingItem.getDisplayName();
|
||||
final EntityPlayer player = accessor.getPlayer();
|
||||
|
||||
+3
-3
@@ -56,12 +56,12 @@ public final class CraftingMonitorWailaDataProvider extends BaseWailaDataProvide
|
||||
public List<String> getWailaBody( ItemStack itemStack, List<String> currentToolTip, IWailaDataAccessor accessor, IWailaConfigHandler config )
|
||||
{
|
||||
final TileEntity te = accessor.getTileEntity();
|
||||
if ( te instanceof TileCraftingMonitorTile )
|
||||
if( te instanceof TileCraftingMonitorTile )
|
||||
{
|
||||
final TileCraftingMonitorTile monitor = ( TileCraftingMonitorTile ) te;
|
||||
final TileCraftingMonitorTile monitor = (TileCraftingMonitorTile) te;
|
||||
final IAEItemStack displayStack = monitor.getJobProgress();
|
||||
|
||||
if ( displayStack != null )
|
||||
if( displayStack != null )
|
||||
{
|
||||
final String currentCrafting = displayStack.getItemStack().getDisplayName();
|
||||
|
||||
|
||||
+4
-4
@@ -56,18 +56,18 @@ public final class PowerStateWailaDataProvider extends BaseWailaDataProvider
|
||||
{
|
||||
final TileEntity te = accessor.getTileEntity();
|
||||
|
||||
if ( te instanceof IPowerChannelState )
|
||||
if( te instanceof IPowerChannelState )
|
||||
{
|
||||
final IPowerChannelState state = ( IPowerChannelState ) te;
|
||||
final IPowerChannelState state = (IPowerChannelState) te;
|
||||
|
||||
final boolean isActive = state.isActive();
|
||||
final boolean isPowered = state.isPowered();
|
||||
|
||||
if ( isActive && isPowered )
|
||||
if( isActive && isPowered )
|
||||
{
|
||||
currentToolTip.add( WailaText.DeviceOnline.getLocal() );
|
||||
}
|
||||
else if ( isPowered )
|
||||
else if( isPowered )
|
||||
{
|
||||
currentToolTip.add( WailaText.DeviceMissingChannel.getLocal() );
|
||||
}
|
||||
|
||||
+10
-10
@@ -77,17 +77,17 @@ public final class PowerStorageWailaDataProvider extends BaseWailaDataProvider
|
||||
public List<String> getWailaBody( ItemStack itemStack, List<String> currentToolTip, IWailaDataAccessor accessor, IWailaConfigHandler config )
|
||||
{
|
||||
final TileEntity te = accessor.getTileEntity();
|
||||
if ( te instanceof IAEPowerStorage )
|
||||
if( te instanceof IAEPowerStorage )
|
||||
{
|
||||
final IAEPowerStorage storage = ( IAEPowerStorage ) te;
|
||||
final IAEPowerStorage storage = (IAEPowerStorage) te;
|
||||
|
||||
final double maxPower = storage.getAEMaxPower();
|
||||
if ( maxPower > 0 )
|
||||
if( maxPower > 0 )
|
||||
{
|
||||
final NBTTagCompound tag = accessor.getNBTData();
|
||||
|
||||
final long internalCurrentPower = this.getInternalCurrentPower( tag, te );
|
||||
final long internalMaxPower = ( long ) ( 100 * maxPower );
|
||||
final long internalMaxPower = (long) ( 100 * maxPower );
|
||||
|
||||
final String formatCurrentPower = Platform.formatPowerLong( internalCurrentPower, false );
|
||||
final String formatMaxPower = Platform.formatPowerLong( internalMaxPower, false );
|
||||
@@ -119,13 +119,13 @@ public final class PowerStorageWailaDataProvider extends BaseWailaDataProvider
|
||||
@Override
|
||||
public NBTTagCompound getNBTData( EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, int x, int y, int z )
|
||||
{
|
||||
if ( te instanceof IAEPowerStorage )
|
||||
if( te instanceof IAEPowerStorage )
|
||||
{
|
||||
final IAEPowerStorage storage = ( IAEPowerStorage ) te;
|
||||
final IAEPowerStorage storage = (IAEPowerStorage) te;
|
||||
|
||||
if ( storage.getAEMaxPower() > 0 )
|
||||
if( storage.getAEMaxPower() > 0 )
|
||||
{
|
||||
final long internalCurrentPower = ( long ) ( 100 * storage.getAECurrentPower() );
|
||||
final long internalCurrentPower = (long) ( 100 * storage.getAECurrentPower() );
|
||||
|
||||
tag.setLong( ID_CURRENT_POWER, internalCurrentPower );
|
||||
}
|
||||
@@ -150,12 +150,12 @@ public final class PowerStorageWailaDataProvider extends BaseWailaDataProvider
|
||||
{
|
||||
final long internalCurrentPower;
|
||||
|
||||
if ( tag.hasKey( ID_CURRENT_POWER ) )
|
||||
if( tag.hasKey( ID_CURRENT_POWER ) )
|
||||
{
|
||||
internalCurrentPower = tag.getLong( ID_CURRENT_POWER );
|
||||
this.cache.put( te, internalCurrentPower );
|
||||
}
|
||||
else if ( this.cache.containsKey( te ) )
|
||||
else if( this.cache.containsKey( te ) )
|
||||
{
|
||||
internalCurrentPower = this.cache.get( te );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user