本文整理汇总了Java中mezz.jei.api.gui.IRecipeLayout.setShapeless方法的典型用法代码示例。如果您正苦于以下问题:Java IRecipeLayout.setShapeless方法的具体用法?Java IRecipeLayout.setShapeless怎么用?Java IRecipeLayout.setShapeless使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mezz.jei.api.gui.IRecipeLayout
的用法示例。
在下文中一共展示了IRecipeLayout.setShapeless方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setRecipe
import mezz.jei.api.gui.IRecipeLayout; //导入方法依赖的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));
}
示例2: setRecipe
import mezz.jei.api.gui.IRecipeLayout; //导入方法依赖的package包/类
@Override
public void setRecipe(IRecipeLayout recipeLayout, CustomCrafingRecipeJEI recipe, IIngredients ingredients) {
int x = 5;
int y = 4;
List<List<ItemStack>> inputs = recipe.getInputs();
recipeLayout.getItemStacks().init(0, true, x, y);
recipeLayout.getItemStacks().init(1, true, x + 18, y);
recipeLayout.getItemStacks().init(2, true, x + 36, y);
recipeLayout.getItemStacks().init(3, true, x, y + 18);
recipeLayout.getItemStacks().init(4, true, x + 18, y + 18);
recipeLayout.getItemStacks().init(5, true, x + 36, y + 18);
recipeLayout.getItemStacks().init(6, true, x, y + 36);
recipeLayout.getItemStacks().init(7, true, x + 18, y + 36);
recipeLayout.getItemStacks().init(8, true, x + 36, y + 36);
recipeLayout.getItemStacks().init(9, false, x + 94, y + 18);
recipeLayout.getItemStacks().init(10, false, x + 94, y + 45);
for (int i = 0;i < 10;i++)
setSlot(recipeLayout, inputs, i);
recipeLayout.getItemStacks().set(9, recipe.input.getRecipeOutput());
if (recipe.extra != null)
recipeLayout.getItemStacks().set(10, recipe.extra);
if (!recipe.shaped)
recipeLayout.setShapeless();
}
示例3: setRecipe
import mezz.jei.api.gui.IRecipeLayout; //导入方法依赖的package包/类
@Override
public void setRecipe(IRecipeLayout lay, AbstractMagibenchRecipeWrapper wrapper, IIngredients ingredients)
{
if(wrapper instanceof MagibenchShapelessRecipeWrapper)
lay.setShapeless();
IGuiItemStackGroup st = lay.getItemStacks();
MagibenchRegistry.Tier t = PurMag.INSTANCE.getMagibenchRegistry().getTier(wrapper.recipe.getTier());
int index = 0;
st.init(index, false, t.getGuiResultX() - t.getGuiJeiStartX() - 1, t.getGuiResultY() - t.getGuiJeiStartY() - 1);
st.set(index, ingredients.getOutputs(ItemStack.class).get(0));
index++;
List<List<ItemStack>> lst = ingredients.getInputs(ItemStack.class);
for(int y = 0; y < t.getHeight(); y++)
{
for(int x = 0; x < t.getWidth(); x++)
{
st.init(index, true, t.getGuiGridX() - t.getGuiJeiStartX() + 18*x - 1, t.getGuiGridY() - t.getGuiJeiStartY() + 18*y - 1);
int ind = index - 1;
if(lst.size() > ind)
{
st.set(index, lst.get(ind));
}
index++;
}
}
}
示例4: setRecipe
import mezz.jei.api.gui.IRecipeLayout; //导入方法依赖的package包/类
@Override
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients) {
IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
guiItemStacks.init(craftOutputSlot, false, 107, 29);
for (int y = 0; y < 3; ++y) {
for (int x = 0; x < 3; ++x) {
int index = craftInputSlot1 + x + (y * 3);
guiItemStacks.init(index, true, 13 + x * 18, 11 + y * 18);
}
}
if(recipeWrapper instanceof InfuserRecipeWrapper) {
IRecipeWrapper innerWrapper = ((InfuserRecipeWrapper) recipeWrapper).getInner();
if (innerWrapper instanceof ICustomCraftingRecipeWrapper) {
ICustomCraftingRecipeWrapper customWrapper = (ICustomCraftingRecipeWrapper) innerWrapper;
customWrapper.setRecipe(recipeLayout, ingredients);
return;
}
List<List<ItemStack>> inputs = ingredients.getInputs(ItemStack.class);
List<List<ItemStack>> outputs = ingredients.getOutputs(ItemStack.class);
if (innerWrapper instanceof IShapedCraftingRecipeWrapper) {
IShapedCraftingRecipeWrapper wrapper = (IShapedCraftingRecipeWrapper) innerWrapper;
craftingGridHelper.setInputs(guiItemStacks, inputs, wrapper.getWidth(), wrapper.getHeight());
} else {
craftingGridHelper.setInputs(guiItemStacks, inputs);
recipeLayout.setShapeless();
}
guiItemStacks.set(craftOutputSlot, outputs.get(0));
}
}
示例5: setRecipe
import mezz.jei.api.gui.IRecipeLayout; //导入方法依赖的package包/类
@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 ICustomCraftingRecipeWrapper) {
ICustomCraftingRecipeWrapper customWrapper = (ICustomCraftingRecipeWrapper) recipeWrapper;
customWrapper.setRecipe(recipeLayout, ingredients);
return;
}
List<List<ItemStack>> inputs = ingredients.getInputs(ItemStack.class);
List<List<ItemStack>> outputs = ingredients.getOutputs(ItemStack.class);
if (recipeWrapper instanceof IShapedCraftingRecipeWrapper) {
IShapedCraftingRecipeWrapper wrapper = (IShapedCraftingRecipeWrapper) recipeWrapper;
craftingGridHelper.setInputs(guiItemStacks, inputs, wrapper.getWidth(), wrapper.getHeight());
} else {
craftingGridHelper.setInputs(guiItemStacks, inputs);
recipeLayout.setShapeless();
}
guiItemStacks.set(craftOutputSlot, outputs.get(0));
}
示例6: setRecipe
import mezz.jei.api.gui.IRecipeLayout; //导入方法依赖的package包/类
@Override
public void setRecipe(IRecipeLayout layout, IIngredients input)
{
if (recipe.isShapeless())
layout.setShapeless();
}