本文整理汇总了Java中com.bioxx.tfc.api.Crafting.AnvilManager.world方法的典型用法代码示例。如果您正苦于以下问题:Java AnvilManager.world方法的具体用法?Java AnvilManager.world怎么用?Java AnvilManager.world使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.bioxx.tfc.api.Crafting.AnvilManager
的用法示例。
在下文中一共展示了AnvilManager.world方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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--);
}
}
}
}
示例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--);
}
}
}
}
示例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));
}
}
示例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));
}
示例5: 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");
}