• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java IRecipeInput类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: scan

import ic2.api.recipe.IRecipeInput; //导入依赖的package包/类
@Override
public void scan() {
    Map<IRecipeInput, RecipeOutput> recipeMap = Maps.newHashMap();
    recipeMap.putAll(Recipes.metalformerCutting.getRecipes());
    recipeMap.putAll(Recipes.metalformerExtruding.getRecipes());
    recipeMap.putAll(Recipes.metalformerRolling.getRecipes());

    for (Map.Entry<IRecipeInput, RecipeOutput> entry : recipeMap.entrySet()) {
        IStackWrapper input = IC2ClassHelper.convert(entry.getKey());
        for (ItemStack itemStack : entry.getValue().items) {
            if (input instanceof VanillaStackWrapper) {
                addRecipe(new VanillaStackWrapper(itemStack), (VanillaStackWrapper) input);
            } else if (input instanceof OreStackWrapper) {
                for (ItemStack oreStack : OreDictionary.getOres(((OreStackWrapper) input).getOreTag())) {
                    addRecipe(new VanillaStackWrapper(itemStack), new VanillaStackWrapper(oreStack));
                }
            }
        }
    }
}
 
开发者ID:AgileMods,项目名称:MateriaMuto,代码行数:21,代码来源:IC2MetalFormerScanner.java


示例2: addEntryToMap

import ic2.api.recipe.IRecipeInput; //导入依赖的package包/类
private static void addEntryToMap(Entry<IRecipeInput, RecipeOutput> entry)
{
    List<ItemStack> recipeStackOutputs = entry.getValue().items;
    if (!(recipeStackOutputs.size() > 1))
    {
        ItemStack recipeOutput = recipeStackOutputs.get(0);
        if (recipeOutput != null)
        {
            WrappedStack stackOutput = getWrappedStack(recipeOutput);
            List<ItemStack> recipeStackInputs = entry.getKey().getInputs();
            for (ItemStack recipeInput : recipeStackInputs)
            {
                if (recipeInput != null)
                {
                    recipeInput.stackSize = entry.getKey().getAmount();
                    WrappedStack stackInput = new WrappedStack(recipeInput);
                    Ic2Recipes.put(stackOutput, Arrays.asList(stackInput));
                }
            }
        }
    }
}
 
开发者ID:Dynious,项目名称:EnergyFromMatter,代码行数:23,代码来源:RecipesIC2.java


示例3: processRecipes

import ic2.api.recipe.IRecipeInput; //导入依赖的package包/类
private void processRecipes(final IMachineRecipeManager manager) {
	for (final Entry<IRecipeInput, RecipeOutput> e : manager.getRecipes().entrySet()) {
		final IC2MachineRecipeAdaptor adaptor = new IC2MachineRecipeAdaptor(e);
		final ItemStack input = RecipeDecomposition.getInput(adaptor);
		if (!ItemRegistry.isRecipeIgnored(input)) {
			final List<ItemStack> output = RecipeDecomposition.decompose(adaptor);
			recycler.input(input).useRecipe(output).save();
		}
	}
}
 
开发者ID:OreCruncher,项目名称:ThermalRecycling,代码行数:11,代码来源:ModIndustrialCraft.java


示例4: convert

import ic2.api.recipe.IRecipeInput; //导入依赖的package包/类
public static IStackWrapper convert(IRecipeInput input) {
    if (input instanceof RecipeInputItemStack) {
        return new VanillaStackWrapper(((RecipeInputItemStack) input).input);
    } else if (input instanceof RecipeInputOreDict) {
        return new OreStackWrapper(((RecipeInputOreDict) input).input);
    } else {
        return null;
    }
}
 
开发者ID:AgileMods,项目名称:MateriaMuto,代码行数:10,代码来源:IC2ClassHelper.java


示例5: init

import ic2.api.recipe.IRecipeInput; //导入依赖的package包/类
@Override
public void init(){
    ItemStack advancedCircuit = IC2Items.getItem("advancedCircuit");
    ItemStack glassFibreCable = IC2Items.getItem("glassFiberCableItem");
    ItemStack advancedAlloy = IC2Items.getItem("advancedAlloy");
    ItemStack generator = IC2Items.getItem("generator");

    if(Config.enablePneumaticGeneratorRecipe) GameRegistry.addRecipe(new ItemStack(pneumaticGenerator), "pca", "trg", "pca", 'p', Itemss.printedCircuitBoard, 'c', advancedCircuit, 'a', advancedAlloy, 't', new ItemStack(Blockss.advancedPressureTube, 1, 0), 'r', Itemss.turbineRotor, 'g', glassFibreCable);
    if(Config.enableElectricCompressorRecipe) GameRegistry.addRecipe(new ItemStack(electricCompressor), "acp", "frt", "agp", 'p', Itemss.printedCircuitBoard, 'c', advancedCircuit, 'a', advancedAlloy, 't', new ItemStack(Blockss.advancedPressureTube, 1, 0), 'r', Itemss.turbineRotor, 'f', glassFibreCable, 'g', generator);
    try {
        if(Class.forName("ic2.api.recipe.Recipes") != null && Recipes.class.getField("macerator") != null && IMachineRecipeManager.class.getMethod("addRecipe", IRecipeInput.class, NBTTagCompound.class, ItemStack[].class) != null) {
            if(Config.enableCreeperPlantMaceratorRecipe) {
                Recipes.macerator.addRecipe(new IC2RecipeInput(new ItemStack(Itemss.plasticPlant, 1, ItemPlasticPlants.CREEPER_PLANT_DAMAGE)), null, new ItemStack(Items.gunpowder));
                Recipes.macerator.addRecipe(new IC2RecipeInput(new ItemStack(Itemss.plasticPlant, 1, ItemPlasticPlants.CREEPER_PLANT_DAMAGE + 16)), null, new ItemStack(Items.gunpowder));
            }
            if(Config.enableHeliumPlantMaceratorRecipe) {
                Recipes.macerator.addRecipe(new IC2RecipeInput(new ItemStack(Itemss.plasticPlant, 1, ItemPlasticPlants.HELIUM_PLANT_DAMAGE)), null, new ItemStack(Items.glowstone_dust));
                Recipes.macerator.addRecipe(new IC2RecipeInput(new ItemStack(Itemss.plasticPlant, 1, ItemPlasticPlants.HELIUM_PLANT_DAMAGE + 16)), null, new ItemStack(Items.glowstone_dust));
            }
            if(Config.enableFlyingFlowerExtractorRecipe) {
                Recipes.extractor.addRecipe(new IC2RecipeInput(new ItemStack(Itemss.plasticPlant, 1, ItemPlasticPlants.FLYING_FLOWER_DAMAGE)), null, new ItemStack(Items.feather));
                Recipes.extractor.addRecipe(new IC2RecipeInput(new ItemStack(Itemss.plasticPlant, 1, ItemPlasticPlants.FLYING_FLOWER_DAMAGE + 16)), null, new ItemStack(Items.feather));
            }
            if(Config.enablePropulsionPlantExtractorRecipe) {
                Recipes.extractor.addRecipe(new IC2RecipeInput(new ItemStack(Itemss.plasticPlant, 1, ItemPlasticPlants.PROPULSION_PLANT_DAMAGE)), null, new ItemStack(Items.sugar, 2, 1));
                Recipes.extractor.addRecipe(new IC2RecipeInput(new ItemStack(Itemss.plasticPlant, 1, ItemPlasticPlants.PROPULSION_PLANT_DAMAGE + 16)), null, new ItemStack(Items.sugar, 2, 1));
            }
        }
    } catch(Exception e) {
        System.err.println("[PneumaticCraft] Failed to load IC2's macerator, extractor and compressor recipes!");
        e.printStackTrace();
    }
}
 
开发者ID:MineMaarten,项目名称:PneumaticCraft,代码行数:34,代码来源:IC2.java


示例6: IC2MachineRecipeAdaptor

import ic2.api.recipe.IRecipeInput; //导入依赖的package包/类
public IC2MachineRecipeAdaptor(final Entry<IRecipeInput, RecipeOutput> entry) {
	this(entry.getValue(), entry.getKey());
}
 
开发者ID:OreCruncher,项目名称:ThermalRecycling,代码行数:4,代码来源:IC2MachineRecipeAdaptor.java


示例7: addRecipe

import ic2.api.recipe.IRecipeInput; //导入依赖的package包/类
@Override
public boolean addRecipe(IRecipeInput iRecipeInput, NBTTagCompound nbtTagCompound, boolean b, ItemStack... itemStacks) {
    processList.add(new RecipePart(iRecipeInput.getInputs().get(0), itemStacks[0])); //TODO Implement this
    return true;
}
 
开发者ID:GoodTimeStudio,项目名称:Production-Line,代码行数:6,代码来源:RecipeBase.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java DEREncodedKeyValueResolver类代码示例发布时间:2022-05-22
下一篇:
Java CharFilterFactory类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap