Exemplo n.º 1
0
 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();
 }
Exemplo n.º 2
0
 @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));
   }
 }
Exemplo n.º 3
0
  @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));
      }
    }
  }