Basic reformat, hit once, hope never again

This commit is contained in:
thatsIch
2015-04-03 08:54:31 +02:00
parent 4ff1631f89
commit d34c988c88
886 changed files with 31400 additions and 30990 deletions
@@ -75,12 +75,12 @@ public final class ChannelWailaDataProvider extends BasePartWailaDataProvider
@Override
public List<String> getWailaBody( IPart part, List<String> currentToolTip, IWailaDataAccessor accessor, IWailaConfigHandler config )
{
if ( part instanceof PartCableSmart || part instanceof PartDenseCable )
if( part instanceof PartCableSmart || part instanceof PartDenseCable )
{
final NBTTagCompound tag = accessor.getNBTData();
final byte usedChannels = this.getUsedChannels( part, tag, this.cache );
final byte maxChannels = ( byte ) ( ( part instanceof PartDenseCable ) ? 32 : 8 );
final byte maxChannels = (byte) ( ( part instanceof PartDenseCable ) ? 32 : 8 );
currentToolTip.add( usedChannels + " " + GuiText.Of.getLocal() + ' ' + maxChannels + ' ' + WailaText.Channels.getLocal() );
}
@@ -105,12 +105,12 @@ public final class ChannelWailaDataProvider extends BasePartWailaDataProvider
{
final byte usedChannels;
if ( tag.hasKey( ID_USED_CHANNELS ) )
if( tag.hasKey( ID_USED_CHANNELS ) )
{
usedChannels = tag.getByte( ID_USED_CHANNELS );
this.cache.put( part, usedChannels );
}
else if ( this.cache.containsKey( part ) )
else if( this.cache.containsKey( part ) )
{
usedChannels = this.cache.get( part );
}
@@ -143,13 +143,13 @@ public final class ChannelWailaDataProvider extends BasePartWailaDataProvider
@Override
public NBTTagCompound getNBTData( EntityPlayerMP player, IPart part, TileEntity te, NBTTagCompound tag, World world, int x, int y, int z )
{
if ( part instanceof PartCableSmart || part instanceof PartDenseCable )
if( part instanceof PartCableSmart || part instanceof PartDenseCable )
{
final NBTTagCompound tempTag = new NBTTagCompound();
part.writeToNBT( tempTag );
if ( tempTag.hasKey( ID_USED_CHANNELS ) )
if( tempTag.hasKey( ID_USED_CHANNELS ) )
{
final byte usedChannels = tempTag.getByte( ID_USED_CHANNELS );
@@ -47,5 +47,5 @@ public interface IPartWailaDataProvider
List<String> getWailaTail( IPart part, List<String> currentToolTip, IWailaDataAccessor accessor, IWailaConfigHandler config );
NBTTagCompound getNBTData(EntityPlayerMP player, IPart part, TileEntity te, NBTTagCompound tag, World world, int x, int y, int z);
NBTTagCompound getNBTData( EntityPlayerMP player, IPart part, TileEntity te, NBTTagCompound tag, World world, int x, int y, int z );
}
@@ -52,13 +52,13 @@ public final class PartAccessor
*/
public Optional<IPart> getMaybePart( TileEntity te, MovingObjectPosition mop )
{
if ( te instanceof IPartHost )
if( te instanceof IPartHost )
{
final Vec3 position = mop.hitVec.addVector( -mop.blockX, -mop.blockY, -mop.blockZ );
final IPartHost host = ( IPartHost ) te;
final IPartHost host = (IPartHost) te;
final SelectedPart sp = host.selectPart( position );
if ( sp.part != null )
if( sp.part != null )
{
return Optional.of( sp.part );
}
@@ -51,9 +51,9 @@ public final class PowerStateWailaDataProvider extends BasePartWailaDataProvider
@Override
public List<String> getWailaBody( IPart part, List<String> currentToolTip, IWailaDataAccessor accessor, IWailaConfigHandler config )
{
if ( part instanceof IPowerChannelState )
if( part instanceof IPowerChannelState )
{
final IPowerChannelState state = ( IPowerChannelState ) part;
final IPowerChannelState state = (IPowerChannelState) part;
currentToolTip.add( this.getToolTip( state.isActive(), state.isPowered() ) );
}
@@ -73,11 +73,11 @@ public final class PowerStateWailaDataProvider extends BasePartWailaDataProvider
{
final String result;
if ( isActive && isPowered )
if( isActive && isPowered )
{
result = WailaText.DeviceOnline.getLocal();
}
else if ( isPowered )
else if( isPowered )
{
result = WailaText.DeviceMissingChannel.getLocal();
}
@@ -55,21 +55,21 @@ public final class StorageMonitorWailaDataProvider extends BasePartWailaDataProv
@Override
public List<String> getWailaBody( IPart part, List<String> currentToolTip, IWailaDataAccessor accessor, IWailaConfigHandler config )
{
if ( part instanceof IPartStorageMonitor )
if( part instanceof IPartStorageMonitor )
{
final IPartStorageMonitor monitor = ( IPartStorageMonitor ) part;
final IPartStorageMonitor monitor = (IPartStorageMonitor) part;
final IAEStack<?> displayed = monitor.getDisplayed();
final boolean isLocked = monitor.isLocked();
if ( displayed instanceof IAEItemStack )
if( displayed instanceof IAEItemStack )
{
IAEItemStack ais = ( IAEItemStack ) displayed;
IAEItemStack ais = (IAEItemStack) displayed;
currentToolTip.add( WailaText.Showing.getLocal() + ": " + ais.getItemStack().getDisplayName() );
}
else if ( displayed instanceof IAEFluidStack )
else if( displayed instanceof IAEFluidStack )
{
IAEFluidStack ais = ( IAEFluidStack ) displayed;
IAEFluidStack ais = (IAEFluidStack) displayed;
currentToolTip.add( WailaText.Showing.getLocal() + ": " + ais.getFluid().getLocalizedName( ais.getFluidStack() ) );
}
@@ -40,11 +40,11 @@ public final class Tracer
* Trace view of players to blocks.
* Ignore all which are out of reach.
*
* @param world word of block
* @param world word of block
* @param player player viewing block
* @param x x pos of block
* @param y y pos of block
* @param z z pos of block
* @param x x pos of block
* @param y y pos of block
* @param z z pos of block
*
* @return trace movement. Can be null
*/
@@ -70,7 +70,7 @@ public final class Tracer
private Vec3 getCorrectedHeadVec( EntityPlayer player )
{
Vec3 v = Vec3.createVectorHelper( player.posX, player.posY, player.posZ );
if ( player.worldObj.isRemote )
if( player.worldObj.isRemote )
{
//compatibility with eye height changing mods
v.yCoord += player.getEyeHeight() - player.getDefaultEyeHeight();
@@ -78,7 +78,7 @@ public final class Tracer
else
{
v.yCoord += player.getEyeHeight();
if ( player instanceof EntityPlayerMP && player.isSneaking() )
if( player instanceof EntityPlayerMP && player.isSneaking() )
v.yCoord -= 0.08;
}
return v;