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


Java AnvilManager类代码示例

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


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

示例1: undo

import com.bioxx.tfc.api.Crafting.AnvilManager; //导入依赖的package包/类
@Override
public void undo() 
{			
	List<AnvilRecipe> AnvilList = AnvilManager.getInstance().getRecipeList();
	
	if(AnvilRecipeHandler.world != null)
	{
		AnvilManager.world = AnvilRecipeHandler.world;
		for (int i = 0; i < AnvilList.size(); i++)
		{
			if (AnvilList.get(i) != null)
			{
				if(input2 != null)
				{
					if (AnvilList.get(i).matches(new AnvilRecipe(input1, input2, plan, anvilReq, result)))
						AnvilList.remove(i--);
				}
				else
					if (AnvilList.get(i).matches(new AnvilRecipe(input1, null, plan, anvilReq, result)))
						AnvilList.remove(i--);
			}
		}
	}
}
 
开发者ID:StrayWolfe,项目名称:TFC-Tweaker,代码行数:25,代码来源:Anvil.java

示例2: apply

import com.bioxx.tfc.api.Crafting.AnvilManager; //导入依赖的package包/类
@Override
public void apply() 
{	
	if(AnvilRecipeHandler.world != null)
	{
		AnvilManager.world = AnvilRecipeHandler.world;
		List<AnvilRecipe> AnvilList = AnvilManager.getInstance().getRecipeList();
		for (int i = 0; i < AnvilList.size(); i++)
		{
			if (AnvilList.get(i) != null)
			{
				if(input2 != null)
				{
					if(AnvilList.get(i).matches(new AnvilRecipe(input1, input2, plan, anvilReq, result)))
						AnvilList.remove(i--);
				}
				else
					if(AnvilList.get(i).matches(new AnvilRecipe(input1, null, plan, anvilReq, result)))
						AnvilList.remove(i--);
			}
		}
	}
}
 
开发者ID:StrayWolfe,项目名称:TFC-Tweaker,代码行数:24,代码来源:Anvil.java

示例3: registerAnvilRecipes

import com.bioxx.tfc.api.Crafting.AnvilManager; //导入依赖的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

示例4: registerAnvilRecipes

import com.bioxx.tfc.api.Crafting.AnvilManager; //导入依赖的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

示例5: registerAnvilRecipes

import com.bioxx.tfc.api.Crafting.AnvilManager; //导入依赖的package包/类
public static void registerAnvilRecipes(AnvilManager anvilManager) {
	anvilManager.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.zincIngot2x), null, "frame", AnvilReq.STONE, new ItemStack(ModItems.pipeFrameZinc, 1)));
	anvilManager.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.leadIngot2x), null, "frame", AnvilReq.COPPER, new ItemStack(ModItems.pipeFrameLead, 1)));
	anvilManager.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.blueSteelIngot2x), null, "frame", AnvilReq.BLUESTEEL, new ItemStack(ModItems.pipeFrameBlueSteel, 1)));
	anvilManager.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.redSteelIngot2x), null, "frame", AnvilReq.REDSTEEL, new ItemStack(ModItems.pipeFrameRedSteel, 1)));
	anvilManager.addRecipe(new AnvilRecipe(new ItemStack(ModItems.electrumIngot2x), null, "frame", AnvilReq.BRONZE, new ItemStack(ModItems.pipeFrameElectrum, 1)));
	anvilManager.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.wroughtIronIngot2x), null, "frame", AnvilReq.WROUGHTIRON, new ItemStack(ModItems.pipeFrameWroughtIron, 1)));
	anvilManager.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.steelIngot2x), null, "frame", AnvilReq.STEEL, new ItemStack(ModItems.pipeFrameSteel, 1)));
	anvilManager.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.blackSteelIngot2x), null, "frame", AnvilReq.BLACKSTEEL, new ItemStack(ModItems.pipeFrameBlackSteel, 1)));
	anvilManager.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.sterlingSilverIngot2x), null, "frame", AnvilReq.BRONZE, new ItemStack(ModItems.pipeFrameSterlingSilver, 1)));
	anvilManager.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.silverIngot2x), null, "frame", AnvilReq.COPPER, new ItemStack(ModItems.pipeFrameSilver, 1)));
	anvilManager.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.bronzeIngot2x), null, "frame", AnvilReq.BRONZE, new ItemStack(ModItems.pipeFrameBronze, 1)));
	anvilManager.addRecipe(new AnvilRecipe(new ItemStack(TFCItems.copperIngot2x), null, "frame", AnvilReq.COPPER, new ItemStack(ModItems.pipeFrameCopper, 1)));
}
 
开发者ID:Shurgent,项目名称:TFCTech,代码行数:15,代码来源:TFCTechBCTransport.java

示例6: registerAnvilRecipes

import com.bioxx.tfc.api.Crafting.AnvilManager; //导入依赖的package包/类
public static void registerAnvilRecipes(AnvilManager anvilManager) {
	
	if (TFCTech.enableBCCore) {
		TFCTechBCCore.registerAnvilRecipes(anvilManager);
	}
	if (TFCTech.enableBCTransport) {
		TFCTechBCTransport.registerAnvilRecipes(anvilManager);
	}

}
 
开发者ID:Shurgent,项目名称:TFCTech,代码行数:11,代码来源:TFCTechBCRecipes.java

示例7: onAnvilCrafting

import com.bioxx.tfc.api.Crafting.AnvilManager; //导入依赖的package包/类
@SubscribeEvent
public void onAnvilCrafting(AnvilCraftEvent e) {
	
	if (e.result == null)
		return;
	
	if (e.result.getItem() instanceof ItemTFCTechForgedItem) {
		TEAnvil anvil = (TEAnvil) e.anvilTE;
		AnvilManager.setDurabilityBuff(e.result, anvil.workRecipe.getSkillMult(anvil.lastWorker));
	}
	
}
 
开发者ID:Shurgent,项目名称:TFCTech,代码行数:13,代码来源:AnvilCraftingHandler.java

示例8: initialiseAnvil

import com.bioxx.tfc.api.Crafting.AnvilManager; //导入依赖的package包/类
public static void initialiseAnvil(World world) {
	AnvilManager anvilManager = AnvilManager.getInstance();
	AnvilManager.world = world;
	
	TFCTech.LOG.info("Registering Anvil Recipes");
	
	registerAnvilPlans(anvilManager);
	registerAnvilRecipes(anvilManager);
	
	TFCTech.LOG.info("Done Registering Anvil Recipes");
}
 
开发者ID:Shurgent,项目名称:TFCTech,代码行数:12,代码来源:ModRecipes.java

示例9: areAnvilRecipesRegistered

import com.bioxx.tfc.api.Crafting.AnvilManager; //导入依赖的package包/类
public static boolean areAnvilRecipesRegistered()
{
    if(!DecorationsMod.isLanternsEnabled)
        return true;
    
    Map map = AnvilManager.getInstance().getPlans();
    
    return map.containsKey(_lanternCorePlan);
}
 
开发者ID:Aleksey-Terzi,项目名称:DecorationsTFC,代码行数:10,代码来源:Recipes.java

示例10: registerAnvilRecipes

import com.bioxx.tfc.api.Crafting.AnvilManager; //导入依赖的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

示例11: newInstance

import com.bioxx.tfc.api.Crafting.AnvilManager; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public TemplateRecipeHandler newInstance()
{
    if (recipeList == null || weldRecipeList == null || hammers == null)
    {
        recipeList = AnvilManager.getInstance().getRecipeList();
        weldRecipeList = AnvilManager.getInstance().getWeldRecipeList();

        hammers = new ItemStack[Recipes.hammers.length];
        for (int i = 0; i < hammers.length; i++)
            hammers[i] = new ItemStack(Recipes.hammers[i]);
    }
    return super.newInstance();
}
 
开发者ID:dries007,项目名称:TFCraft-NEIplugin,代码行数:16,代码来源:AnvilRecipeHandler.java

示例12: registerAnvilRecipes

import com.bioxx.tfc.api.Crafting.AnvilManager; //导入依赖的package包/类
public static void registerAnvilRecipes(AnvilManager anvilManager) {
	anvilManager.addRecipe(new AnvilRecipe(new ItemStack(ModItems.invarIngot2x), null, "wrench", AnvilReq.BRONZE, new ItemStack(BuildCraftCore.wrenchItem, 1)));
}
 
开发者ID:Shurgent,项目名称:TFCTech,代码行数:4,代码来源:TFCTechBCCore.java

示例13: getMaxDamage

import com.bioxx.tfc.api.Crafting.AnvilManager; //导入依赖的package包/类
@Override
public int getMaxDamage(ItemStack stack) {
	return (int) (getMaxDamage() + (getMaxDamage() * AnvilManager.getDurabilityBuff(stack)));
}
 
开发者ID:Shurgent,项目名称:TFCTech,代码行数:5,代码来源:ItemDrawplate.java

示例14: areAnvilRecipesInitialised

import com.bioxx.tfc.api.Crafting.AnvilManager; //导入依赖的package包/类
public static boolean areAnvilRecipesInitialised() {
	Map<String, PlanRecipe> map = AnvilManager.getInstance().getPlans();
	return map.containsKey("groove");
}
 
开发者ID:Shurgent,项目名称:TFCTech,代码行数:5,代码来源:ModRecipes.java

示例15: registerAnvilPlans

import com.bioxx.tfc.api.Crafting.AnvilManager; //导入依赖的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


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