2014-05-11 18:28:34 +02:00
|
|
|
package appeng.integration.modules.BCHelpers;
|
2014-02-15 07:40:02 +01:00
|
|
|
|
|
|
|
import net.minecraft.tileentity.TileEntity;
|
|
|
|
import net.minecraftforge.common.util.ForgeDirection;
|
2014-04-18 05:33:48 +02:00
|
|
|
import appeng.api.networking.security.BaseActionSource;
|
2014-02-15 07:40:02 +01:00
|
|
|
import appeng.api.storage.IExternalStorageHandler;
|
|
|
|
import appeng.api.storage.IMEInventory;
|
|
|
|
import appeng.api.storage.StorageChannel;
|
|
|
|
import appeng.integration.modules.BC;
|
|
|
|
|
|
|
|
public class BCPipeHandler implements IExternalStorageHandler
|
|
|
|
{
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean canHandle(TileEntity te, ForgeDirection d, StorageChannel chan)
|
|
|
|
{
|
|
|
|
return chan == StorageChannel.ITEMS && BC.instance.isPipe( te, d );
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2014-04-18 05:33:48 +02:00
|
|
|
public IMEInventory getInventory(TileEntity te, ForgeDirection d, StorageChannel chan, BaseActionSource src)
|
2014-02-15 07:40:02 +01:00
|
|
|
{
|
|
|
|
if ( chan == StorageChannel.ITEMS )
|
|
|
|
return new BCPipeInventory( te, d );
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|