本文整理汇总了Java中minetweaker.api.minecraft.MineTweakerMC.getItemStacks方法的典型用法代码示例。如果您正苦于以下问题:Java MineTweakerMC.getItemStacks方法的具体用法?Java MineTweakerMC.getItemStacks怎么用?Java MineTweakerMC.getItemStacks使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类minetweaker.api.minecraft.MineTweakerMC
的用法示例。
在下文中一共展示了MineTweakerMC.getItemStacks方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: convertCatalysts
import minetweaker.api.minecraft.MineTweakerMC; //导入方法依赖的package包/类
private static OreRecipeElement[] convertCatalysts(IIngredient[] catalysts)
{
OreRecipeElement[] convertedCatalysts = new OreRecipeElement[catalysts.length];
for(int i = 0; i < catalysts.length; i++)
{
IIngredient ingredient = catalysts[i];
if(ingredient instanceof IOreDictEntry)
{
convertedCatalysts[i] = new OreRecipeElement(((IOreDictEntry) ingredient).getName(), ingredient.getAmount());
}
else if(ingredient instanceof IItemStack)
{
convertedCatalysts[i] = new OreRecipeElement(MineTweakerMC.getItemStack(ingredient));
}
else if (ingredient instanceof IngredientStack)
{
ItemStack[] validItems = MineTweakerMC.getItemStacks(ingredient.getItems());
for(ItemStack stack : validItems)
{
stack.stackSize = ingredient.getAmount();
}
convertedCatalysts[i] = new OreRecipeElement(validItems, ingredient.getAmount());
}
}
return convertedCatalysts;
}
示例2: AddRecipeAction
import minetweaker.api.minecraft.MineTweakerMC; //导入方法依赖的package包/类
public AddRecipeAction(int id, IItemStack output, int energy, IItemStack[] ingredients)
{
this.output = MineTweakerMC.getItemStack(output);
this.energy = energy;
this.ingredients = MineTweakerMC.getItemStacks(ingredients);
this.id = "terrafirmapunktweaks:recipe" + id;
}
示例3: addRecipe
import minetweaker.api.minecraft.MineTweakerMC; //导入方法依赖的package包/类
@ZenMethod
public static void addRecipe(ILiquidStack outputLiquid, int ticks, IItemStack...inputs)
{
ItemStack[] inputStacks = MineTweakerMC.getItemStacks(inputs);
FluidStack outputStack = MineTweakerMC.getLiquidStack(outputLiquid);
MineTweakerAPI.apply(new addSqueezerAction(outputStack, ticks, inputStacks));
}