Enable FZ Integration - Crafting and Barrels ( Untested ).

This commit is contained in:
AlgorithmX2
2014-03-18 12:54:57 -05:00
parent a475a3e91f
commit 9e85c33b16
7 changed files with 85 additions and 46 deletions
@@ -0,0 +1,27 @@
package appeng.integration.modules.helpers;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
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
public IMEInventory getInventory(TileEntity te, ForgeDirection d, StorageChannel chan)
{
if ( chan == StorageChannel.ITEMS )
return FZ.instance.getFactorizationBarrel( te );
return null;
}
}