Moved Recipe Registration to Init, Added Recipe Baking.

This commit is contained in:
AlgorithmX2
2014-07-25 17:49:49 -05:00
parent 846e8a0384
commit 31cb594f4d
10 changed files with 135 additions and 63 deletions
+12 -1
View File
@@ -16,7 +16,8 @@ public class IngredientSet implements IIngredient
int qty = 0;
final String name;
final List<ItemStack> items;
ItemStack[] baked;
public IngredientSet(ResolverResultSet rr) {
name = rr.name;
items = rr.results;
@@ -44,6 +45,9 @@ public class IngredientSet implements IIngredient
@Override
public ItemStack[] getItemStackSet() throws RegistrationError, MissingIngredientError
{
if ( baked != null )
return baked;
if ( isInside )
return new ItemStack[0];
@@ -75,4 +79,11 @@ public class IngredientSet implements IIngredient
{
return false;
}
@Override
public void bake() throws RegistrationError, MissingIngredientError
{
baked = getItemStackSet();
}
}