2016-08-03 04:01:47 +02:00
|
|
|
/*
|
2016-10-31 19:05:29 +01:00
|
|
|
* This file ("EmpowererRecipeWrapper.java") is part of the Actually Additions mod for Minecraft.
|
2016-08-03 04:01:47 +02:00
|
|
|
* It is created and owned by Ellpeck and distributed
|
|
|
|
* under the Actually Additions License to be found at
|
|
|
|
* http://ellpeck.de/actaddlicense
|
|
|
|
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
|
|
|
*
|
2017-01-01 16:23:26 +01:00
|
|
|
* © 2015-2017 Ellpeck
|
2016-08-03 04:01:47 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
package de.ellpeck.actuallyadditions.mod.jei.empowerer;
|
|
|
|
|
2018-06-24 02:44:47 +02:00
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
|
|
|
|
2016-11-10 19:50:01 +01:00
|
|
|
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
|
2016-08-03 04:01:47 +02:00
|
|
|
import de.ellpeck.actuallyadditions.api.recipe.EmpowererRecipe;
|
|
|
|
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
2016-11-10 19:50:01 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.booklet.misc.BookletUtils;
|
2016-08-03 04:01:47 +02:00
|
|
|
import de.ellpeck.actuallyadditions.mod.jei.RecipeWrapperWithButton;
|
2016-10-29 10:47:33 +02:00
|
|
|
import mezz.jei.api.ingredients.IIngredients;
|
2018-12-11 07:18:31 +01:00
|
|
|
import mezz.jei.api.ingredients.VanillaTypes;
|
2016-08-03 04:01:47 +02:00
|
|
|
import net.minecraft.item.ItemStack;
|
2016-11-16 20:31:16 +01:00
|
|
|
|
2018-12-11 07:18:31 +01:00
|
|
|
public class EmpowererRecipeWrapper extends RecipeWrapperWithButton {
|
2016-08-03 04:01:47 +02:00
|
|
|
|
|
|
|
public final EmpowererRecipe theRecipe;
|
|
|
|
|
2018-12-11 07:18:31 +01:00
|
|
|
public EmpowererRecipeWrapper(EmpowererRecipe recipe) {
|
2016-08-03 04:01:47 +02:00
|
|
|
this.theRecipe = recipe;
|
|
|
|
}
|
|
|
|
|
2016-10-29 10:47:33 +02:00
|
|
|
@Override
|
2018-12-11 07:18:31 +01:00
|
|
|
public void getIngredients(IIngredients ingredients) {
|
2018-06-24 02:44:47 +02:00
|
|
|
List<ItemStack> inputs = new ArrayList<>();
|
2018-12-11 07:18:31 +01:00
|
|
|
for (ItemStack s : theRecipe.getInput().getMatchingStacks())
|
2018-06-24 02:44:47 +02:00
|
|
|
inputs.add(s);
|
2018-12-11 07:18:31 +01:00
|
|
|
for (ItemStack s : theRecipe.getStandOne().getMatchingStacks())
|
2018-06-24 02:44:47 +02:00
|
|
|
inputs.add(s);
|
2018-12-11 07:18:31 +01:00
|
|
|
for (ItemStack s : theRecipe.getStandTwo().getMatchingStacks())
|
2018-06-24 02:44:47 +02:00
|
|
|
inputs.add(s);
|
2018-12-11 07:18:31 +01:00
|
|
|
for (ItemStack s : theRecipe.getStandThree().getMatchingStacks())
|
2018-06-24 02:44:47 +02:00
|
|
|
inputs.add(s);
|
2018-12-11 07:18:31 +01:00
|
|
|
for (ItemStack s : theRecipe.getStandFour().getMatchingStacks())
|
2018-06-24 02:44:47 +02:00
|
|
|
inputs.add(s);
|
2018-12-11 07:18:31 +01:00
|
|
|
|
|
|
|
ingredients.setInputs(VanillaTypes.ITEM, inputs);
|
|
|
|
ingredients.setOutput(VanillaTypes.ITEM, this.theRecipe.getOutput());
|
2016-08-03 04:01:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2018-12-11 07:18:31 +01:00
|
|
|
public int getButtonX() {
|
2016-08-03 04:01:47 +02:00
|
|
|
return 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2018-12-11 07:18:31 +01:00
|
|
|
public int getButtonY() {
|
2016-08-03 04:01:47 +02:00
|
|
|
return 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2018-12-11 07:18:31 +01:00
|
|
|
public IBookletPage getPage() {
|
2016-11-10 19:50:01 +01:00
|
|
|
return BookletUtils.findFirstPageForStack(new ItemStack(InitBlocks.blockEmpowerer));
|
2016-08-03 04:01:47 +02:00
|
|
|
}
|
|
|
|
}
|