当前位置: 首页>>代码示例>>Java>>正文


Java IRecipeLayout.getItemStacks方法代码示例

本文整理汇总了Java中mezz.jei.api.gui.IRecipeLayout.getItemStacks方法的典型用法代码示例。如果您正苦于以下问题:Java IRecipeLayout.getItemStacks方法的具体用法?Java IRecipeLayout.getItemStacks怎么用?Java IRecipeLayout.getItemStacks使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mezz.jei.api.gui.IRecipeLayout的用法示例。


在下文中一共展示了IRecipeLayout.getItemStacks方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setRecipe

import mezz.jei.api.gui.IRecipeLayout; //导入方法依赖的package包/类
@Override
public void setRecipe(IRecipeLayout recipeLayout, SimpleSteelJEIWrapper.BlastFurnace recipeWrapper, IIngredients ingredients) {
    IGuiItemStackGroup group = recipeLayout.getItemStacks();
    group.init(TileBlastFurnace.INPUT1, true, 1, 1);
    group.set(TileBlastFurnace.INPUT1, recipeWrapper.recipe.getInputs()[0].getListForJEI());
    if(recipeWrapper.recipe.getInputs()[1] != OreDictStack.EMPTY){
        group.init(TileBlastFurnace.INPUT2, true, 21, 1);
        group.set(TileBlastFurnace.INPUT2, recipeWrapper.recipe.getInputs()[1].getListForJEI());
    }
    if(recipeWrapper.recipe.getInputs()[2] != OreDictStack.EMPTY){
        group.init(TileBlastFurnace.INPUT3, true, 21, 1);
        group.set(TileBlastFurnace.INPUT3, recipeWrapper.recipe.getInputs()[2].getListForJEI());
    }

    group.init(TileBlastFurnace.OUTPUT1, false, 11, 47);
    group.set(TileBlastFurnace.OUTPUT1, recipeWrapper.recipe.getOutputs()[0]);
    if(!recipeWrapper.recipe.getOutputs()[1].isEmpty()){
        group.init(TileBlastFurnace.OUTPUT2, false, 31, 47);
        group.set(TileBlastFurnace.OUTPUT2, recipeWrapper.recipe.getOutputs()[1]);
    }
}
 
开发者ID:canitzp,项目名称:Metalworks,代码行数:22,代码来源:SimpleSteelCategories.java

示例2: setRecipe

import mezz.jei.api.gui.IRecipeLayout; //导入方法依赖的package包/类
@Override
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients)
{
    super.setRecipe(recipeLayout, recipeWrapper, ingredients);

    IGuiItemStackGroup stacks = recipeLayout.getItemStacks();

    List<List<ItemStack>> inputItems = ingredients.getInputs(ItemStack.class);
    List<List<ItemStack>> outputItems = ingredients.getOutputs(ItemStack.class);

    initItems(stacks, true, module.rows * module.columns, 0);
    initItems(stacks, false, 1, module.rows * module.columns);

    if (recipeWrapper instanceof IShapedCraftingRecipeWrapper)
    {
        IShapedCraftingRecipeWrapper wrapper = (IShapedCraftingRecipeWrapper) recipeWrapper;
        craftingGridHelper.setInputs(stacks, inputItems, wrapper.getWidth(), wrapper.getHeight());
    } else
    {
        craftingGridHelper.setInputs(stacks, inputItems);
        recipeLayout.setShapeless();
    }

    stacks.set(module.rows * module.columns, outputItems.get(0));
}
 
开发者ID:cubex2,项目名称:customstuff4,代码行数:26,代码来源:CraftingRecipeCategory.java

示例3: setRecipe

import mezz.jei.api.gui.IRecipeLayout; //导入方法依赖的package包/类
/** Set the recipe layout */
@Override
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper 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);
		}
	}

	if(recipeWrapper instanceof EnchantmentUpgradeWrapper) {
		guiItemStacks.set(ingredients);
	}
}
 
开发者ID:sblectric,项目名称:AdvancedCombat,代码行数:19,代码来源:EnchantmentUpgradeCategory.java

示例4: setRecipe

import mezz.jei.api.gui.IRecipeLayout; //导入方法依赖的package包/类
@Override
public void setRecipe(IRecipeLayout layout, Wrapper wrapper,
        IIngredients ingredients) {
    
    // Mostly copied from JEI's CraftingRecipeCategory
    
    IGuiItemStackGroup stacks = layout.getItemStacks();
    stacks.init(OUTPUT_I, false, OUTPUT_X, OUTPUT_Y);

    for (int y = 0; y < CRAFT_SIZE; ++y) {
        
        for (int x = 0; x < CRAFT_SIZE; ++x) {
            
            int index = INPUT_I + x + (y * CRAFT_SIZE);
            stacks.init(index, true, x * SLOT_SIZE, y * SLOT_SIZE);
        }
    }

    List<List<ItemStack>> inputs = ingredients.getInputs(ItemStack.class);
    List<List<ItemStack>> outputs = ingredients.getOutputs(ItemStack.class);

    this.gridHelper.setInputs(stacks, inputs, wrapper.getWidth(),
            wrapper.getHeight());
    stacks.set(OUTPUT_I, outputs.get(0));
}
 
开发者ID:JayAvery,项目名称:geomastery,代码行数:26,代码来源:GeoCraftingCategory.java

示例5: setRecipe

import mezz.jei.api.gui.IRecipeLayout; //导入方法依赖的package包/类
@Override
public void setRecipe(IRecipeLayout recipeLayout, ItemCraftingRecipeWrapper recipeWrapper, IIngredients ingredients)
{
    IGuiItemStackGroup guiStacks = recipeLayout.getItemStacks();
    int slotId = 0;

    //Key Input Slot
    guiStacks.init(slotId++, true, 5, 19);

    //Ingredients
    for(int i = 0; i < ingredients.getInputs(ItemStack.class).size() - 1; i++)
        guiStacks.init(slotId++, true, 57 + (i * 17 - (i / 3 * 51)), 2 + i / 3 * 17);

    //Output Slot
    guiStacks.init(slotId, false, 143, 19);

    //Set Ingredients
    guiStacks.set(ingredients);
}
 
开发者ID:alxnns1,项目名称:MobHunter,代码行数:20,代码来源:ItemCraftingRecipeCategory.java

示例6: setRecipe

import mezz.jei.api.gui.IRecipeLayout; //导入方法依赖的package包/类
@Override
public void setRecipe(IRecipeLayout layout,
        GeoCraftingCategory.Wrapper wrapper, IIngredients ingredients) {
    
    IGuiItemStackGroup stacks = layout.getItemStacks();        
    stacks.init(OUTPUT_I, false, OUTPUT_X, OUTPUT_Y);
    
    for (int y = 0; y < CRAFT_ROWS; y++) {
        
        for (int x = 0; x < CRAFT_COLS; x++) {
            
            int index = x + (y * CRAFT_COLS);
            stacks.init(index, true, x * SLOT_SIZE, y * SLOT_SIZE);
        }
    }
    
    stacks.set(ingredients);
}
 
开发者ID:JayAvery,项目名称:geomastery,代码行数:19,代码来源:GeoInventoryCategory.java

示例7: setRecipe

import mezz.jei.api.gui.IRecipeLayout; //导入方法依赖的package包/类
@Override
public void setRecipe(final IRecipeLayout recipeLayout, final QBarJEIRecipeWrapper recipeWrapper,
                      final IIngredients ingredients)
{
    final IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();

    slots.forEach(slot -> {
        guiItemStacks.init(this.slots.indexOf(slot), slot.isInput(), slot.getX(), slot.getY());

        int count = this.getSlotCount(slot);
        if (slot.isInput())
        {
            if (ingredients.getInputs(ItemStack.class).size() > count)
                guiItemStacks.set(this.slots.indexOf(slot), ingredients.getInputs(ItemStack.class).get(count));
        }
        else
        {
            if (ingredients.getOutputs(ItemStack.class).size() > count)
                guiItemStacks.set(this.slots.indexOf(slot), ingredients.getOutputs(ItemStack.class).get(count));
        }
    });
}
 
开发者ID:OPMCorp,项目名称:Qbar,代码行数:23,代码来源:QBarJEIRecipeCategory.java

示例8: setRecipe

import mezz.jei.api.gui.IRecipeLayout; //导入方法依赖的package包/类
@Override
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull WinnowingRecipeWrapper recipeWrapper, @Nonnull IIngredients ingredients) {
    IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();

    guiItemStacks.init(inputSlot, true, 4, 21);
    guiItemStacks.init(outputSlot, false, 94, 21);
    guiItemStacks.init(junkSlot, false, 119, 25);

    List<ItemStack> inputs = ingredients.getInputs(ItemStack.class).get(0);
    if (inputs != null) {
        guiItemStacks.set(inputSlot, inputs);
    }
    guiItemStacks.set(outputSlot, ingredients.getOutputs(ItemStack.class).get(0));
    guiItemStacks.set(junkSlot, recipeWrapper.getJunk());
    recipeWrapper.setValues(recipeLayout);
}
 
开发者ID:GirafiStudios,项目名称:Culinary-Cultivation,代码行数:17,代码来源:WinnowingRecipeCategory.java

示例9: setRecipe

import mezz.jei.api.gui.IRecipeLayout; //导入方法依赖的package包/类
@Override
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper) {
	if(!(recipeWrapper instanceof ProcessingRecipeWrapper)) {
		Log.error("RecipeWrapper type unknown: {}", recipeWrapper);
		return;
	}

	ProcessingRecipeWrapper processingWrapper = (ProcessingRecipeWrapper)recipeWrapper;
	IProcessingRecipe recipe = processingWrapper.recipe;

	IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();

	guiItemStacks.init(slotInput, true, 4, 2);
	guiItemStacks.setFromRecipe(slotInput, recipeWrapper.getInputs());

	ChancedOutput[] co = recipe.getOutput();

	for(int i = 0; i < co.length; i++) {
		int r = i % MAX_ROWS;
		int c = i / MAX_ROWS;
		guiItemStacks.init(slotOutput + i, false, 84 + c*18, 4 + r*18);
		guiItemStacks.set(slotOutput + i, co[i].output);
	}
}
 
开发者ID:Team-IO,项目名称:taam,代码行数:25,代码来源:ProcessingCategory.java

示例10: setRecipe

import mezz.jei.api.gui.IRecipeLayout; //导入方法依赖的package包/类
@Override
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull ExchangeRecipe recipeWrapper) {
    IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();

    guiItemStacks.init(craftOutputSlot, true, 74, 12);

    for (int y = 0; y < 4; ++y) {
        for (int x = 0; x < 9; ++x) {
            int index = craftInputSlot1 + x + (y * 9);
            guiItemStacks.init(index, false, 2 + x * 18, 42 + y * 18);
        }
    }

    if (recipeWrapper != null) {
        ExchangeRecipe wrapper = (ExchangeRecipe) recipeWrapper;
        craftingGridHelper.setInputStacks(guiItemStacks, wrapper.getInputs());
        craftingGridHelper.setOutput(guiItemStacks, wrapper.getOutputs());
    } else {
        MoarSigns.logger.error("RecipeWrapper is not a known crafting wrapper type: {}", recipeWrapper);
    }
}
 
开发者ID:GoryMoon,项目名称:MoarSigns,代码行数:22,代码来源:MoarSignsExchangeCategory.java

示例11: setRecipe

import mezz.jei.api.gui.IRecipeLayout; //导入方法依赖的package包/类
@Override
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients) {
	if(recipeWrapper instanceof MaterializationRecipeWrapper){
		IGuiItemStackGroup itemStacks = recipeLayout.getItemStacks();


		itemStacks.init(input1, true, 2, 2);
		itemStacks.init(input2, true, 25, 2);
		itemStacks.init(input3, true, 49, 2);
		itemStacks.init(input4, true, 72, 2);
		itemStacks.init(input5, true, 95, 2);
		itemStacks.init(output, false, 49, 54);

		itemStacks.set(ingredients);
	}
}
 
开发者ID:Shinoow,项目名称:AbyssalCraft,代码行数:17,代码来源:MaterializationRecipeCategory.java

示例12: setRecipe

import mezz.jei.api.gui.IRecipeLayout; //导入方法依赖的package包/类
@Override
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients) {
	if(recipeWrapper instanceof RitualRecipeWrapper){
		IGuiItemStackGroup itemStacks = recipeLayout.getItemStacks();
		int xBoost = 14, yBoost = -25;

		itemStacks.init(pedestal1, true, 58 + xBoost, 30 + yBoost);
		itemStacks.init(pedestal2, true, 84 + xBoost, 40 + yBoost);
		itemStacks.init(pedestal3, true, 94 + xBoost, 66 + yBoost);
		itemStacks.init(pedestal4, true, 84 + xBoost, 92 + yBoost);
		itemStacks.init(pedestal5, true, 58 + xBoost, 103 + yBoost);
		itemStacks.init(pedestal6, true, 32 + xBoost, 92 + yBoost);
		itemStacks.init(pedestal7, true, 22 + xBoost, 66 + yBoost);
		itemStacks.init(pedestal8, true, 32 + xBoost, 40 + yBoost);
		itemStacks.init(sacrifice, true, 58 + xBoost, 66 + yBoost);
		itemStacks.init(necronomicon, true, 0 + xBoost, 133 + yBoost);
		itemStacks.init(reward, false, 58 + xBoost, 139 + yBoost);

		itemStacks.set(ingredients);
	}
}
 
开发者ID:Shinoow,项目名称:AbyssalCraft,代码行数:22,代码来源:RitualRecipeCategory.java

示例13: setRecipe

import mezz.jei.api.gui.IRecipeLayout; //导入方法依赖的package包/类
@Override
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull VatRecipeCategory.VatRecipeWrapper recipeWrapper, @Nonnull IIngredients ingredients) {
  recipeWrapper.setCurrentLayout(recipeLayout);

  final IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
  final IGuiFluidStackGroup fluidStacks = recipeLayout.getFluidStacks();
  IGuiIngredientGroup<EnergyIngredient> group = recipeLayout.getIngredientsGroup(EnergyIngredient.class);

  guiItemStacks.init(0, true, 55 - xOff, 11 - yOff);
  guiItemStacks.init(1, true, 104 - xOff, 11 - yOff);
  fluidStacks.init(2, true, inTankBounds.x, inTankBounds.y, inTankBounds.width, inTankBounds.height, 8000, false, null);
  fluidStacks.init(3, false, outTankBounds.x, outTankBounds.y, outTankBounds.width, outTankBounds.height, 8000, false, null);
  group.init(4, true, EnergyIngredientRenderer.INSTANCE, 76, 58, 50, 10, 0, 0);

  guiItemStacks.set(ingredients);
  fluidStacks.set(ingredients);
  group.set(ingredients);
}
 
开发者ID:SleepyTrousers,项目名称:EnderIO,代码行数:19,代码来源:VatRecipeCategory.java

示例14: setRecipe

import mezz.jei.api.gui.IRecipeLayout; //导入方法依赖的package包/类
@Override
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull EnchanterRecipeCategory.EnchanterRecipeWrapper recipeWrapper,
    @Nonnull IIngredients ingredients) {

  currentRecipe = recipeWrapper;

  IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();

  Map<Integer, ? extends IGuiIngredient<ItemStack>> ings = guiItemStacks.getGuiIngredients();
  currentRecipe.setInfoData(ings);

  guiItemStacks.init(0, true, 16 - xOff - 1, 34 - yOff);
  guiItemStacks.init(1, true, 65 - xOff - 1, 34 - yOff);
  guiItemStacks.init(2, true, 85 - xOff - 1, 34 - yOff);
  guiItemStacks.init(3, false, 144 - xOff - 1, 34 - yOff);

  guiItemStacks.set(ingredients);
}
 
开发者ID:SleepyTrousers,项目名称:EnderIO,代码行数:19,代码来源:EnchanterRecipeCategory.java

示例15: setRecipe

import mezz.jei.api.gui.IRecipeLayout; //导入方法依赖的package包/类
@Override
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull AlloyRecipeCategory.AlloyRecipe recipeWrapper, @Nonnull IIngredients ingredients) {
  IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
  IGuiIngredientGroup<EnergyIngredient> group = recipeLayout.getIngredientsGroup(EnergyIngredient.class);

  guiItemStacks.init(0, true, 53 - xOff, 16 - yOff);
  guiItemStacks.init(1, true, 78 - xOff, 6 - yOff);
  guiItemStacks.init(2, true, 102 - xOff, 16 - yOff);
  guiItemStacks.init(3, false, 78 - xOff, 57 - yOff);
  group.init(4, true, EnergyIngredientRenderer.INSTANCE, 108 - xOff, 55 - yOff, 50, 10, 0, 0);

  List<List<ItemStack>> inputs = ingredients.getInputs(ItemStack.class);
  for (int index = 0; index < inputs.size(); index++) {
    List<ItemStack> input = inputs.get(index);
    if (input != null) {
      guiItemStacks.set(index, input);
    }
  }
  List<List<ItemStack>> outputs = ingredients.getOutputs(ItemStack.class);
  guiItemStacks.set(3, outputs.get(0));

  group.set(ingredients);
}
 
开发者ID:SleepyTrousers,项目名称:EnderIO,代码行数:24,代码来源:AlloyRecipeCategory.java


注:本文中的mezz.jei.api.gui.IRecipeLayout.getItemStacks方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。