本文整理匯總了Java中mezz.jei.api.ingredients.IIngredients類的典型用法代碼示例。如果您正苦於以下問題:Java IIngredients類的具體用法?Java IIngredients怎麽用?Java IIngredients使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
IIngredients類屬於mezz.jei.api.ingredients包,在下文中一共展示了IIngredients類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setRecipe
import mezz.jei.api.ingredients.IIngredients; //導入依賴的package包/類
@Override
public void setRecipe(IRecipeLayout recipeLayout, AlchemicalMixerWrapper recipeWrapper, IIngredients ingredients) {
IGuiFluidStackGroup fluid = recipeLayout.getFluidStacks();
fluid.init(0, true, 26, 3, 16, 16, 16, true, null);
fluid.init(1, true, 26, 45, 16, 16, 16, true, null);
fluid.init(2, true, 66, 3, 16, 16, 16, true, null);
fluid.init(3, true, 66, 45, 16, 16, 16, true, null);
fluid.init(4, false, 89, 16, 16, 32, 16, true, null);
List<List<FluidStack>> inputs = ingredients.getInputs(FluidStack.class);
int size = inputs.size();
for(int i = 0; i < Math.min(size,4); i++)
{
fluid.set(i, inputs.get(i));
}
fluid.set(4, ingredients.getOutputs(FluidStack.class).get(0));
lastRecipe = recipeWrapper.recipe;
}
示例2: setRecipe
import mezz.jei.api.ingredients.IIngredients; //導入依賴的package包/類
@Override
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients) {
if(!(recipeWrapper instanceof JEICauldronWrapper))
return;
JEICauldronWrapper wrapper = (JEICauldronWrapper) recipeWrapper;
catalyst = wrapper.getCatalyst();
if(!catalyst.hasState())
currentFluid = fluidTypes.get(catalyst);
else
currentFluid = null;
name = GlassContainer.getGlassContaining(catalyst);
recipeLayout.getItemStacks().init(0, true, 66, 0);
recipeLayout.getItemStacks().set(0, ingredients.getInputs(ItemStack.class).get(0));
recipeLayout.getItemStacks().init(1, false, 66, 29);
recipeLayout.getItemStacks().set(1, HarshenUtils.toArray(new ItemStack(HarshenItems.RITUAL_STICK)));
recipeLayout.getItemStacks().init(2, false, 130, 46);
recipeLayout.getItemStacks().set(2, ingredients.getOutputs(ItemStack.class).get(0));
}
示例3: setRecipe
import mezz.jei.api.ingredients.IIngredients; //導入依賴的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]);
}
}
示例4: setRecipe
import mezz.jei.api.ingredients.IIngredients; //導入依賴的package包/類
@Override
public void setRecipe(IRecipeLayout layout, WrapperArcaneTransfiguration wrapper, IIngredients ingredients)
{
IGuiIngredientGroup<ItemStack> stacks = layout.getIngredientsGroup(ItemStack.class);
wrapper.setRecipe(layout, ingredients);
stacks.init(0, false, 94, 18);
ItemStack output = ingredients.getOutputs(ItemStack.class).get(0).get(0);
stacks.set(0, output);
List<List<ItemStack>> inputs = ingredients.getInputs(ItemStack.class);
for (int i = 0; i < 9; i++)
{
stacks.init(i + 1, true, (i % 3) * 18, (i / 3) * 18);
stacks.set(i + 1, inputs.get(i));
}
}
示例5: setRecipe
import mezz.jei.api.ingredients.IIngredients; //導入依賴的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));
}
示例6: getIngredients
import mezz.jei.api.ingredients.IIngredients; //導入依賴的package包/類
@Override
public void getIngredients(IIngredients ingredients)
{
List<Object> inputs = Lists.newArrayList();
for (RecipeInput input : recipe.getRecipeInput())
{
if (input.isOreClass())
inputs.add(input.getOreClass().getOreName());
else
inputs.add(input.getStack().getItemStack().copy());
}
ingredients.setInputLists(ItemStack.class, jeiHelpers.getStackHelper().expandRecipeItemStackInputs(inputs));
ingredients.setInputs(FluidStack.class, recipe.getFluidRecipeInput());
ingredients.setOutputs(ItemStack.class, recipe.getRecipeOutput());
ingredients.setOutputs(FluidStack.class, recipe.getFluidRecipeOutput());
}
示例7: getIngredients
import mezz.jei.api.ingredients.IIngredients; //導入依賴的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();
}
}
示例8: setRecipe
import mezz.jei.api.ingredients.IIngredients; //導入依賴的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);
}
}
示例9: getIngredients
import mezz.jei.api.ingredients.IIngredients; //導入依賴的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);
}
}
示例10: getIngredients
import mezz.jei.api.ingredients.IIngredients; //導入依賴的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);
}
示例11: getIngredients
import mezz.jei.api.ingredients.IIngredients; //導入依賴的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);
}
示例12: setRecipe
import mezz.jei.api.ingredients.IIngredients; //導入依賴的package包/類
@Override
public void setRecipe(IRecipeLayout recipeLayout, FusionJEIRecipe recipeWrapper, IIngredients arg2) {
IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
int x = 36;
int y = 36;
guiItemStacks.init(0, false, x+55, y);
guiItemStacks.init(1, true, x, y);
int inputSize = recipeWrapper.recipe.getInputs().size();
double theta = ((Math.PI*2)/inputSize);
for(int i = 0; i < inputSize; i++){
double angle = theta * i;
guiItemStacks.init(2+i, true, x + (int)(30.0D * Math.cos(angle)), y - 1 + (int)(30.0D * Math.sin(angle)));
}
guiItemStacks.set(arg2);
}
示例13: getIngredients
import mezz.jei.api.ingredients.IIngredients; //導入依賴的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);
}
示例14: getIngredients
import mezz.jei.api.ingredients.IIngredients; //導入依賴的package包/類
@Override
public void getIngredients(@Nonnull IIngredients ingredients) {
List<List<ItemStack>> stacks = Lists.newArrayList();
stacks.add(Lists.newArrayList(builder.getMainInput().getMatchingStacks()));
for (Ingredient ingredient : builder.getInputs())
stacks.add(Lists.newArrayList(ingredient.getMatchingStacks()));
if (!isFluidOutput())
for (List<ItemStack> stackList : stacks)
stackList.removeIf(Ingredient.fromStacks(builder.getOutput())::apply);
ingredients.setInputLists(ItemStack.class, stacks);
ingredients.setInput(FluidStack.class, new FluidStack(FluidMana.instance, 1000));
if (isFluidOutput())
ingredients.setOutput(FluidStack.class, builder.getFluidOutput());
else
ingredients.setOutput(ItemStack.class, builder.getOutput());
}
示例15: setRecipe
import mezz.jei.api.ingredients.IIngredients; //導入依賴的package包/類
@Override
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull ManaRecipeJEI recipeWrapper, @Nonnull IIngredients ingredients) {
recipeLayout.getItemStacks().init(0, true, 0, 13);
recipeLayout.getFluidStacks().init(0, true, 30, 14);
recipeLayout.getItemStacks().init(1, true, 11, 46);
recipeLayout.getItemStacks().init(2, true, 29, 46);
recipeLayout.getItemStacks().init(3, true, 47, 46);
recipeLayout.getItemStacks().init(4, true, 11, 64);
recipeLayout.getItemStacks().init(5, true, 29, 64);
recipeLayout.getItemStacks().init(6, true, 47, 64);
recipeLayout.getItemStacks().init(7, true, 11, 82);
recipeLayout.getItemStacks().init(8, true, 29, 82);
recipeLayout.getItemStacks().init(9, true, 47, 82);
if (recipeWrapper.isFluidOutput())
recipeLayout.getFluidStacks().init(1, false, 59, 14);
else
recipeLayout.getItemStacks().init(10, false, 58, 13);
recipeLayout.getItemStacks().set(ingredients);
recipeLayout.getFluidStacks().set(ingredients);
}