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


Java IRecipeInput类代码示例

本文整理汇总了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;未经允许,请勿转载。