本文整理汇总了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();
}
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}