use of mezz.jei.api.gui.IGuiItemStackGroup in project ImmersiveEngineering by BluSunrize.
the class ArcFurnaceRecipeCategory method setRecipe.
@Override
public void setRecipe(IRecipeLayout recipeLayout, ArcFurnaceRecipeWrapper recipeWrapper, IIngredients ingredients) {
IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
int i = 0;
guiItemStacks.init(i++, true, 20, 0);
guiItemStacks.set(0, recipeWrapper.recipeInputs[0]);
for (int j = 0; j < recipeWrapper.recipeInputs.length - 1; j++) if (recipeWrapper.recipeInputs[i] != null) {
guiItemStacks.init(i, true, 12 + j % 2 * 18, 18 + j / 2 * 18);
guiItemStacks.set(i, recipeWrapper.recipeInputs[i++]);
}
int outputSize = recipeWrapper.recipeOutputs.length;
boolean hasSlag = recipeWrapper.getItemOut().size() > outputSize;
for (int j = 0; j < outputSize; j++) {
int x = 122 - (Math.min(outputSize - 1, 2) * 18) + j % 3 * 18;
int y = (outputSize > 3 ? 0 : 18) + (j / 3 * 18);
guiItemStacks.init(i, false, x, y);
guiItemStacks.set(i++, recipeWrapper.recipeOutputs[j]);
}
if (hasSlag) {
guiItemStacks.init(i, false, 122, 36);
guiItemStacks.set(i++, recipeWrapper.getItemOut().get(recipeWrapper.getItemOut().size() - 1));
}
}
use of mezz.jei.api.gui.IGuiItemStackGroup in project ConvenientAdditions by Necr0.
the class RecipeWrapperCustomCrafting method setRecipe.
@Override
public void setRecipe(IRecipeLayout recipeLayout, IIngredients ingredients) {
if (recipe.isShapeless())
recipeLayout.setShapeless();
IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
ConvAddJEIPlugin.craftingGridHelper.setInputs(guiItemStacks, ingredients.getInputs(ItemStack.class));
guiItemStacks.set(0, ingredients.getOutputs(ItemStack.class).get(0));
}
use of mezz.jei.api.gui.IGuiItemStackGroup in project Railcraft by Railcraft.
the class RollingMachineRecipeCategory method setRecipe.
@Override
public void setRecipe(IRecipeLayout recipeLayout, RollingMachineRecipeWrapper recipeWrapper, IIngredients ingredients) {
IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
guiItemStacks.init(craftOutputSlot, false, 94, 18);
for (int y = 0; y < 3; ++y) {
for (int x = 0; x < 3; ++x) {
int index = craftInputSlot1 + x + (y * 3);
guiItemStacks.init(index, true, x * 18, y * 18);
}
}
List<List<ItemStack>> inputs = ingredients.getInputs(ItemStack.class);
List<ItemStack> outputs = ingredients.getOutputs(ItemStack.class);
if (recipeWrapper.isShaped()) {
craftingGridHelper.setInputStacks(guiItemStacks, inputs, recipeWrapper.getWidth(), recipeWrapper.getHeight());
craftingGridHelper.setOutput(guiItemStacks, outputs);
} else {
craftingGridHelper.setInputStacks(guiItemStacks, inputs);
craftingGridHelper.setOutput(guiItemStacks, outputs);
}
}
Aggregations