2013-12-27 23:59:59 +01:00
|
|
|
package appeng.integration.modules;
|
|
|
|
|
|
|
|
import gregtechmod.api.interfaces.IDigitalChest;
|
|
|
|
import net.minecraft.inventory.IInventory;
|
|
|
|
import net.minecraft.tileentity.TileEntity;
|
2014-02-09 02:34:52 +01:00
|
|
|
import net.minecraftforge.common.util.ForgeDirection;
|
2014-02-07 04:28:37 +01:00
|
|
|
import appeng.api.AEApi;
|
2013-12-27 23:59:59 +01:00
|
|
|
import appeng.api.storage.IMEInventory;
|
|
|
|
import appeng.integration.IIntegrationModule;
|
|
|
|
import appeng.integration.abstraction.IGT;
|
2014-02-07 04:28:37 +01:00
|
|
|
import appeng.integration.modules.helpers.GregTechHandler;
|
2013-12-27 23:59:59 +01:00
|
|
|
import appeng.integration.modules.helpers.GregTechQuantumChest;
|
|
|
|
import appeng.util.InventoryAdaptor;
|
|
|
|
|
|
|
|
public class GT implements IGT, IIntegrationModule
|
|
|
|
{
|
|
|
|
|
|
|
|
public static GT instance;
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public IMEInventory getQuantumChest(TileEntity te)
|
|
|
|
{
|
|
|
|
return new GregTechQuantumChest( (IInventory) te, InventoryAdaptor.getAdaptor( te, ForgeDirection.NORTH ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean isQuantumChest(TileEntity te)
|
|
|
|
{
|
|
|
|
if ( te instanceof IDigitalChest )
|
|
|
|
return ((IDigitalChest) te).isDigitalChest();
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void Init()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void PostInit()
|
|
|
|
{
|
2014-02-07 04:28:37 +01:00
|
|
|
AEApi.instance().registries().externalStorage().addExternalStorageInterface( new GregTechHandler() );
|
2013-12-27 23:59:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|