/* * This file ("ReconstructorRecipeWrapper.java") is part of the Actually Additions mod for Minecraft. * 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 * * © 2015-2016 Ellpeck */ package de.ellpeck.actuallyadditions.mod.jei.reconstructor; import de.ellpeck.actuallyadditions.api.booklet.IBookletPage; import de.ellpeck.actuallyadditions.api.recipe.LensConversionRecipe; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.booklet.misc.BookletUtils; import de.ellpeck.actuallyadditions.mod.jei.RecipeWrapperWithButton; import mezz.jei.api.ingredients.IIngredients; import net.minecraft.client.Minecraft; import net.minecraft.item.ItemStack; public class ReconstructorRecipeWrapper extends RecipeWrapperWithButton{ public final LensConversionRecipe theRecipe; public ReconstructorRecipeWrapper(LensConversionRecipe recipe){ this.theRecipe = recipe; } @Override public void getIngredients(IIngredients ingredients){ ingredients.setInput(ItemStack.class, this.theRecipe.inputStack); ingredients.setOutput(ItemStack.class, this.theRecipe.outputStack); } @Override public void drawInfo(Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY){ minecraft.fontRendererObj.drawString(this.theRecipe.energyUse+" RF", 55, 0, 0xFFFFFF, true); super.drawInfo(minecraft, recipeWidth, recipeHeight, mouseX, mouseY); } @Override public int getButtonX(){ return 3; } @Override public int getButtonY(){ return 40; } @Override public IBookletPage getPage(){ return BookletUtils.findFirstPageForStack(new ItemStack(InitBlocks.blockAtomicReconstructor)); } }