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
+36
View File
@@ -0,0 +1,36 @@
package appeng.recipes;
import java.util.Iterator;
public class Recipe
{
final int size;
final RecipeType type;
final RecipeItem items[];
public Recipe(RecipeType rt, Iterator<RecipeItem> ilist) throws RecipeError {
type = rt;
items = new RecipeItem[rt.getSize()];
int itemCount = 0;
while (itemCount < rt.getSize() && ilist.hasNext())
{
items[itemCount++] = ilist.next();
}
if ( ilist.hasNext() )
throw new RecipeError( "Invalid Number of Items in recipe." );
if ( rt.isShaped() )
{
if ( itemCount != rt.getSize() )
throw new RecipeError( "Invalid Number of Items in recipe." );
size = rt.getSize();
}
else
size = itemCount;
}
}