本文整理汇总了Java中mezz.jei.api.gui.IGuiFluidStackGroup.set方法的典型用法代码示例。如果您正苦于以下问题:Java IGuiFluidStackGroup.set方法的具体用法?Java IGuiFluidStackGroup.set怎么用?Java IGuiFluidStackGroup.set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mezz.jei.api.gui.IGuiFluidStackGroup
的用法示例。
在下文中一共展示了IGuiFluidStackGroup.set方法的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;
}
示例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);
}
}
}
}
示例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);
}
示例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);
}
示例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));
}
示例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));
}
示例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));
}
}
}
示例8: 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));
}
}
示例9: 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));
}
示例10: 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);
}
示例11: 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);
}
示例12: 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);
}
示例13: 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);
}
}
示例14: 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);
}
}
示例15: setRecipe
import mezz.jei.api.gui.IGuiFluidStackGroup; //导入方法依赖的package包/类
@Override
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull CombustionRecipeWrapper recipeWrapper, @Nonnull IIngredients ingredients) {
IGuiFluidStackGroup fluidStacks = recipeLayout.getFluidStacks();
fluidStacks.init(0, true, 114 - xOff, 21 - yOff, 15, 47, 1000, false, null);
fluidStacks.init(1, true, 48 - xOff, 21 - yOff, 15, 47, 1000, false, null);
fluidStacks.set(ingredients);
IGuiIngredientGroup<EnergyIngredient> group = recipeLayout.getIngredientsGroup(EnergyIngredient.class);
group.init(2, false, EnergyIngredientRenderer.INSTANCE, 37 - xOff, 9 - yOff, 40, 10, 0, 0);
group.init(3, false, EnergyIngredientRenderer.INSTANCE, 54 + 47 - xOff, 9 - yOff, 40, 10, 0, 0);
group.set(ingredients);
}