AE2 First Commit, the dawn of 1.7 hast arrived.

This commit is contained in:
algorithmx2
2013-12-27 16:59:59 -06:00
commit e9acdcbee2
468 changed files with 47440 additions and 0 deletions
@@ -0,0 +1,38 @@
package appeng.core.features.registries;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.ForgeDirection;
import appeng.api.storage.IExternalStorageHandler;
import appeng.api.storage.IExternalStorageRegistry;
import appeng.api.storage.StorageChannel;
public class ExternalStorageRegistry implements IExternalStorageRegistry
{
List<IExternalStorageHandler> Handlers;
public ExternalStorageRegistry() {
Handlers = new ArrayList();
}
@Override
public IExternalStorageHandler getHandler(TileEntity te, ForgeDirection d, StorageChannel chan)
{
for (IExternalStorageHandler x : Handlers)
{
if ( x.canHandle( te, d, chan ) )
return x;
}
return null;
}
@Override
public void addExternalStorageInterface(IExternalStorageHandler ei)
{
Handlers.add( ei );
}
}