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


Java RuleEnum类代码示例

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


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

示例1: registerAnvilRecipes

import com.bioxx.tfc.api.Enums.RuleEnum; //导入依赖的package包/类
public static void registerAnvilRecipes(World world)
{
    if(!DecorationsMod.isLanternsEnabled)
        return;
    
    AnvilManager manager = AnvilManager.getInstance();
    //We need to set the world ref so that all anvil recipes can generate correctly
    AnvilManager.world = world;
    
    manager.addPlan(_lanternCorePlan, new PlanRecipe(new RuleEnum[] { RuleEnum.HITLAST, RuleEnum.PUNCHNOTLAST, RuleEnum.HITNOTLAST }));
    
    for(int i = 0; i < Constants.Lanterns.length; i++)
    {
        LanternInfo info = Constants.Lanterns[i];
        Item sheetItem = GameRegistry.findItem("terrafirmacraft", info.SheetName);            
        ItemStack lanternCore = new ItemStack(ItemList.LanternCores[i], 1, 0);

        manager.addRecipe(new AnvilRecipe(new ItemStack(sheetItem), null, _lanternCorePlan, false, info.Anvil, lanternCore).addRecipeSkill(Global.SKILL_GENERAL_SMITHING));
    }
}
 
开发者ID:Aleksey-Terzi,项目名称:DecorationsTFC,代码行数:21,代码来源:Recipes.java

示例2: registerAnvilRecipes

import com.bioxx.tfc.api.Enums.RuleEnum; //导入依赖的package包/类
public static void registerAnvilRecipes() {
	String iceSawPlan = "icesaw";
	
	Map map = AnvilManager.getInstance().getPlans();
	if(map.containsKey(iceSawPlan)) {
		return;
	}
	
	if(AnvilManager.world == null) {
		return;
	}
	
	AnvilManager manager = AnvilManager.getInstance();
	manager.addPlan(iceSawPlan, new PlanRecipe(new RuleEnum[]{RuleEnum.HITLAST, RuleEnum.UPSETSECONDFROMLAST, RuleEnum.DRAWNOTLAST}));
	
	manager.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.bismuthBronzeIngot2x), null, iceSawPlan, false, AnvilReq.BISMUTHBRONZE, new ItemStack(BismuthBronzeIceSawHead, 1)).addRecipeSkill(Global.SKILL_TOOLSMITH));
	manager.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.blackBronzeIngot2x), null, iceSawPlan, false, AnvilReq.BLACKBRONZE, new ItemStack(BlackBronzeIceSawHead, 1)).addRecipeSkill(Global.SKILL_TOOLSMITH));
	manager.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.blackSteelIngot2x), null, iceSawPlan, false, AnvilReq.BLACKSTEEL, new ItemStack(BlackSteelIceSawHead, 1)).addRecipeSkill(Global.SKILL_TOOLSMITH));
	manager.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.blueSteelIngot2x), null, iceSawPlan, false, AnvilReq.BLUESTEEL, new ItemStack(BlueSteelIceSawHead, 1)).addRecipeSkill(Global.SKILL_TOOLSMITH));
	manager.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.bronzeIngot2x), null, iceSawPlan, false, AnvilReq.BRONZE, new ItemStack(BronzeIceSawHead, 1)).addRecipeSkill(Global.SKILL_TOOLSMITH));
	manager.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.copperIngot2x), null, iceSawPlan, false, AnvilReq.COPPER, new ItemStack(CopperIceSawHead, 1)).addRecipeSkill(Global.SKILL_TOOLSMITH));
	manager.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.wroughtIronIngot2x), null, iceSawPlan, false, AnvilReq.WROUGHTIRON, new ItemStack(WroughtIronIceSawHead, 1)).addRecipeSkill(Global.SKILL_TOOLSMITH));
	manager.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.redSteelIngot2x), null, iceSawPlan, false, AnvilReq.REDSTEEL, new ItemStack(RedSteelIceSawHead, 1)).addRecipeSkill(Global.SKILL_TOOLSMITH));
	manager.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.steelIngot2x), null, iceSawPlan, false, AnvilReq.STEEL, new ItemStack(SteelIceSawHead, 1)).addRecipeSkill(Global.SKILL_TOOLSMITH));
}
 
开发者ID:Sladki,项目名称:TFC-Cellars-Addon,代码行数:26,代码来源:ModManager.java

示例3: registerAnvilRecipes

import com.bioxx.tfc.api.Enums.RuleEnum; //导入依赖的package包/类
public static void registerAnvilRecipes()
{
    AnvilManager manager = AnvilManager.getInstance();
    
    manager.addPlan(LanternShellPlan, new PlanRecipe(new RuleEnum[] { RuleEnum.HITLAST, RuleEnum.PUNCHANY, RuleEnum.HITANY }));
    
    for(int i = 0; i < Constants.Lanterns.length; i++)
    {
        LanternInfo info = Constants.Lanterns[i];
        Item sheetItem = GameRegistry.findItem("terrafirmacraft", info.SheetName);            
        ItemStack lanternShell = new ItemStack(ItemList.LanternShells[i], 1, 0);

        manager.addRecipe(new AnvilRecipe(new ItemStack(sheetItem), null, LanternShellPlan, false, info.Anvil, lanternShell).addRecipeSkill(Global.SKILL_GENERAL_SMITHING));
    }
}
 
开发者ID:Aleksey-Terzi,项目名称:LanternsTFC,代码行数:16,代码来源:Recipes.java

示例4: apply

import com.bioxx.tfc.api.Enums.RuleEnum; //导入依赖的package包/类
@Override
public void apply() 
{
	AnvilManager.getInstance().addPlan(planName, new PlanRecipe(new RuleEnum[]{lastHit, hit2Last, hit3Last}));
}
 
开发者ID:StrayWolfe,项目名称:TFC-Tweaker,代码行数:6,代码来源:Anvil.java

示例5: undo

import com.bioxx.tfc.api.Enums.RuleEnum; //导入依赖的package包/类
@Override
public void undo() 
{
	AnvilManager.getInstance().addPlan(planName, new PlanRecipe(new RuleEnum[]{lastHit, hit2Last, hit3Last}));
}
 
开发者ID:StrayWolfe,项目名称:TFC-Tweaker,代码行数:6,代码来源:Anvil.java

示例6: getRule

import com.bioxx.tfc.api.Enums.RuleEnum; //导入依赖的package包/类
private static RuleEnum getRule(int ruleRef)
{
	switch(ruleRef)
	{
		case 1: return RuleEnum.ANY;
		case 2: return RuleEnum.BENDANY;
		case 3: return RuleEnum.BENDLAST;
		case 4: return RuleEnum.BENDLASTTWO;
		case 5: return RuleEnum.BENDNOTLAST;
		case 6: return RuleEnum.BENDSECONDFROMLAST;
		case 7: return RuleEnum.BENDTHIRDFROMLAST;
		case 8: return RuleEnum.DRAWANY;
		case 9: return RuleEnum.DRAWLAST;
		case 10: return RuleEnum.DRAWLASTTWO;
		case 11: return RuleEnum.DRAWNOTLAST;
		case 12: return RuleEnum.DRAWSECONDFROMLAST;
		case 13: return RuleEnum.DRAWTHIRDFROMLAST;
		case 14: return RuleEnum.HITANY;
		case 15: return RuleEnum.HITLAST;
		case 16: return RuleEnum.HITLASTTWO;
		case 17: return RuleEnum.HITNOTLAST;
		case 18: return RuleEnum.HITSECONDFROMLAST;
		case 19: return RuleEnum.HITTHIRDFROMLAST;
		case 20: return RuleEnum.PUNCHANY;
		case 21: return RuleEnum.PUNCHLAST;
		case 22: return RuleEnum.PUNCHLASTTWO;
		case 23: return RuleEnum.PUNCHNOTLAST;
		case 24: return RuleEnum.PUNCHSECONDFROMLAST;
		case 25: return RuleEnum.PUNCHTHIRDFROMLAST;
		case 26: return RuleEnum.SHRINKANY;
		case 27: return RuleEnum.SHRINKLAST;
		case 28: return RuleEnum.SHRINKLASTTWO;
		case 29: return RuleEnum.SHRINKNOTLAST;
		case 30: return RuleEnum.SHRINKSECONDFROMLAST;
		case 31: return RuleEnum.SHRINKTHIRDFROMLAST;
		case 32: return RuleEnum.UPSETANY;
		case 33: return RuleEnum.UPSETLAST;
		case 34: return RuleEnum.UPSETLASTTWO;
		case 35: return RuleEnum.UPSETNOTLAST;
		case 36: return RuleEnum.UPSETSECONDFROMLAST;
		case 37: return RuleEnum.UPSETTHIRDFROMLAST;
		default: return RuleEnum.ANY;
	}
}
 
开发者ID:StrayWolfe,项目名称:TFC-Tweaker,代码行数:45,代码来源:Anvil.java

示例7: registerAnvilPlans

import com.bioxx.tfc.api.Enums.RuleEnum; //导入依赖的package包/类
private static void registerAnvilPlans(AnvilManager anvilManager) {
	anvilManager.addPlan("groove", new PlanRecipe(new RuleEnum[] {
			RuleEnum.HITLAST,
			RuleEnum.BENDSECONDFROMLAST,
			RuleEnum.BENDTHIRDFROMLAST
	}));
	anvilManager.addPlan("mount", new PlanRecipe(new RuleEnum[] {
			RuleEnum.BENDLAST,
			RuleEnum.DRAWSECONDFROMLAST,
			RuleEnum.DRAWNOTLAST
	}));
	anvilManager.addPlan("dixie", new PlanRecipe(new RuleEnum[] {
			RuleEnum.BENDLAST,
			RuleEnum.BENDSECONDFROMLAST,
			RuleEnum.BENDTHIRDFROMLAST
	}));
	anvilManager.addPlan("wire", new PlanRecipe(new RuleEnum[] {
			RuleEnum.DRAWLAST,
			RuleEnum.DRAWNOTLAST,
			RuleEnum.ANY
	}));
	anvilManager.addPlan("drawplate", new PlanRecipe(new RuleEnum[] {
			RuleEnum.PUNCHLAST,
			RuleEnum.PUNCHSECONDFROMLAST,
			RuleEnum.HITANY
	}));
	anvilManager.addPlan("tongs", new PlanRecipe(new RuleEnum[] {
			RuleEnum.HITLAST,
			RuleEnum.DRAWSECONDFROMLAST,
			RuleEnum.BENDTHIRDFROMLAST
	}));
	anvilManager.addPlan("oilcan", new PlanRecipe(new RuleEnum[] {
			RuleEnum.BENDLAST,
			RuleEnum.BENDSECONDFROMLAST,
			RuleEnum.BENDTHIRDFROMLAST
	}));
	
	if (TFCTech.enableBCCore) {
		anvilManager.addPlan("wrench", new PlanRecipe(new RuleEnum[] {
				RuleEnum.HITLAST,
				RuleEnum.DRAWSECONDFROMLAST,
				RuleEnum.BENDTHIRDFROMLAST
		}));
	}
	
	if (TFCTech.enableBCTransport) {
		anvilManager.addPlan("frame", new PlanRecipe(new RuleEnum[] {
				RuleEnum.HITLAST,
				RuleEnum.BENDNOTLAST,
				RuleEnum.DRAWNOTLAST
		}));
	}
}
 
开发者ID:Shurgent,项目名称:TFCTech,代码行数:54,代码来源:ModRecipes.java

示例8: PlanRecipe

import com.bioxx.tfc.api.Enums.RuleEnum; //导入依赖的package包/类
public PlanRecipe(RuleEnum[] r, IIcon i)
{
	rules = r;
	icon = i;
}
 
开发者ID:vidaj,项目名称:TFCWaterCompatibility,代码行数:6,代码来源:PlanRecipe.java

示例9: loadAnvilRecipes

import com.bioxx.tfc.api.Enums.RuleEnum; //导入依赖的package包/类
public static void loadAnvilRecipes()
{
	// Anvil Recipes
	AnvilManager anvil = AnvilManager.getInstance();

	// Add plans to anvil manager
	anvil.addPlan("gear", new PlanRecipe(new RuleEnum[] {RuleEnum.PUNCHLAST, RuleEnum.BENDNOTLAST, RuleEnum.DRAWNOTLAST}));
	anvil.addPlan("wrench", new PlanRecipe(new RuleEnum[] {RuleEnum.HITLAST, RuleEnum.DRAWSECONDFROMLAST, RuleEnum.BENDTHIRDFROMLAST}));
	anvil.addPlan("frame", new PlanRecipe(new RuleEnum[] {RuleEnum.HITLAST, RuleEnum.BENDSECONDFROMLAST, RuleEnum.BENDTHIRDFROMLAST}));

	// Instead of Wood
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.bismuthBronzeIngot), null, "gear", AnvilReq.BISMUTHBRONZE, new ItemStack(BCTFCItems.Gears, 1, 0)));
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.blackBronzeIngot), null, "gear", AnvilReq.BLACKBRONZE, new ItemStack(BCTFCItems.Gears, 1, 1)));
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.bronzeIngot), null, "gear", AnvilReq.BRONZE, new ItemStack(BCTFCItems.Gears, 1, 2)));
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.roseGoldIngot), null, "gear", AnvilReq.COPPER, new ItemStack(BCTFCItems.Gears, 1, 3)));
	// Instead of Stone
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.wroughtIronIngot), null, "gear", AnvilReq.WROUGHTIRON, new ItemStack(BCTFCItems.Gears, 1, 4)));
	// Instead of Iron
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.steelIngot), null, "gear", AnvilReq.STEEL, new ItemStack(BCTFCItems.Gears, 1, 5)));
	// Instead of Gold
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.blackSteelIngot), null, "gear", AnvilReq.BLACKSTEEL, new ItemStack(BCTFCItems.Gears, 1, 6)));
	// Instead of Diamond
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.blueSteelIngot), null, "gear", AnvilReq.BLUESTEEL, new ItemStack(BCTFCItems.Gears, 1, 7)));
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.redSteelIngot), null, "gear", AnvilReq.REDSTEEL, new ItemStack(BCTFCItems.Gears, 1, 8)));

	// Wrench
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.copperIngot), null, "wrench", AnvilReq.STONE, new ItemStack(BCTFCItems.CopperWrenchItem, 1)));
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.bronzeIngot), null, "wrench", AnvilReq.COPPER, new ItemStack(BCTFCItems.BronzeWrenchItem, 1)));
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.bismuthBronzeIngot), null, "wrench", AnvilReq.COPPER, new ItemStack(BCTFCItems.BismuthBronzeWrenchItem, 1)));
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.blackBronzeIngot), null, "wrench", AnvilReq.COPPER, new ItemStack(BCTFCItems.BlackBronzeWrenchItem, 1)));
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.wroughtIronIngot), null, "wrench", AnvilReq.BRONZE, new ItemStack(BCTFCItems.WroughtIronWrenchItem, 1)));
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.steelIngot), null, "wrench", AnvilReq.WROUGHTIRON, new ItemStack(BCTFCItems.SteelWrenchItem, 1)));
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.blackSteelIngot), null, "wrench", AnvilReq.STEEL, new ItemStack(BCTFCItems.BlackSteelWrenchItem, 1)));
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.blueSteelIngot), null, "wrench", AnvilReq.BLACKSTEEL, new ItemStack(BCTFCItems.BlueSteelWrenchItem, 1)));
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.redSteelIngot), null, "wrench", AnvilReq.BLACKSTEEL, new ItemStack(BCTFCItems.RedSteelWrenchItem, 1)));

	// Anvil Pipe Frames
	//OLD -> anvil.addRecipe(new MultiItemAnvilRecipe(new ItemStack(TFCItems.TinSheet), new ItemStack(BCTFCItems.Plans, 1, 2),40 + R.nextInt(35),CraftingRuleEnum.HITLAST, CraftingRuleEnum.BENDSECONDFROMLAST, CraftingRuleEnum.BENDTHIRDFROMLAST, false, AnvilReq.STONE, new ItemStack(BCTFCItems.PipeFrames, 8, 0)));
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.tinSheet), null, "frame", AnvilReq.STONE, new ItemStack(BCTFCItems.PipeFrames, 8, 0)));
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.leadSheet), null, "frame", AnvilReq.COPPER, new ItemStack(BCTFCItems.PipeFrames, 8, 1)));
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.bronzeSheet), null, "frame", AnvilReq.COPPER, new ItemStack(BCTFCItems.PipeFrames, 8, 2)));
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.wroughtIronSheet), null, "frame", AnvilReq.BRONZE, new ItemStack(BCTFCItems.PipeFrames, 8, 3)));
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.steelSheet), null, "frame", AnvilReq.WROUGHTIRON, new ItemStack(BCTFCItems.PipeFrames, 8, 4)));
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.blueSteelSheet), null, "frame", AnvilReq.BLACKSTEEL, new ItemStack(BCTFCItems.PipeFrames, 8, 5)));
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.redSteelSheet), null, "frame", AnvilReq.BLACKSTEEL, new ItemStack(BCTFCItems.PipeFrames, 8, 6)));
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.blackBronzeSheet), null, "frame", AnvilReq.COPPER, new ItemStack(BCTFCItems.PipeFrames, 8, 7)));
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.roseGoldSheet), null, "frame", AnvilReq.COPPER, new ItemStack(BCTFCItems.PipeFrames, 8, 8)));
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.blackSteelSheet), null, "frame", AnvilReq.STEEL, new ItemStack(BCTFCItems.PipeFrames, 8, 9)));
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.zincSheet), null, "frame", AnvilReq.STONE, new ItemStack(BCTFCItems.PipeFrames, 8, 10)));
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.copperSheet), null, "frame", AnvilReq.STONE, new ItemStack(BCTFCItems.PipeFrames, 8, 11)));
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.silverSheet), null, "frame", AnvilReq.COPPER, new ItemStack(BCTFCItems.PipeFrames, 8, 12)));
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.platinumSheet), null, "frame", AnvilReq.STEEL, new ItemStack(BCTFCItems.PipeFrames, 8, 13)));
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.sterlingSilverSheet), null, "frame", AnvilReq.COPPER, new ItemStack(BCTFCItems.PipeFrames, 8, 14)));
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.brassSheet), null, "frame", AnvilReq.STONE, new ItemStack(BCTFCItems.PipeFrames, 8, 15)));

	//Buckets
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.zincSheet), null, "bucket", AnvilReq.STONE, new ItemStack(BCTFCItems.Buckets, 1, 1)));
	anvil.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.steelSheet), null, "bucket", AnvilReq.WROUGHTIRON, new ItemStack(BCTFCItems.Buckets, 1, 3)));
}
 
开发者ID:emris,项目名称:BCTFCcrossover,代码行数:60,代码来源:Recipes.java


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