Applied-Energistics-2-tiler.../integration/modules/BS.java

46 lines
1,016 B
Java
Raw Normal View History

package appeng.integration.modules;
import net.mcft.copy.betterstorage.api.ICrateStorage;
import net.minecraftforge.common.ForgeDirection;
2014-02-07 04:28:37 +01:00
import appeng.api.AEApi;
import appeng.integration.IIntegrationModule;
import appeng.integration.abstraction.IBS;
2014-02-07 04:28:37 +01:00
import appeng.integration.modules.helpers.BSCrateHandler;
import appeng.integration.modules.helpers.BSCrateStorageAdaptor;
import appeng.util.InventoryAdaptor;
public class BS implements IIntegrationModule, IBS
{
public static BS instance;
@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()
{
2014-02-07 04:28:37 +01:00
AEApi.instance().registries().externalStorage().addExternalStorageInterface( new BSCrateHandler() );
}
}