public CachedHeatRecipe(HeatRecipes recipe) { if (recipe == null) return; inputs.add(new PositionedStack(recipe.getInput(), 18, 24)); output = new PositionedStack(recipe.getOutput(), 132, 24); heatRequired = recipe.getRequiredHeat(); isBlockRecipe = recipe.isBlockRecipe(); }
@Override public void loadCraftingRecipes(ItemStack result) { for (HeatRecipes recipe : RecipeManager.heat) { if (recipe == null) continue; if (result.isItemEqual(recipe.getOutput())) arecipes.add(new CachedHeatRecipe(recipe)); } }
@Override public void loadUsageRecipes(ItemStack ingredient) { for (HeatRecipes recipe : RecipeManager.heat) { if ((recipe == null) || (ingredient.getItem() == null)) continue; if ((recipe.matches(ingredient)) || (recipe.matches(Block.getBlockFromItem(ingredient.getItem())))) { arecipes.add(new CachedHeatRecipe(recipe)); } } }