Search in sources :

Example 1 with EntityIngredient

use of com.teamresourceful.resourcefulbees.compat.jei.ingredients.EntityIngredient in project ResourcefulBees by Resourceful-Bees.

the class BeeBreedingCategory method setRecipe.

@Override
public void setRecipe(@NotNull IRecipeLayout iRecipeLayout, @NotNull BeeFamily beeFamily, @NotNull IIngredients ingredients) {
    IGuiIngredientGroup<EntityIngredient> ingredientStacks = iRecipeLayout.getIngredientsGroup(JEICompat.ENTITY_INGREDIENT);
    ingredientStacks.init(0, true, 6, 6);
    ingredientStacks.init(1, true, 60, 6);
    ingredientStacks.init(2, false, 130, 18);
    ingredientStacks.set(0, ingredients.getInputs(JEICompat.ENTITY_INGREDIENT).get(0));
    ingredientStacks.set(1, ingredients.getInputs(JEICompat.ENTITY_INGREDIENT).get(1));
    ingredientStacks.set(2, ingredients.getOutputs(JEICompat.ENTITY_INGREDIENT).get(0));
    IGuiItemStackGroup itemStacks = iRecipeLayout.getItemStacks();
    itemStacks.init(0, true, 6, 32);
    itemStacks.init(1, true, 60, 32);
    if (!ingredients.getInputs(VanillaTypes.ITEM).isEmpty()) {
        itemStacks.set(0, ingredients.getInputs(VanillaTypes.ITEM).get(0));
    }
    if (ingredients.getInputs(VanillaTypes.ITEM).size() > 1) {
        itemStacks.set(1, ingredients.getInputs(VanillaTypes.ITEM).get(1));
    }
}
Also used : EntityIngredient(com.teamresourceful.resourcefulbees.compat.jei.ingredients.EntityIngredient) IGuiItemStackGroup(mezz.jei.api.gui.ingredient.IGuiItemStackGroup)

Example 2 with EntityIngredient

use of com.teamresourceful.resourcefulbees.compat.jei.ingredients.EntityIngredient in project ResourcefulBees by Resourceful-Bees.

the class BlockMutation method setBlockToFluidRecipe.

public void setBlockToFluidRecipe(IRecipeLayout iRecipeLayout, Recipe recipe, IIngredients ingredients) {
    IGuiItemStackGroup itemStacks = iRecipeLayout.getItemStacks();
    IGuiFluidStackGroup fluidStacks = iRecipeLayout.getFluidStacks();
    fluidStacks.init(0, true, 66, 49);
    itemStacks.init(0, false, 15, 57);
    fluidStacks.set(0, ingredients.getOutputs(VanillaTypes.FLUID).get(0));
    itemStacks.set(0, ingredients.getInputs(VanillaTypes.ITEM).get(0));
    addMutationTooltip(recipe, itemStacks, fluidStacks);
    IGuiIngredientGroup<EntityIngredient> ingredientStacks = iRecipeLayout.getIngredientsGroup(JEICompat.ENTITY_INGREDIENT);
    ingredientStacks.init(0, true, 16, 10);
    ingredientStacks.set(0, ingredients.getInputs(JEICompat.ENTITY_INGREDIENT).get(0));
}
Also used : EntityIngredient(com.teamresourceful.resourcefulbees.compat.jei.ingredients.EntityIngredient) IGuiFluidStackGroup(mezz.jei.api.gui.ingredient.IGuiFluidStackGroup) IGuiItemStackGroup(mezz.jei.api.gui.ingredient.IGuiItemStackGroup)

Example 3 with EntityIngredient

use of com.teamresourceful.resourcefulbees.compat.jei.ingredients.EntityIngredient in project ResourcefulBees by Resourceful-Bees.

the class BlockMutation method setFluidToBlockRecipe.

public void setFluidToBlockRecipe(IRecipeLayout iRecipeLayout, Recipe recipe, IIngredients ingredients) {
    IGuiItemStackGroup itemStacks = iRecipeLayout.getItemStacks();
    IGuiFluidStackGroup fluidStacks = iRecipeLayout.getFluidStacks();
    fluidStacks.init(0, false, 16, 58);
    itemStacks.init(0, true, 65, 48);
    fluidStacks.set(0, ingredients.getInputs(VanillaTypes.FLUID).get(0));
    itemStacks.set(0, ingredients.getOutputs(VanillaTypes.ITEM).get(0));
    addMutationTooltip(recipe, itemStacks, fluidStacks);
    IGuiIngredientGroup<EntityIngredient> ingredientStacks = iRecipeLayout.getIngredientsGroup(JEICompat.ENTITY_INGREDIENT);
    ingredientStacks.init(0, true, 16, 10);
    ingredientStacks.set(0, ingredients.getInputs(JEICompat.ENTITY_INGREDIENT).get(0));
}
Also used : EntityIngredient(com.teamresourceful.resourcefulbees.compat.jei.ingredients.EntityIngredient) IGuiFluidStackGroup(mezz.jei.api.gui.ingredient.IGuiFluidStackGroup) IGuiItemStackGroup(mezz.jei.api.gui.ingredient.IGuiItemStackGroup)

Example 4 with EntityIngredient

use of com.teamresourceful.resourcefulbees.compat.jei.ingredients.EntityIngredient in project ResourcefulBees by Resourceful-Bees.

the class BlockToItem method setIngredients.

@Override
public void setIngredients(BlockToItem.@NotNull Recipe recipe, @NotNull IIngredients ingredients) {
    RecipeUtils.setBlockInput(ingredients, null, recipe.blockInput);
    ItemStack itemStack = new ItemStack(recipe.itemOutput.getItem());
    ingredients.setOutput(VanillaTypes.ITEM, itemStack);
    ingredients.setInput(JEICompat.ENTITY_INGREDIENT, new EntityIngredient(recipe.beeType, -45.0f));
}
Also used : EntityIngredient(com.teamresourceful.resourcefulbees.compat.jei.ingredients.EntityIngredient) ItemStack(net.minecraft.world.item.ItemStack)

Example 5 with EntityIngredient

use of com.teamresourceful.resourcefulbees.compat.jei.ingredients.EntityIngredient in project ResourcefulBees by Resourceful-Bees.

the class EntityToEntity method setRecipe.

@Override
public void setRecipe(@NotNull IRecipeLayout iRecipeLayout, @NotNull Recipe recipe, @NotNull IIngredients ingredients) {
    IGuiItemStackGroup itemStacks = iRecipeLayout.getItemStacks();
    if (recipe.output != null) {
        itemStacks.init(0, false, 65, 48);
        itemStacks.set(0, ingredients.getOutputs(VanillaTypes.ITEM).get(0));
        itemStacks.addTooltipCallback(getItemStackTooltipCallback(recipe));
    }
    if (recipe.input != null) {
        itemStacks.init(1, true, 15, 57);
        itemStacks.set(1, ingredients.getInputs(VanillaTypes.ITEM).get(0));
        itemStacks.addTooltipCallback(getItemStackTooltipCallback(recipe));
    }
    IGuiIngredientGroup<EntityIngredient> ingredientStacks = iRecipeLayout.getIngredientsGroup(JEICompat.ENTITY_INGREDIENT);
    ingredientStacks.init(0, true, 16, 10);
    ingredientStacks.set(0, ingredients.getInputs(JEICompat.ENTITY_INGREDIENT).get(0));
}
Also used : EntityIngredient(com.teamresourceful.resourcefulbees.compat.jei.ingredients.EntityIngredient) IGuiItemStackGroup(mezz.jei.api.gui.ingredient.IGuiItemStackGroup)

Aggregations

EntityIngredient (com.teamresourceful.resourcefulbees.compat.jei.ingredients.EntityIngredient)13 IGuiItemStackGroup (mezz.jei.api.gui.ingredient.IGuiItemStackGroup)6 IGuiFluidStackGroup (mezz.jei.api.gui.ingredient.IGuiFluidStackGroup)4 CustomBeeData (com.teamresourceful.resourcefulbees.api.beedata.CustomBeeData)1 EntityIngredientHelper (com.teamresourceful.resourcefulbees.compat.jei.ingredients.EntityIngredientHelper)1 EntityRenderer (com.teamresourceful.resourcefulbees.compat.jei.ingredients.EntityRenderer)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 TextComponent (net.minecraft.network.chat.TextComponent)1 ItemStack (net.minecraft.world.item.ItemStack)1 Fluid (net.minecraft.world.level.material.Fluid)1 FluidStack (net.minecraftforge.fluids.FluidStack)1