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


Java IStackHelper.expandRecipeItemStackInputs方法代码示例

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


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

示例1: getIngredients

import mezz.jei.api.recipe.IStackHelper; //导入方法依赖的package包/类
@Override
public void getIngredients(IIngredients ingredients)
{
    IStackHelper stackHelper = jeiHelpers.getStackHelper();
    ItemStack recipeOutput = recipe.getRecipeOutput();

    try
    {
        List<List<ItemStack>> inputs = stackHelper.expandRecipeItemStackInputs(recipe.getIngredients());
        ingredients.setInputLists(ItemStack.class, inputs);
        ingredients.setOutput(ItemStack.class, recipeOutput);
    } catch (RuntimeException e)
    {
        e.printStackTrace();
    }
}
 
开发者ID:cubex2,项目名称:customstuff4,代码行数:17,代码来源:ShapelessRecipeWrapper.java

示例2: getIngredients

import mezz.jei.api.recipe.IStackHelper; //导入方法依赖的package包/类
@Override
public void getIngredients(IIngredients ingredients) {
	IStackHelper stackHelper = jeiHelpers.getStackHelper();

	List<List<ItemStack>> inputs = stackHelper.expandRecipeItemStackInputs(recipe.getInputs());
	ingredients.setInputLists(ItemStack.class, inputs);
	
	List<List<FluidStack>> fluids = Lists.newArrayList();
	fluids.add(Lists.newArrayList(recipe.getFluidInput()));
	ingredients.setInputLists(FluidStack.class, fluids);

	ItemStack recipeOutput = recipe.getOutput();
	if (recipeOutput != null) {
		ingredients.setOutput(ItemStack.class, recipeOutput);
	}
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:17,代码来源:InfuserRecipeCategory.java

示例3: getIngredients

import mezz.jei.api.recipe.IStackHelper; //导入方法依赖的package包/类
@Override
public void getIngredients(IIngredients ingredients) {
	IStackHelper stackHelper = jeiHelpers.getStackHelper();

	List<List<ItemStack>> inputs = stackHelper.expandRecipeItemStackInputs(recipe.getInputs());
	ingredients.setInputLists(ItemStack.class, inputs);

	List<ItemStack> outputStacks = Lists.newArrayList();
	if(ItemStackTools.isValid(recipe.getMainOutput())){
		outputStacks.add(recipe.getMainOutput());
	}
	if(ItemStackTools.isValid(recipe.getSecondaryOutput())){
		outputStacks.add(recipe.getSecondaryOutput());
	}
	ingredients.setOutputs(ItemStack.class, outputStacks);
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:17,代码来源:GrinderRecipeCategory.java

示例4: getIngredients

import mezz.jei.api.recipe.IStackHelper; //导入方法依赖的package包/类
@Override
public void getIngredients(IIngredients ingredients) {
	IStackHelper stackHelper = jeiHelpers.getStackHelper();

	List<Object> inputList = Lists.newArrayList();
	inputList.add(recipe.getMainInput());
	inputList.addAll(recipe.getInputs());
	List<List<ItemStack>> inputs = stackHelper.expandRecipeItemStackInputs(inputList);
	ingredients.setInputLists(ItemStack.class, inputs);

	List<ItemStack> outputStacks = Lists.newArrayList();
	if(ItemStackTools.isValid(recipe.getOutput())){
		outputStacks.add(recipe.getOutput());
	}
	ingredients.setOutputs(ItemStack.class, outputStacks);
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:17,代码来源:FusionRecipeCategory.java

示例5: getIngredients

import mezz.jei.api.recipe.IStackHelper; //导入方法依赖的package包/类
@Override
public void getIngredients(IIngredients ingredients) {
	IStackHelper stackHelper = jeiHelpers.getStackHelper();

	List<Object> inputList = Lists.newArrayList();
	inputList.add(recipe.getInput());
	List<List<ItemStack>> inputs = stackHelper.expandRecipeItemStackInputs(inputList);
	ingredients.setInputLists(ItemStack.class, inputs);

	List<List<FluidStack>> fluids = Lists.newArrayList();
	fluids.add(Lists.newArrayList(recipe.getFluidInput()));
	ingredients.setInputLists(FluidStack.class, fluids);
	
	List<ItemStack> outputStacks = Lists.newArrayList();
	if(ItemStackTools.isValid(recipe.getOutput())){
		outputStacks.add(recipe.getOutput());
	}
	ingredients.setOutputs(ItemStack.class, outputStacks);
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:20,代码来源:CauldronRecipeCategory.java

示例6: getIngredients

import mezz.jei.api.recipe.IStackHelper; //导入方法依赖的package包/类
@Override
public void getIngredients(IIngredients ingredients) {
	IStackHelper stackHelper = jeiHelpers.getStackHelper();

	List<List<ItemStack>> inputs = stackHelper.expandRecipeItemStackInputs(recipe.getInputs());
	ingredients.setInputLists(ItemStack.class, inputs);

	ItemStack recipeOutput = recipe.getOutput();
	if (recipeOutput != null) {
		ingredients.setOutput(ItemStack.class, recipeOutput);
	}
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:13,代码来源:PressRecipeCategory.java

示例7: getIngredients

import mezz.jei.api.recipe.IStackHelper; //导入方法依赖的package包/类
@Override
public void getIngredients(IIngredients ingredients) {
	IStackHelper stackHelper = jeiHelpers.getStackHelper();

	List<List<ItemStack>> inputs = stackHelper.expandRecipeItemStackInputs(recipe.getInputs());
	ingredients.setInputLists(ItemStack.class, inputs);

	FluidStack recipeOutput = recipe.getOutput();
	if (recipeOutput != null) {
		ingredients.setOutput(FluidStack.class, recipeOutput);
	}
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:13,代码来源:LiquidizerRecipeCategory.java

示例8: getIngredients

import mezz.jei.api.recipe.IStackHelper; //导入方法依赖的package包/类
@Override
public void getIngredients(IIngredients ingredients) {
	IStackHelper stackHelper = jeiHelpers.getStackHelper();
	ItemStack recipeOutput = recipe.getRecipeOutput();

	try {
		List<List<ItemStack>> inputs = stackHelper.expandRecipeItemStackInputs(Arrays.asList(recipe.getInput()));
		ingredients.setInputLists(ItemStack.class, inputs);
		ingredients.setOutput(ItemStack.class, recipeOutput);
	} catch (RuntimeException e) {
		String info = ErrorUtil.getInfoFromBrokenCraftingRecipe(recipe, Arrays.asList(recipe.getInput()), recipeOutput);
		throw new BrokenCraftingRecipeException(info, e);
	}
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:15,代码来源:ShapedOreCrystalRecipeWrapper.java

示例9: getIngredients

import mezz.jei.api.recipe.IStackHelper; //导入方法依赖的package包/类
@Override
public void getIngredients(IIngredients ingredients) {
	IStackHelper stackHelper = jeiHelpers.getStackHelper();

	List<List<ItemStack>> inputs = stackHelper.expandRecipeItemStackInputs(recipe.recipeItems);
	ingredients.setInputLists(ItemStack.class, inputs);

	ItemStack recipeOutput = recipe.getRecipeOutput();
	if (recipeOutput != null) {
		ingredients.setOutput(ItemStack.class, recipeOutput);
	}
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:13,代码来源:ShapelessCrystalRecipeWrapper.java

示例10: getIngredients

import mezz.jei.api.recipe.IStackHelper; //导入方法依赖的package包/类
@Override
public void getIngredients(IIngredients ingredients) {
	IStackHelper stackHelper = jeiHelpers.getStackHelper();
	ItemStack recipeOutput = recipe.getRecipeOutput();

	try {
		List<List<ItemStack>> inputs = stackHelper.expandRecipeItemStackInputs(recipe.getInput());
		ingredients.setInputLists(ItemStack.class, inputs);
		ingredients.setOutput(ItemStack.class, recipeOutput);
	} catch (RuntimeException e) {
		String info = ErrorUtil.getInfoFromBrokenCraftingRecipe(recipe, recipe.getInput(), recipeOutput);
		throw new BrokenCraftingRecipeException(info, e);
	}
}
 
开发者ID:tom5454,项目名称:Toms-Mod,代码行数:15,代码来源:WrenchShapelessRecipeWrapper.java


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