2014-05-02 04:50:04 +02:00
|
|
|
package appeng.integration.modules;
|
2014-02-15 07:40:02 +01:00
|
|
|
|
2014-05-02 04:50:04 +02:00
|
|
|
import gregtech.api.interfaces.tileentity.IDigitalChest;
|
2014-02-15 07:40:02 +01:00
|
|
|
import net.minecraft.inventory.IInventory;
|
|
|
|
import net.minecraft.tileentity.TileEntity;
|
|
|
|
import net.minecraftforge.common.util.ForgeDirection;
|
|
|
|
import appeng.api.AEApi;
|
|
|
|
import appeng.api.storage.IMEInventory;
|
|
|
|
import appeng.integration.IIntegrationModule;
|
|
|
|
import appeng.integration.abstraction.IGT;
|
2014-05-02 04:50:04 +02:00
|
|
|
import appeng.integration.modules.helpers.GregTechHandler;
|
|
|
|
import appeng.integration.modules.helpers.GregTechQuantumChest;
|
2014-02-15 07:40:02 +01:00
|
|
|
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()
|
|
|
|
{
|
|
|
|
AEApi.instance().registries().externalStorage().addExternalStorageInterface( new GregTechHandler() );
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|