2014-02-15 07:40:02 +01:00
|
|
|
package appeng.integration.modules;
|
|
|
|
|
2014-09-28 11:47:17 +02:00
|
|
|
import appeng.integration.modules.helpers.MinefactoryReloadedDeepStorageUnit;
|
2014-02-15 07:40:02 +01:00
|
|
|
import net.minecraft.tileentity.TileEntity;
|
|
|
|
import powercrystals.minefactoryreloaded.api.IDeepStorageUnit;
|
|
|
|
import appeng.api.AEApi;
|
|
|
|
import appeng.api.storage.IMEInventory;
|
2014-02-18 18:43:02 +01:00
|
|
|
import appeng.integration.BaseModule;
|
2014-02-15 07:40:02 +01:00
|
|
|
import appeng.integration.abstraction.IDSU;
|
|
|
|
import appeng.integration.modules.helpers.MFRDSUHandler;
|
|
|
|
|
2014-02-20 04:16:41 +01:00
|
|
|
public class DSU extends BaseModule implements IDSU
|
2014-02-15 07:40:02 +01:00
|
|
|
{
|
|
|
|
|
|
|
|
public static DSU instance;
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public IMEInventory getDSU(TileEntity te)
|
|
|
|
{
|
2014-09-28 11:47:17 +02:00
|
|
|
return new MinefactoryReloadedDeepStorageUnit( te );
|
2014-02-15 07:40:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean isDSU(TileEntity te)
|
|
|
|
{
|
|
|
|
if ( te instanceof IDeepStorageUnit )
|
|
|
|
return true;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void Init()
|
|
|
|
{
|
2014-02-20 04:16:41 +01:00
|
|
|
TestClass( IDeepStorageUnit.class );
|
2014-02-15 07:40:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void PostInit()
|
|
|
|
{
|
|
|
|
AEApi.instance().registries().externalStorage().addExternalStorageInterface( new MFRDSUHandler() );
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|