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


Java IGuiFluidStackGroup类代码示例

本文整理汇总了Java中mezz.jei.api.gui.IGuiFluidStackGroup的典型用法代码示例。如果您正苦于以下问题:Java IGuiFluidStackGroup类的具体用法?Java IGuiFluidStackGroup怎么用?Java IGuiFluidStackGroup使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: setRecipe

import mezz.jei.api.gui.IGuiFluidStackGroup; //导入依赖的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;
}
 
开发者ID:DaedalusGame,项目名称:Soot,代码行数:21,代码来源:AlchemicalMixerCategory.java

示例2: drawInfo

import mezz.jei.api.gui.IGuiFluidStackGroup; //导入依赖的package包/类
@Override
public void drawInfo(@Nonnull Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY) {
  // This is early everytime the recipe is drawn, so re-calc based on the active items here
  if (currentLayout != null) {
    final IGuiItemStackGroup guiItemStacks = currentLayout.getItemStacks();
    final IGuiFluidStackGroup fluidStacks = currentLayout.getFluidStacks();
    final ItemStack in0stack = guiItemStacks.getGuiIngredients().get(0).getDisplayedIngredient();
    final ItemStack in1Stack = guiItemStacks.getGuiIngredients().get(1).getDisplayedIngredient();
    final FluidStack fluidIn = fluidStacks.getGuiIngredients().get(2).getDisplayedIngredient();
    if (in0stack != null && fluidIn != null) {
      final RecipeMatch match = ((VatRecipe) recipe).matchRecipe(fluidIn, in0stack, in1Stack != null ? in1Stack : Prep.getEmpty());
      if (match != null) {
        fluidStacks.set(2, match.in);
        fluidStacks.set(3, match.out);
        minecraft.fontRenderer.drawString("x" + match.r0.getMulitplier(), 54 - xOff, 31 - yOff, 0x808080);
        minecraft.fontRenderer.drawString("x" + match.r1.getMulitplier(), 104 - xOff, 31 - yOff, 0x808080);
      }
    }
  }
}
 
开发者ID:SleepyTrousers,项目名称:EnderIO,代码行数:21,代码来源:VatRecipeCategory.java

示例3: setRecipe

import mezz.jei.api.gui.IGuiFluidStackGroup; //导入依赖的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

示例4: setRecipe

import mezz.jei.api.gui.IGuiFluidStackGroup; //导入依赖的package包/类
@Override
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull ZombieGeneratorRecipeWrapper recipeWrapper, @Nonnull IIngredients ingredients) {
  IGuiFluidStackGroup guiFluidStacks = recipeLayout.getFluidStacks();
  IGuiIngredientGroup<EnergyIngredient> group = recipeLayout.getIngredientsGroup(EnergyIngredient.class);

  guiFluidStacks.init(0, true, 80 - xOff, 21 - yOff, 16, 47, tankCapacity, true, null);
  guiFluidStacks.addTooltipCallback(new ITooltipCallback<FluidStack>() {

    @Override
    public void onTooltip(int slotIndex, boolean input, @Nonnull FluidStack ingredient, @Nonnull List<String> tooltip) {
      if (slotIndex != 0)
        return;
      tooltip.add(Lang.GUI_ZOMBGEN_MINREQ.get(LangFluid.MB(Math.round(ZombieGenConfig.minimumTankLevel.get() * tankCapacity))));
    }
  });

  group.init(1, false, EnergyIngredientRenderer.INSTANCE, 75, 3, 40, 10, 0, 0);

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

示例5: setRecipe

import mezz.jei.api.gui.IGuiFluidStackGroup; //导入依赖的package包/类
@Override
public void setRecipe(IRecipeLayout recipeLayout, SludgeRefinerRecipeWrapper recipeWrapper, IIngredients ingredients) {
    IGuiFluidStackGroup guiFluidStackGroup = recipeLayout.getFluidStacks();

    guiFluidStackGroup.init(0, true, 5, 1, 12, 48, 8000, false, tankOverlay);

    IGuiItemStackGroup guiItemStackGroup = recipeLayout.getItemStacks();

    guiItemStackGroup.init(1, false, 59, 17);
    guiFluidStackGroup.set(0, ingredients.getInputs(FluidStack.class).get(0));
    guiItemStackGroup.set(1, ingredients.getOutputs(ItemStack.class).get(0));
}
 
开发者ID:Buuz135,项目名称:Industrial-Foregoing,代码行数:13,代码来源:SludgeRefinerRecipeCategory.java

示例6: setRecipe

import mezz.jei.api.gui.IGuiFluidStackGroup; //导入依赖的package包/类
@Override
public void setRecipe(IRecipeLayout recipeLayout, ReactorRecipeWrapper recipeWrapper, IIngredients ingredients) {
    IGuiItemStackGroup guiItemStackGroup = recipeLayout.getItemStacks();
    guiItemStackGroup.init(0, true, 0, 16);

    IGuiFluidStackGroup guiFluidStackGroup = recipeLayout.getFluidStacks();
    guiFluidStackGroup.init(1, false, 57, 1, 12, 48, 200, false, tankOverlay);

    guiItemStackGroup.set(0, ingredients.getInputs(ItemStack.class).get(0));
    guiFluidStackGroup.set(1, ingredients.getOutputs(FluidStack.class).get(0));
}
 
开发者ID:Buuz135,项目名称:Industrial-Foregoing,代码行数:12,代码来源:ReactorRecipeCategory.java

示例7: setRecipeItems

import mezz.jei.api.gui.IGuiFluidStackGroup; //导入依赖的package包/类
public static void setRecipeItems(@Nonnull IRecipeLayout recipeLayout, @Nonnull IIngredients ingredients, @Nullable int[] itemInputSlots, @Nullable int[] itemOutputSlots, @Nullable int[] fluidInputSlots, @Nullable int[] fluidOutputSlots) {
	IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
	IGuiFluidStackGroup guiFluidStacks = recipeLayout.getFluidStacks();

	if (itemInputSlots != null) {
		List<List<ItemStack>> inputs = ingredients.getInputs(ItemStack.class);
		for (int i = 0; i < inputs.size() && i < itemInputSlots.length; i++) {
			int inputSlot = itemInputSlots[i];
			guiItemStacks.set(inputSlot, inputs.get(i));
		}
	}

	if (itemOutputSlots != null) {
		List<List<ItemStack>> outputs = ingredients.getOutputs(ItemStack.class);
		for (int i = 0; i < outputs.size() && i < itemOutputSlots.length; i++) {
			int outputSlot = itemOutputSlots[i];
			guiItemStacks.set(outputSlot, outputs.get(i));
		}
	}

	if (fluidInputSlots != null) {
		List<List<FluidStack>> fluidInputs = ingredients.getInputs(FluidStack.class);
		for (int i = 0; i < fluidInputs.size() && i < fluidInputSlots.length; i++) {
			int inputTank = fluidInputSlots[i];
			guiFluidStacks.set(inputTank, fluidInputs.get(i));
		}
	}

	if (fluidOutputSlots != null) {
		List<List<FluidStack>> fluidOutputs = ingredients.getOutputs(FluidStack.class);
		for (int i = 0; i < fluidOutputs.size() && i < fluidOutputSlots.length; i++) {
			int outputTank = fluidOutputSlots[i];
			guiFluidStacks.set(outputTank, fluidOutputs.get(i));
		}
	}
}
 
开发者ID:p455w0rd,项目名称:EndermanEvolution,代码行数:37,代码来源:JEI.java

示例8: initFluids

import mezz.jei.api.gui.IGuiFluidStackGroup; //导入依赖的package包/类
protected void initFluids(IGuiFluidStackGroup fluids, boolean input, String[] tanks, int startSlot)
{
    for (int i = 0; i < tanks.length; i++)
    {
        TileEntityModuleTank.Supplier tank = findTank(tanks[i]);
        FluidDisplay display = findFluidDisplay(tanks[i]);
        if (tank != null && display != null)
            fluids.init(startSlot + i, input, display.x - recipe.bgX, display.y - recipe.bgY, display.width, display.height, tank.capacity, false, null);
    }
}
 
开发者ID:cubex2,项目名称:customstuff4,代码行数:11,代码来源:BaseRecipeCategory.java

示例9: setRecipe

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

    IGuiItemStackGroup stacks = recipeLayout.getItemStacks();
    IGuiFluidStackGroup fluids = recipeLayout.getFluidStacks();

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

    initItems(stacks, true, module.inputSlots, 0);
    initItems(stacks, false, module.outputSlots, module.inputSlots);

    initFluids(fluids, true, module.inputTanks, 0);
    initFluids(fluids, false, module.outputTanks, module.inputTanks.length);

    for (int i = 0; i < inputItems.size(); i++)
    {
        stacks.set(i, inputItems.get(i));
    }

    for (int i = 0; i < outputItems.size(); i++)
    {
        stacks.set(module.inputSlots + i, outputItems.get(i));
    }

    for (int i = 0; i < inputFluids.size(); i++)
    {
        fluids.set(i, inputFluids.get(i));
    }

    for (int i = 0; i < outputFluids.size(); i++)
    {
        fluids.set(module.inputTanks.length + i, outputFluids.get(i));
    }
}
 
开发者ID:cubex2,项目名称:customstuff4,代码行数:40,代码来源:MachineRecipeCategory.java

示例10: setRecipe

import mezz.jei.api.gui.IGuiFluidStackGroup; //导入依赖的package包/类
@Override
public void setRecipe(IRecipeLayout recipeLayout, SmeltingRecipeWrapper recipe, IIngredients ingredients) {
    IGuiItemStackGroup items = recipeLayout.getItemStacks();
    items.init(0, true, 6, 3);

    items.set(ingredients);

    IGuiFluidStackGroup fluids = recipeLayout.getFluidStacks();
    fluids.init(0, false, 31, 3, 18, 38, Material.VALUE_Block, false, null);
    fluids.set(ingredients);

    items.init(2, false, 6, 23);
    items.set(2, new ItemStack(Meltery.MELTERY));

}
 
开发者ID:primetoxinz,项目名称:Meltery,代码行数:16,代码来源:SmeltingRecipeCategory.java

示例11: setRecipe

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

	guiItemStacks.init(0, true, 132 - xOff-1, 34 - yOff-1);
	guiItemStacks.init(1, false, 80 - xOff-1, 34 - yOff-1);
	guiItemStacks.set(ingredients);
	
	IGuiFluidStackGroup guiFluidStacks = recipeLayout.getFluidStacks();
	guiFluidStacks.init(0, true, 33 - xOff-1, 24 - yOff-1, 12, 40, Fluid.BUCKET_VOLUME * 4, true, null);
	guiFluidStacks.set(ingredients);
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:13,代码来源:InfuserRecipeCategory.java

示例12: setRecipe

import mezz.jei.api.gui.IGuiFluidStackGroup; //导入依赖的package包/类
@Override
public void setRecipe(IRecipeLayout recipeLayout, LiquidizerJEIRecipe recipeWrapper, IIngredients ingredients) {
	IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
	guiItemStacks.init(0, true, 56 - xOff-1, 35 - yOff-1);
	guiItemStacks.set(ingredients);
	
	IGuiFluidStackGroup guiFluidStacks = recipeLayout.getFluidStacks();
	guiFluidStacks.init(0, false, 112 - xOff, 23 - yOff, 12, 40, Fluid.BUCKET_VOLUME * 8, true, null);
	guiFluidStacks.set(ingredients);
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:11,代码来源:LiquidizerRecipeCategory.java

示例13: setRecipe

import mezz.jei.api.gui.IGuiFluidStackGroup; //导入依赖的package包/类
@Override
public void setRecipe(IRecipeLayout recipeLayout, CauldronJEIRecipe recipeWrapper, IIngredients arg2) {
	IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
	int x = 36;
	int y = 36;
	
	guiItemStacks.init(0, false, x+30, y);
	
	guiItemStacks.init(1, true, x, y-20);
	guiItemStacks.set(arg2);
	
	IGuiFluidStackGroup guiFluidStacks = recipeLayout.getFluidStacks();
	guiFluidStacks.init(0, true, x, y+5, 16, 16, Fluid.BUCKET_VOLUME, true, null);
	guiFluidStacks.set(arg2);
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:16,代码来源:CauldronRecipeCategory.java

示例14: setRecipe

import mezz.jei.api.gui.IGuiFluidStackGroup; //导入依赖的package包/类
@Override
public void setRecipe(IRecipeLayout recipeLayout, FluxGenRecipeJEI fgr, IIngredients ingredients) {
	if (fgr.inputFluid == null) {
		IGuiItemStackGroup ig = recipeLayout.getItemStacks();
		ig.init(1, true, 46, 20);
		ig.set(1, fgr.inputItem);
	} else {
		IGuiFluidStackGroup fg = recipeLayout.getFluidStacks();
		fg.init(0, true, 1, 1, 16, 56, TileEntityFluxGen.fluidCap, true, null);
		fg.init(1, true, 67, 1, 16, 56, TileEntityFluxGen.fluidCap, true, null);
		fg.set(fgr.slot, fgr.inputFluid);
	}
}
 
开发者ID:Szewek,项目名称:Minecraft-Flux,代码行数:14,代码来源:FluxGenRecipeCategory.java

示例15: setRecipe

import mezz.jei.api.gui.IGuiFluidStackGroup; //导入依赖的package包/类
@SuppressWarnings("null")
@Override
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull TankRecipeWrapper recipeWrapper, @Nonnull IIngredients ingredients) {
  IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
  IGuiFluidStackGroup fluidStacks = recipeLayout.getFluidStacks();

  guiItemStacks.init(0, true, 44 - xOff - 1, 21 - yOff - 1);
  guiItemStacks.init(1, true, 116 - xOff - 1, 21 - yOff - 1);
  guiItemStacks.init(2, false, 44 - xOff - 1, 52 - yOff - 1);
  guiItemStacks.init(3, false, 116 - xOff - 1, 52 - yOff - 1);

  fluidStacks.init(0, false, 80 - xOff, 21 - yOff, 16, 47, 16000, true, null);

  List<List<ItemStack>> itemInputs = ingredients.getInputs(ItemStack.class);
  List<List<ItemStack>> itemOutputs = ingredients.getOutputs(ItemStack.class);
  List<List<FluidStack>> fluidInputs = ingredients.getInputs(FluidStack.class);
  List<ItemStack> inputIngredient = itemInputs.isEmpty() ? null : itemInputs.get(0);
  List<ItemStack> outputIngredient = itemOutputs.isEmpty() ? null : itemOutputs.get(0);
  if (fluidInputs.isEmpty()) {
    guiItemStacks.set(0, inputIngredient);
    guiItemStacks.set(2, outputIngredient);
    fluidStacks.set(0, recipeWrapper.fluidOutput);
  } else {
    guiItemStacks.set(1, inputIngredient);
    guiItemStacks.set(3, outputIngredient);
    fluidStacks.set(0, recipeWrapper.fluidInput);
  }
}
 
开发者ID:SleepyTrousers,项目名称:EnderIO,代码行数:29,代码来源:TankRecipeCategory.java


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