Improved readability of variables
Hopefully improved semantics of variables Fixed typos Added hyphenations
This commit is contained in:
@@ -45,12 +45,12 @@ public class NEIGrinderRecipeHandler extends TemplateRecipeHandler
|
||||
CachedRecipe cr = this.arecipes.get( recipe );
|
||||
if ( cr instanceof CachedGrindStoneRecipe )
|
||||
{
|
||||
CachedGrindStoneRecipe cgsr = (CachedGrindStoneRecipe) cr;
|
||||
if ( cgsr.hasOptional )
|
||||
CachedGrindStoneRecipe cachedRecipe = (CachedGrindStoneRecipe) cr;
|
||||
if ( cachedRecipe.hasOptional )
|
||||
{
|
||||
FontRenderer fr = Minecraft.getMinecraft().fontRenderer;
|
||||
int width = fr.getStringWidth( cgsr.Chance );
|
||||
fr.drawString( cgsr.Chance, (168 - width) / 2, 5, 0 );
|
||||
int width = fr.getStringWidth( cachedRecipe.Chance );
|
||||
fr.drawString( cachedRecipe.Chance, (168 - width) / 2, 5, 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -83,13 +83,13 @@ public class NEIGrinderRecipeHandler extends TemplateRecipeHandler
|
||||
{
|
||||
if ( (outputId.equals( "grindstone" )) && (getClass() == NEIGrinderRecipeHandler.class) )
|
||||
{
|
||||
for (IGrinderEntry irecipe : AEApi.instance().registries().grinder().getRecipes())
|
||||
for (IGrinderEntry recipe : AEApi.instance().registries().grinder().getRecipes())
|
||||
{
|
||||
CachedGrindStoneRecipe recipe = new CachedGrindStoneRecipe( irecipe );
|
||||
if ( recipe != null )
|
||||
CachedGrindStoneRecipe cachedRecipe = new CachedGrindStoneRecipe( recipe );
|
||||
if ( cachedRecipe != null )
|
||||
{
|
||||
recipe.computeVisuals();
|
||||
this.arecipes.add( recipe );
|
||||
cachedRecipe.computeVisuals();
|
||||
this.arecipes.add( cachedRecipe );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -101,30 +101,30 @@ public class NEIGrinderRecipeHandler extends TemplateRecipeHandler
|
||||
|
||||
public void loadCraftingRecipes(ItemStack result)
|
||||
{
|
||||
for (IGrinderEntry irecipe : AEApi.instance().registries().grinder().getRecipes())
|
||||
for (IGrinderEntry recipe : AEApi.instance().registries().grinder().getRecipes())
|
||||
{
|
||||
if ( NEIServerUtils.areStacksSameTypeCrafting( irecipe.getOutput(), result ) )
|
||||
if ( NEIServerUtils.areStacksSameTypeCrafting( recipe.getOutput(), result ) )
|
||||
{
|
||||
CachedGrindStoneRecipe recipe = new CachedGrindStoneRecipe( irecipe );
|
||||
recipe.computeVisuals();
|
||||
this.arecipes.add( recipe );
|
||||
CachedGrindStoneRecipe cachedRecipe = new CachedGrindStoneRecipe( recipe );
|
||||
cachedRecipe.computeVisuals();
|
||||
this.arecipes.add( cachedRecipe );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void loadUsageRecipes(ItemStack ingredient)
|
||||
{
|
||||
for (IGrinderEntry irecipe : AEApi.instance().registries().grinder().getRecipes())
|
||||
for (IGrinderEntry recipe : AEApi.instance().registries().grinder().getRecipes())
|
||||
{
|
||||
CachedGrindStoneRecipe recipe = new CachedGrindStoneRecipe( irecipe );
|
||||
CachedGrindStoneRecipe cachedRecipe = new CachedGrindStoneRecipe( recipe );
|
||||
|
||||
if ( (recipe != null) && (recipe.contains( recipe.ingredients, ingredient.getItem() )) )
|
||||
if ( (cachedRecipe != null) && (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 );
|
||||
this.arecipes.add( recipe );
|
||||
cachedRecipe.setIngredientPermutation( cachedRecipe.ingredients, ingredient );
|
||||
this.arecipes.add( cachedRecipe );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -169,19 +169,19 @@ public class NEIGrinderRecipeHandler extends TemplateRecipeHandler
|
||||
boolean hasOptional = false;
|
||||
public String Chance;
|
||||
|
||||
public CachedGrindStoneRecipe(IGrinderEntry irecipe) {
|
||||
result = new PositionedStack( irecipe.getOutput(), -30 + 107, 47 );
|
||||
public CachedGrindStoneRecipe(IGrinderEntry recipe) {
|
||||
result = new PositionedStack( recipe.getOutput(), -30 + 107, 47 );
|
||||
ingredients = new ArrayList<PositionedStack>();
|
||||
|
||||
if ( irecipe.getOptionalOutput() != null )
|
||||
if ( recipe.getOptionalOutput() != null )
|
||||
{
|
||||
hasOptional = true;
|
||||
Chance = ((int) (irecipe.getOptionalChance() * 100)) + GuiText.OfSecondOutput.getLocal();
|
||||
ingredients.add( new PositionedStack( irecipe.getOptionalOutput(), -30 + 107 + 18, 47 ) );
|
||||
Chance = ((int) (recipe.getOptionalChance() * 100)) + GuiText.OfSecondOutput.getLocal();
|
||||
ingredients.add( new PositionedStack( recipe.getOptionalOutput(), -30 + 107 + 18, 47 ) );
|
||||
}
|
||||
|
||||
if ( irecipe.getInput() != null )
|
||||
ingredients.add( new PositionedStack( irecipe.getInput(), 45, 24 ) );
|
||||
if ( recipe.getInput() != null )
|
||||
ingredients.add( new PositionedStack( recipe.getInput(), 45, 24 ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user