2014-03-18 18:54:57 +01:00
|
|
|
package appeng.integration.modules.helpers;
|
2014-02-15 07:40:02 +01:00
|
|
|
|
|
|
|
import net.minecraft.tileentity.TileEntity;
|
|
|
|
import net.minecraftforge.common.util.ForgeDirection;
|
2014-04-18 05:33:48 +02:00
|
|
|
import appeng.api.networking.security.BaseActionSource;
|
2014-02-15 07:40:02 +01:00
|
|
|
import appeng.api.storage.IExternalStorageHandler;
|
|
|
|
import appeng.api.storage.IMEInventory;
|
|
|
|
import appeng.api.storage.StorageChannel;
|
|
|
|
import appeng.integration.modules.FZ;
|
|
|
|
|
|
|
|
public class FactorizationHandler implements IExternalStorageHandler
|
|
|
|
{
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean canHandle(TileEntity te, ForgeDirection d, StorageChannel chan)
|
|
|
|
{
|
|
|
|
return chan == StorageChannel.ITEMS && FZ.instance.isBarrel( te );
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2014-04-18 05:33:48 +02:00
|
|
|
public IMEInventory getInventory(TileEntity te, ForgeDirection d, StorageChannel chan, BaseActionSource src)
|
2014-02-15 07:40:02 +01:00
|
|
|
{
|
|
|
|
if ( chan == StorageChannel.ITEMS )
|
|
|
|
return FZ.instance.getFactorizationBarrel( te );
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|