Improved readability of variables
Hopefully improved semantics of variables Fixed typos Added hyphenations
This commit is contained in:
@@ -50,16 +50,16 @@ public class NEIAEShapedRecipeHandler extends TemplateRecipeHandler
|
||||
{
|
||||
if ( (outputId.equals( "crafting" )) && (getClass() == NEIAEShapedRecipeHandler.class) )
|
||||
{
|
||||
List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList();
|
||||
for (IRecipe irecipe : allrecipes)
|
||||
List<IRecipe> recipes = CraftingManager.getInstance().getRecipeList();
|
||||
for (IRecipe recipe : recipes)
|
||||
{
|
||||
if ( (irecipe instanceof ShapedRecipe) )
|
||||
if ( (recipe instanceof ShapedRecipe) )
|
||||
{
|
||||
if ( ((ShapedRecipe) irecipe).isEnabled() )
|
||||
if ( ((ShapedRecipe) recipe).isEnabled() )
|
||||
{
|
||||
CachedShapedRecipe recipe = new CachedShapedRecipe( (ShapedRecipe) irecipe );
|
||||
recipe.computeVisuals();
|
||||
arecipes.add( recipe );
|
||||
CachedShapedRecipe cachedRecipe = new CachedShapedRecipe( (ShapedRecipe) recipe );
|
||||
cachedRecipe.computeVisuals();
|
||||
arecipes.add( cachedRecipe );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -72,16 +72,16 @@ public class NEIAEShapedRecipeHandler extends TemplateRecipeHandler
|
||||
|
||||
public void loadCraftingRecipes(ItemStack result)
|
||||
{
|
||||
List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList();
|
||||
for (IRecipe irecipe : allrecipes)
|
||||
List<IRecipe> recipes = CraftingManager.getInstance().getRecipeList();
|
||||
for (IRecipe recipe : recipes)
|
||||
{
|
||||
if ( (irecipe instanceof ShapedRecipe) )
|
||||
if ( (recipe instanceof ShapedRecipe) )
|
||||
{
|
||||
if ( ((ShapedRecipe) irecipe).isEnabled() && NEIServerUtils.areStacksSameTypeCrafting( irecipe.getRecipeOutput(), result ) )
|
||||
if ( ((ShapedRecipe) recipe).isEnabled() && NEIServerUtils.areStacksSameTypeCrafting( recipe.getRecipeOutput(), result ) )
|
||||
{
|
||||
CachedShapedRecipe recipe = new CachedShapedRecipe( (ShapedRecipe) irecipe );
|
||||
recipe.computeVisuals();
|
||||
arecipes.add( recipe );
|
||||
CachedShapedRecipe cachedRecipe = new CachedShapedRecipe( (ShapedRecipe) recipe );
|
||||
cachedRecipe.computeVisuals();
|
||||
arecipes.add( cachedRecipe );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -89,20 +89,20 @@ public class NEIAEShapedRecipeHandler extends TemplateRecipeHandler
|
||||
|
||||
public void loadUsageRecipes(ItemStack ingredient)
|
||||
{
|
||||
List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList();
|
||||
for (IRecipe irecipe : allrecipes)
|
||||
List<IRecipe> recipes = CraftingManager.getInstance().getRecipeList();
|
||||
for (IRecipe recipe : recipes)
|
||||
{
|
||||
if ( (irecipe instanceof ShapedRecipe) )
|
||||
if ( (recipe instanceof ShapedRecipe) )
|
||||
{
|
||||
CachedShapedRecipe recipe = new CachedShapedRecipe( (ShapedRecipe) irecipe );
|
||||
CachedShapedRecipe cachedRecipe = new CachedShapedRecipe( (ShapedRecipe) recipe );
|
||||
|
||||
if ( ((ShapedRecipe) irecipe).isEnabled() && recipe.contains( recipe.ingredients, ingredient.getItem() ) )
|
||||
if ( ((ShapedRecipe) recipe).isEnabled() && cachedRecipe.contains( cachedRecipe.ingredients, ingredient.getItem() ) )
|
||||
{
|
||||
recipe.computeVisuals();
|
||||
if ( recipe.contains( recipe.ingredients, ingredient ) )
|
||||
cachedRecipe.computeVisuals();
|
||||
if ( cachedRecipe.contains( cachedRecipe.ingredients, ingredient ) )
|
||||
{
|
||||
recipe.setIngredientPermutation( recipe.ingredients, ingredient );
|
||||
arecipes.add( recipe );
|
||||
cachedRecipe.setIngredientPermutation( cachedRecipe.ingredients, ingredient );
|
||||
arecipes.add( cachedRecipe );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -165,10 +165,10 @@ public class NEIAEShapedRecipeHandler extends TemplateRecipeHandler
|
||||
public ArrayList<PositionedStack> ingredients;
|
||||
public PositionedStack result;
|
||||
|
||||
public CachedShapedRecipe(ShapedRecipe irecipe) {
|
||||
result = new PositionedStack( irecipe.getRecipeOutput(), 119, 24 );
|
||||
public CachedShapedRecipe(ShapedRecipe recipe) {
|
||||
result = new PositionedStack( recipe.getRecipeOutput(), 119, 24 );
|
||||
ingredients = new ArrayList<PositionedStack>();
|
||||
setIngredients( irecipe.getWidth(), irecipe.getHeight(), irecipe.getIngredients() );
|
||||
setIngredients( recipe.getWidth(), recipe.getHeight(), recipe.getIngredients() );
|
||||
}
|
||||
|
||||
public void setIngredients(int width, int height, Object[] items)
|
||||
|
||||
Reference in New Issue
Block a user