Java Code Examples for mezz.jei.api.IJeiHelpers#getStackHelper()

The following examples show how to use mezz.jei.api.IJeiHelpers#getStackHelper() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AdvancedAggregatorRecipeMaker.java    From TofuCraftReload with MIT License 6 votes vote down vote up
public static List<SimpleRecipe> getRecipes(IJeiHelpers helpers)
{
  IStackHelper stackHelper = helpers.getStackHelper(); 
  List<SimpleRecipe> recipes = new ArrayList<>();
  
  for (AdvancedAggregatorRecipes recipe : AdvancedAggregatorRecipes.aggregatorRecipesList) {
  	List<List<ItemStack>> inputs = new ArrayList<>();
  	for (Object obj : recipe.inputItems) {
  		List<ItemStack> subinputs = stackHelper.toItemStackList(obj);
   	inputs.add(subinputs);
}
  	ItemStack output = recipe.resultItem;
  	SimpleRecipe newrecipe = new SimpleRecipe(inputs,output);
  	recipes.add(newrecipe);
     }
  return recipes;
}
 
Example 2
Source File: BarrelRecipeMaker.java    From Sakura_mod with MIT License 6 votes vote down vote up
public static List<BarrelRecipe> getRecipes(IJeiHelpers helpers){
  IStackHelper stackHelper = helpers.getStackHelper();

  List<BarrelRecipe> recipes = new ArrayList<BarrelRecipe>();

  for (Entry<FluidStack, Map<Object[], FluidStack>> entry : BarrelRecipes.RecipesList.entrySet()) {
  	for(Entry<Object[], FluidStack> entry2 : entry.getValue().entrySet()){
  	List<List<ItemStack>> inputs = new ArrayList<List<ItemStack>>();
  	List<List<FluidStack>> fluidlist=new ArrayList<List<FluidStack>>();
  	List<FluidStack> fluid = new ArrayList<FluidStack>();
  	
  	for (Object obj : entry2.getKey()) {
  		List<ItemStack> subinputs = stackHelper.toItemStackList(obj);
   	inputs.add(subinputs);
}
  	
   fluid.add(entry.getKey());
   fluidlist.add(fluid);
  	
  	BarrelRecipe newrecipe = new BarrelRecipe(inputs,fluidlist,entry2.getValue());
  	recipes.add(newrecipe);
  	}
  }
  return recipes;
}
 
Example 3
Source File: DistillationRecipeMaker.java    From Sakura_mod with MIT License 6 votes vote down vote up
public static List<BarrelRecipe> getRecipes(IJeiHelpers helpers){
  IStackHelper stackHelper = helpers.getStackHelper();

  List<BarrelRecipe> recipes = new ArrayList<BarrelRecipe>();

  for (Entry<FluidStack, Map<Object[], FluidStack>> entry : DistillationRecipes.RecipesList.entrySet()) {
  	for(Entry<Object[], FluidStack> entry2 : entry.getValue().entrySet()){
  	List<List<ItemStack>> inputs = new ArrayList<List<ItemStack>>();
  	List<List<FluidStack>> fluidlist=new ArrayList<List<FluidStack>>();
  	List<FluidStack> fluid = new ArrayList<FluidStack>();
  	
  	for (Object obj : entry2.getKey()) {
  		List<ItemStack> subinputs = stackHelper.toItemStackList(obj);
   	inputs.add(subinputs);
}
  	
   fluid.add(entry.getKey());
   fluidlist.add(fluid);
  	
  	BarrelRecipe newrecipe = new BarrelRecipe(inputs,fluidlist,entry2.getValue());
  	recipes.add(newrecipe);
  	}
  }
  return recipes;
}
 
Example 4
Source File: PotRecipeMaker.java    From Sakura_mod with MIT License 6 votes vote down vote up
public static List<ItemFluidRecipe> getRecipes(IJeiHelpers helpers) {
  IStackHelper stackHelper = helpers.getStackHelper();
  List<ItemFluidRecipe> recipes = new ArrayList<ItemFluidRecipe>();
  for (Entry<FluidStack, Map<Object[], ItemStack>> entry : PotRecipes.RecipesList.entrySet()) {
  	for(Entry<Object[], ItemStack> entry2 : entry.getValue().entrySet()){
  	List<List<ItemStack>> inputs = new ArrayList<List<ItemStack>>();
  	List<List<FluidStack>> fluidlist=new ArrayList<List<FluidStack>>();
  	List<FluidStack> fluid = new ArrayList<FluidStack>();
  	for (Object obj : entry2.getKey()) {
  		List<ItemStack> subinputs = stackHelper.toItemStackList(obj);
   	inputs.add(subinputs);
}
  	
   fluid.add(entry.getKey());
   fluidlist.add(fluid);
  	
  	ItemFluidRecipe newrecipe = new ItemFluidRecipe(inputs,fluidlist,entry2.getValue());
  	recipes.add(newrecipe);
  	}
  }
  return recipes;
  
}
 
Example 5
Source File: L2ISRecipeMaker.java    From Sakura_mod with MIT License 6 votes vote down vote up
public static List<ItemFluidRecipe> getRecipes(IJeiHelpers helpers) {
   IStackHelper stackHelper = helpers.getStackHelper();
   List<ItemFluidRecipe> recipes = new ArrayList<ItemFluidRecipe>();
   for (Entry<FluidStack, Map<Object, ItemStack>> entry : LiquidToItemRecipe.RecipesList.entrySet()) {
	for (Entry<Object, ItemStack> entry2 : entry.getValue().entrySet()) {
   	List<List<ItemStack>> inputs = new ArrayList<List<ItemStack>>();
   	List<ItemStack> main = stackHelper.toItemStackList(entry2.getKey());
   	List<List<FluidStack>> fluidlist=new ArrayList<List<FluidStack>>();
   	List<FluidStack> fluid = new ArrayList<FluidStack>();
   	
   	inputs.add(main);
    fluid.add(entry.getKey());
    fluidlist.add(fluid);
   	
   	ItemFluidRecipe newrecipe = new ItemFluidRecipe(inputs,fluidlist,entry2.getValue());
   	recipes.add(newrecipe);
	}
}
   return recipes;
   
 }
 
Example 6
Source File: AggregatorRecipeMaker.java    From TofuCraftReload with MIT License 5 votes vote down vote up
public static List<SimpleRecipe> getRecipes(IJeiHelpers helpers)
{
  IStackHelper stackHelper = helpers.getStackHelper(); 
  List<SimpleRecipe> recipes = new ArrayList<SimpleRecipe>();

  for (Map.Entry<Object, ItemStack> entry : AggregatorRecipes.recipesList.entrySet()) {
Object input = entry.getKey();
ItemStack output = entry.getValue();
List<ItemStack> inputs = stackHelper.toItemStackList(input);
SimpleRecipe newrecipe = new SimpleRecipe(Collections.singletonList(inputs),output);
  	recipes.add(newrecipe);
     }
  return recipes;
}
 
Example 7
Source File: CompressorRecipeMaker.java    From TofuCraftReload with MIT License 5 votes vote down vote up
public static List<SimpleRecipe> getRecipes(IJeiHelpers helpers)
{
  IStackHelper stackHelper = helpers.getStackHelper(); 
  List<SimpleRecipe> recipes = new ArrayList<SimpleRecipe>();

  for (Map.Entry<Object, ItemStack> entry : CompressorRecipes.recipesList.entrySet()) {
Object input = entry.getKey();
ItemStack output = entry.getValue();
List<ItemStack> inputs = stackHelper.toItemStackList(input);
SimpleRecipe newrecipe = new SimpleRecipe(Collections.singletonList(inputs),output);
  	recipes.add(newrecipe);
     }
  return recipes;
}
 
Example 8
Source File: CrusherRecipeMaker.java    From TofuCraftReload with MIT License 5 votes vote down vote up
public static List<SimpleRecipe> getRecipes(IJeiHelpers helpers)
{
  IStackHelper stackHelper = helpers.getStackHelper(); 
  List<SimpleRecipe> recipes = new ArrayList<SimpleRecipe>();

  for (Map.Entry<Object, ItemStack> entry : CrasherRecipes.recipesList.entrySet()) {
Object input = entry.getKey();
ItemStack output = entry.getValue();
List<ItemStack> inputs = stackHelper.toItemStackList(input);
SimpleRecipe newrecipe = new SimpleRecipe(Collections.singletonList(inputs),output);
  	recipes.add(newrecipe);
     }
  return recipes;
}