コード例 #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();
 }
コード例 #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));
   }
 }
コード例 #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));
      }
    }
  }