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


Java RecipeMode类代码示例

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


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

示例1: init

import cyano.poweradvantage.RecipeMode; //导入依赖的package包/类
public static void init(){
	if(initDone) return;
	
	Blocks.init();
	Items.init();
	
	
	
	RecipeMode recipeMode = PowerAdvantage.recipeMode;
	OreDictionary.registerOre("stick", net.minecraft.init.Items.STICK);
	OreDictionary.registerOre("blockObsidian", net.minecraft.init.Blocks.OBSIDIAN);
	
	if(recipeMode == RecipeMode.TECH_PROGRESSION){
		GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.steam_governor,1)," t ","srs","btb",'t',"sprocket",'s',"rod",'r',"rod",'b',"ingotBrass"));
		if(SteamAdvantage.MUSKET_ENABLE)GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.blackpowder_musket,1),"fss","w  ",'f',net.minecraft.init.Items.FLINT_AND_STEEL,'s',"ingotSteel",'w',"plankWood"));
		if(SteamAdvantage.MUSKET_ENABLE)GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.blackpowder_musket,1),"ssf","  w",'f',net.minecraft.init.Items.FLINT_AND_STEEL,'s',"ingotSteel",'w',"plankWood"));
	} else if(recipeMode == RecipeMode.APOCALYPTIC){
		GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.steam_governor,1)," t ","srs","btb",'t',"sprocket",'s',"rod",'r',"rod",'b',"ingotBrass"));
		CrusherRecipeRegistry.addNewCrusherRecipe(Items.steam_governor, new ItemStack(cyano.poweradvantage.init.Items.sprocket,2));

		CrusherRecipeRegistry.addNewCrusherRecipe(Blocks.steam_crusher, new ItemStack(Items.steam_governor,2));
		CrusherRecipeRegistry.addNewCrusherRecipe(Blocks.steam_furnace, new ItemStack(Items.steam_governor,2));
		CrusherRecipeRegistry.addNewCrusherRecipe(Blocks.steam_boiler_coal, new ItemStack(Items.steam_governor,2));
		CrusherRecipeRegistry.addNewCrusherRecipe(Blocks.steam_boiler_electric, new ItemStack(Items.steam_governor,2));
		CrusherRecipeRegistry.addNewCrusherRecipe(Blocks.steam_boiler_geothermal, new ItemStack(Items.steam_governor,2));
		CrusherRecipeRegistry.addNewCrusherRecipe(Blocks.steam_drill, new ItemStack(Items.steam_governor,2));
		CrusherRecipeRegistry.addNewCrusherRecipe(Blocks.steam_elevator, new ItemStack(Items.steam_governor,3));
		CrusherRecipeRegistry.addNewCrusherRecipe(Blocks.steam_tank, new ItemStack(Items.steam_governor,1));
	} else {
		// normal
		GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.steam_governor,1)," t ","srs","btb",'t',"nuggetIron",'s',"stick",'r',"stick",'b',"ingotBrass"));
		if(SteamAdvantage.MUSKET_ENABLE)GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.blackpowder_musket,1),"fss","w  ",'f',net.minecraft.init.Items.FLINT_AND_STEEL,'s',"ingotSteel",'w',"plankWood"));
		if(SteamAdvantage.MUSKET_ENABLE)GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.blackpowder_musket,1),"ssf","  w",'f',net.minecraft.init.Items.FLINT_AND_STEEL,'s',"ingotSteel",'w',"plankWood"));
		GameRegistry.addRecipe(steamMachineRecipe(Blocks.steam_drill,net.minecraft.init.Items.DIAMOND_PICKAXE));
	}

	GameRegistry.addRecipe(new ShapedOreRecipe(Items.steam_drill_bit," g "," i ","did",'g',"sprocket",'i',"ingotSteel",'d',"gemDiamond"));
	
	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.steam_pipe,6),"xxx","   ","xxx",'x',"ingotBrass"));
	GameRegistry.addRecipe(steamMachineRecipe(Blocks.steam_crusher,net.minecraft.init.Blocks.PISTON,"blockSteel"));
	GameRegistry.addRecipe(steamMachineRecipe(Blocks.steam_furnace,net.minecraft.init.Blocks.FURNACE));
	GameRegistry.addRecipe(steamMachineRecipe(Blocks.steam_boiler_coal,"conduitSteam"));
	GameRegistry.addRecipe(steamMachineRecipe(Blocks.steam_drill,Items.steam_drill_bit));
	GameRegistry.addRecipe(steamMachineRecipe(Blocks.steam_elevator,net.minecraft.init.Blocks.PISTON,"sprocket"));
	GameRegistry.addRecipe(new ShapedOreRecipe(Blocks.steam_tank,"xgx","xpx","xxx",'x',"plateCopper",'p',"conduitSteam",'g',"governor"));
	GameRegistry.addRecipe(steamMachineRecipe(Blocks.steam_boiler_electric,"wire",net.minecraft.init.Items.BUCKET));
	GameRegistry.addRecipe(steamMachineRecipe(Blocks.steam_boiler_geothermal,"conduitSteam","blockObsidian"));
	
	GameRegistry.addRecipe(new ShapedOreRecipe(Items.blackpowder_cartridge,"L","g","p",'L',"nuggetLead",'g',net.minecraft.init.Items.GUNPOWDER,'p',net.minecraft.init.Items.PAPER));
	
	GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.steam_track),Blocks.steam_pipe, cyano.poweradvantage.init.Blocks.steel_frame));
	
	GameRegistry.addRecipe(new ShapedOreRecipe(Blocks.steam_switch," L ","pfp",'L',net.minecraft.init.Blocks.LEVER,'p',"conduitSteam",'f',"frameSteel"));
	GameRegistry.addRecipe(steamMachineRecipe(Blocks.steam_boiler_oil,net.minecraft.init.Blocks.FURNACE, net.minecraft.init.Items.BUCKET));
	GameRegistry.addRecipe(steamMachineRecipe(Blocks.steam_pump,net.minecraft.init.Blocks.PISTON,net.minecraft.init.Items.BUCKET));
	GameRegistry.addRecipe(steamMachineRecipe(Blocks.steam_still,net.minecraft.init.Items.BUCKET,net.minecraft.init.Items.BUCKET));
	
	
	
	initDone = true;
}
 
开发者ID:cyanobacterium,项目名称:SteamAdvantage,代码行数:62,代码来源:Recipes.java

示例2: init

import cyano.poweradvantage.RecipeMode; //导入依赖的package包/类
public static void init(){
	if(initDone) return;
	Blocks.init();
	Items.init();

	OreDictionary.registerOre("bread", net.minecraft.init.Items.BREAD);
	OreDictionary.registerOre("coal", net.minecraft.init.Items.COAL);
	OreDictionary.registerOre("furnace", net.minecraft.init.Blocks.FURNACE);

	OreDictionary.registerOre("potato", net.minecraft.init.Items.POISONOUS_POTATO);
	OreDictionary.registerOre("potato", net.minecraft.init.Items.POTATO);
	CrusherRecipeRegistry.addNewCrusherRecipe("potato", new ItemStack(Items.starch,1));
	GameRegistry.addSmelting(Items.starch, new ItemStack(Items.bioplastic_ingot,1), 0.1f);

	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.rotator_tool,1),"xx","x*"," x",'x',"ingotIron",'*',"sprocket"));
	
	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.item_conveyor,5),"xxx","ghg","xxx",'x',"plateSteel",'g',"sprocket",'h',net.minecraft.init.Blocks.HOPPER));
	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.item_filter_block,1),"x","y","z",'y',"stone",'x',Blocks.item_conveyor,'z',net.minecraft.init.Blocks.WOODEN_PRESSURE_PLATE));
	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.item_filter_food,1),"x","y","z",'y',"bread",'x',Blocks.item_conveyor,'z',net.minecraft.init.Blocks.WOODEN_PRESSURE_PLATE));
	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.item_filter_fuel,1),"x","y","z",'y',"coal",'x',Blocks.item_conveyor,'z',net.minecraft.init.Blocks.WOODEN_PRESSURE_PLATE));
	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.item_filter_inventory,1),"x","y","z",'y',"chest",'x',Blocks.item_conveyor,'z',net.minecraft.init.Blocks.WOODEN_PRESSURE_PLATE));
	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.item_filter_ore,1),"x","y","z",'y',"ingotGold",'x',Blocks.item_conveyor,'z',net.minecraft.init.Blocks.WOODEN_PRESSURE_PLATE));
	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.item_filter_plant,1),"x","y","z",'y',"treeSapling",'x',Blocks.item_conveyor,'z',net.minecraft.init.Blocks.WOODEN_PRESSURE_PLATE));
	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.item_filter_smelt,1),"x","y","z",'y',"furnace",'x',Blocks.item_conveyor,'z',net.minecraft.init.Blocks.WOODEN_PRESSURE_PLATE));
	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.item_filter_overflow,1),"x","z",'x',Blocks.item_conveyor,'z',net.minecraft.init.Blocks.WOODEN_PRESSURE_PLATE));
	
	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.steel_frame,1),"xxx","x x","xxx",'x',"barsSteel"));

	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.storage_tank,1),"xxx","xpx","xxx",'x',"ingotPlastic",'p',"pipe"));
	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.metal_storage_tank,1),"xxx","xpx","xxx",'x',"ingotSteel",'p',"pipe"));
	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.fluid_drain,1)," x ","w#w","ppp",'x',"bars",'w',"plateSteel",'#',"frameSteel",'p',"pipe"));
	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.fluid_discharge,1),"ppp","w#w"," x ",'x',"bars",'w',"plateSteel",'#',"frameSteel",'p',"pipe"));
	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.still,1),"bpb"," f ",'b',net.minecraft.init.Items.BUCKET,'p',"pipe",'f',net.minecraft.init.Blocks.FURNACE));
	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.fluid_switch,1)," l ","pfp",'l',net.minecraft.init.Blocks.LEVER,'p',"pipe",'f',"frameSteel"));
	
	
	// recipe modes
	if(PowerAdvantage.recipeMode == RecipeMode.NORMAL){
		// normal means easy
		GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.sprocket,4)," x ","x/x"," x ",'x',"ingotSteel",'/',"stickWood"));
		GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.sprocket,4)," x ","x/x"," x ",'x',"ingotSteel",'/',"rod"));

		GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.fluid_pipe,6),"xxx","   ","xxx",'x',"ingotIron"));
		GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.fluid_pipe,6),"xxx","   ","xxx",'x',"ingotCopper"));
		GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.metal_storage_tank,1),"xxx","xpx","xxx",'x',"ingotIron",'p',"pipe"));
	}else if(PowerAdvantage.recipeMode == RecipeMode.TECH_PROGRESSION){
		// make things a little more complicated with tech-progression mode
		BaseMetals.strongHammers = false;
		GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.sprocket,4)," x ","x/x"," x ",'x',"ingotSteel",'/',"rod"));
		if(OreDictionary.getOres("rod").isEmpty()) GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.sprocket,4)," x ","x/x"," x ",'x',"ingotSteel",'/',"nuggetBronze"));
		GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.fluid_pipe,6),"xxx","   ","xxx",'x',"ingotIron"));
	}else if(PowerAdvantage.recipeMode == RecipeMode.APOCALYPTIC){
		// apocalyptic means some things are not craftable, but some stuff can be recycled
		CrusherRecipeRegistry.addNewCrusherRecipe(Blocks.item_conveyor, new ItemStack(cyano.basemetals.init.Blocks.steel_plate,1));
		CrusherRecipeRegistry.addNewCrusherRecipe(Blocks.item_filter_block, new ItemStack(cyano.basemetals.init.Blocks.steel_plate,1));
		CrusherRecipeRegistry.addNewCrusherRecipe(Blocks.item_filter_food, new ItemStack(cyano.basemetals.init.Blocks.steel_plate,1));
		CrusherRecipeRegistry.addNewCrusherRecipe(Blocks.item_filter_fuel, new ItemStack(cyano.basemetals.init.Blocks.steel_plate,1));
		CrusherRecipeRegistry.addNewCrusherRecipe(Blocks.item_filter_inventory, new ItemStack(cyano.basemetals.init.Blocks.steel_plate,1));
		CrusherRecipeRegistry.addNewCrusherRecipe(Blocks.item_filter_ore, new ItemStack(cyano.basemetals.init.Blocks.steel_plate,1));
		CrusherRecipeRegistry.addNewCrusherRecipe(Blocks.item_filter_plant, new ItemStack(cyano.basemetals.init.Blocks.steel_plate,1));
		CrusherRecipeRegistry.addNewCrusherRecipe(Blocks.item_filter_smelt, new ItemStack(cyano.basemetals.init.Blocks.steel_plate,1));
		CrusherRecipeRegistry.addNewCrusherRecipe(Blocks.item_filter_overflow, new ItemStack(cyano.basemetals.init.Blocks.steel_plate,1));

		CrusherRecipeRegistry.addNewCrusherRecipe(Blocks.storage_tank, new ItemStack(Blocks.fluid_pipe,1));
		CrusherRecipeRegistry.addNewCrusherRecipe(Blocks.fluid_discharge, new ItemStack(Blocks.fluid_pipe,2));
		CrusherRecipeRegistry.addNewCrusherRecipe(Blocks.fluid_drain, new ItemStack(Blocks.fluid_pipe,2));

		GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.fluid_pipe,3),"xxx","   ","xxx",'x',"ingotIron"));
		GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.fluid_pipe,3),"xxx","   ","xxx",'x',"ingotCopper"));
		GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.fluid_pipe,3),"xxx","   ","xxx",'x',"ingotLead"));
	}
	
	
	initDone = true;
}
 
开发者ID:cyanobacterium,项目名称:PowerAdvantageAPI,代码行数:76,代码来源:Recipes.java


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