2016-05-02 17:45:52 +00:00
|
|
|
package WayofTime.bloodmagic.compat.jei.alchemyTable;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
|
|
|
|
2017-01-02 09:18:02 +00:00
|
|
|
import WayofTime.bloodmagic.compat.jei.BloodMagicPlugin;
|
2016-05-02 17:45:52 +00:00
|
|
|
import lombok.Getter;
|
2016-12-13 03:56:36 +00:00
|
|
|
import mezz.jei.api.ingredients.IIngredients;
|
2016-05-02 17:45:52 +00:00
|
|
|
import mezz.jei.api.recipe.BlankRecipeWrapper;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import WayofTime.bloodmagic.api.recipe.AlchemyTableRecipe;
|
|
|
|
import WayofTime.bloodmagic.util.helper.TextHelper;
|
|
|
|
|
|
|
|
public class AlchemyTableRecipeJEI extends BlankRecipeWrapper
|
|
|
|
{
|
|
|
|
@Getter
|
|
|
|
private AlchemyTableRecipe recipe;
|
|
|
|
|
|
|
|
public AlchemyTableRecipeJEI(AlchemyTableRecipe recipe)
|
|
|
|
{
|
|
|
|
this.recipe = recipe;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2016-12-13 03:56:36 +00:00
|
|
|
public void getIngredients(IIngredients ingredients) {
|
2017-01-02 09:18:02 +00:00
|
|
|
List<List<ItemStack>> expanded = BloodMagicPlugin.jeiHelper.getStackHelper().expandRecipeItemStackInputs(recipe.getInput());
|
|
|
|
ingredients.setInputLists(ItemStack.class, expanded);
|
2016-12-13 03:56:36 +00:00
|
|
|
ingredients.setOutput(ItemStack.class, recipe.getRecipeOutput(new ArrayList<ItemStack>()));
|
2016-05-02 17:45:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public List<String> getTooltipStrings(int mouseX, int mouseY)
|
|
|
|
{
|
|
|
|
ArrayList<String> ret = new ArrayList<String>();
|
|
|
|
if (mouseX >= 58 && mouseX <= 78 && mouseY >= 21 && mouseY <= 34)
|
|
|
|
{
|
2017-01-02 09:18:02 +00:00
|
|
|
ret.add(TextHelper.localize("jei.bloodmagic.recipe.lpDrained", recipe.getLpDrained()));
|
|
|
|
ret.add(TextHelper.localize("jei.bloodmagic.recipe.ticksRequired", recipe.getTicksRequired()));
|
2016-05-02 17:45:52 +00:00
|
|
|
}
|
2016-12-13 03:56:36 +00:00
|
|
|
return ret;
|
2016-05-02 17:45:52 +00:00
|
|
|
}
|
|
|
|
}
|