2014-08-12 18:58:24 +02:00
|
|
|
package appeng.integration.modules;
|
2014-02-15 07:40:02 +01:00
|
|
|
|
2014-08-30 18:30:22 +02:00
|
|
|
import net.mcft.copy.betterstorage.api.crate.ICrateStorage;
|
2014-02-15 07:40:02 +01:00
|
|
|
import net.minecraftforge.common.util.ForgeDirection;
|
|
|
|
import appeng.api.AEApi;
|
|
|
|
import appeng.integration.IIntegrationModule;
|
2014-08-12 18:58:24 +02:00
|
|
|
import appeng.integration.abstraction.IBetterStorage;
|
|
|
|
import appeng.integration.modules.helpers.BSCrateHandler;
|
|
|
|
import appeng.integration.modules.helpers.BSCrateStorageAdaptor;
|
2014-02-15 07:40:02 +01:00
|
|
|
import appeng.util.InventoryAdaptor;
|
|
|
|
|
2014-08-12 18:58:24 +02:00
|
|
|
public class BetterStorage implements IIntegrationModule, IBetterStorage
|
2014-02-15 07:40:02 +01:00
|
|
|
{
|
|
|
|
|
2014-08-12 18:58:24 +02:00
|
|
|
public static BetterStorage instance;
|
2014-02-15 07:40:02 +01:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean isStorageCrate(Object te)
|
|
|
|
{
|
|
|
|
return te instanceof ICrateStorage;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public InventoryAdaptor getAdaptor(Object te, ForgeDirection d)
|
|
|
|
{
|
|
|
|
if ( te instanceof ICrateStorage )
|
|
|
|
{
|
|
|
|
return new BSCrateStorageAdaptor( te, d );
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void Init()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void PostInit()
|
|
|
|
{
|
|
|
|
AEApi.instance().registries().externalStorage().addExternalStorageInterface( new BSCrateHandler() );
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|