2013-12-27 23:59:59 +01:00
|
|
|
package appeng.integration.modules.helpers;
|
|
|
|
|
|
|
|
import net.minecraft.tileentity.TileEntity;
|
2014-02-09 02:34:52 +01:00
|
|
|
import net.minecraftforge.common.util.ForgeDirection;
|
2014-04-18 05:33:48 +02:00
|
|
|
import appeng.api.networking.security.BaseActionSource;
|
2013-12-27 23:59:59 +01:00
|
|
|
import appeng.api.storage.IExternalStorageHandler;
|
|
|
|
import appeng.api.storage.IMEInventory;
|
|
|
|
import appeng.api.storage.StorageChannel;
|
2014-02-15 07:40:02 +01:00
|
|
|
import appeng.integration.modules.DSU;
|
2013-12-27 23:59:59 +01:00
|
|
|
|
|
|
|
public class MFRDSUHandler implements IExternalStorageHandler
|
|
|
|
{
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean canHandle(TileEntity te, ForgeDirection d, StorageChannel chan)
|
|
|
|
{
|
2014-02-15 07:40:02 +01:00
|
|
|
return chan == StorageChannel.ITEMS && DSU.instance.isDSU( te );
|
2013-12-27 23:59:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2014-04-18 05:33:48 +02:00
|
|
|
public IMEInventory getInventory(TileEntity te, ForgeDirection d, StorageChannel chan, BaseActionSource src)
|
2013-12-27 23:59:59 +01:00
|
|
|
{
|
|
|
|
if ( chan == StorageChannel.ITEMS )
|
2014-02-15 07:40:02 +01:00
|
|
|
return DSU.instance.getDSU( te );
|
2013-12-27 23:59:59 +01:00
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|