Basic reformat, hit once, hope never again
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
|
||||
package appeng.me.storage;
|
||||
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@@ -31,45 +32,46 @@ import appeng.api.storage.data.IAEFluidStack;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.tile.misc.TileCondenser;
|
||||
|
||||
|
||||
public class AEExternalHandler implements IExternalStorageHandler
|
||||
{
|
||||
|
||||
@Override
|
||||
public boolean canHandle(TileEntity te, ForgeDirection d, StorageChannel channel, BaseActionSource mySrc)
|
||||
public boolean canHandle( TileEntity te, ForgeDirection d, StorageChannel channel, BaseActionSource mySrc )
|
||||
{
|
||||
if ( channel == StorageChannel.ITEMS && te instanceof ITileStorageMonitorable )
|
||||
return ((ITileStorageMonitorable) te).getMonitorable( d, mySrc ) != null;
|
||||
if( channel == StorageChannel.ITEMS && te instanceof ITileStorageMonitorable )
|
||||
return ( (ITileStorageMonitorable) te ).getMonitorable( d, mySrc ) != null;
|
||||
|
||||
return te instanceof TileCondenser;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMEInventory getInventory(TileEntity te, ForgeDirection d, StorageChannel channel, BaseActionSource src)
|
||||
public IMEInventory getInventory( TileEntity te, ForgeDirection d, StorageChannel channel, BaseActionSource src )
|
||||
{
|
||||
if ( te instanceof TileCondenser )
|
||||
if( te instanceof TileCondenser )
|
||||
{
|
||||
if ( channel == StorageChannel.ITEMS )
|
||||
if( channel == StorageChannel.ITEMS )
|
||||
return new VoidItemInventory( (TileCondenser) te );
|
||||
else
|
||||
return new VoidFluidInventory( (TileCondenser) te );
|
||||
}
|
||||
|
||||
if ( te instanceof ITileStorageMonitorable )
|
||||
if( te instanceof ITileStorageMonitorable )
|
||||
{
|
||||
ITileStorageMonitorable iface = (ITileStorageMonitorable) te;
|
||||
IStorageMonitorable sm = iface.getMonitorable( d, src );
|
||||
|
||||
if ( channel == StorageChannel.ITEMS && sm != null )
|
||||
if( channel == StorageChannel.ITEMS && sm != null )
|
||||
{
|
||||
IMEInventory<IAEItemStack> ii = sm.getItemInventory();
|
||||
if ( ii != null )
|
||||
if( ii != null )
|
||||
return ii;
|
||||
}
|
||||
|
||||
if ( channel == StorageChannel.FLUIDS && sm != null )
|
||||
if( channel == StorageChannel.FLUIDS && sm != null )
|
||||
{
|
||||
IMEInventory<IAEFluidStack> fi = sm.getFluidInventory();
|
||||
if ( fi != null )
|
||||
if( fi != null )
|
||||
return fi;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user