Exemplo n.º 1
0
 public static void addCrucibleRecipeBookEntryViaXML(
     String id,
     String desc,
     String category,
     CrucibleRecipe ir,
     MathExpression cost,
     int row,
     int col,
     Class root,
     String path) {
   ItemStack out = ir.getRecipeOutput();
   AspectList aspects = new AspectList();
   for (Aspect a : ir.aspects.aspects.keySet()) {
     aspects.add(a, Math.max(1, (int) (cost.evaluate(ir.aspects.getAmount(a)))));
   }
   String name = out.getDisplayName();
   CustomThaumResearch res =
       new CustomThaumResearch(id, category, aspects, col, row, 0, out).setName(name);
   res.setDescription(desc);
   XMLResearch xml = new XMLResearch(id.toLowerCase(Locale.ENGLISH), root, path, ir, 2);
   res.setPages(xml.getPages());
   res.registerResearchItem();
 }
Exemplo n.º 2
0
 /** @param recipe an alchemy crafting recipe. */
 public ResearchPage(CrucibleRecipe recipe) {
   this.type = PageType.CRUCIBLE_CRAFTING;
   this.recipe = recipe;
   this.recipeOutput = recipe.getRecipeOutput();
 }
Exemplo n.º 3
0
  private static void setupResearch() {

    ArrayList<Object> list;
    ItemStack input;
    IRecipe recipe;
    String category = "MAGICBEES";
    ResearchCategories.registerCategory(
        category,
        new ResourceLocation(CommonProxy.DOMAIN, CommonProxy.ITEM_TEXTURE + "beeInfusion.png"),
        new ResourceLocation("thaumcraft", "textures/gui/gui_researchback.png"));

    new ResearchItem(
            "MB_Root",
            category,
            new AspectList(),
            0,
            0,
            0,
            Config.miscResources.getStackForType(ResourceType.RESEARCH_BEEINFUSION))
        .setRound()
        .setStub()
        .setAutoUnlock()
        .setPages(getResearchPage("MB_Root.1"), getResearchPage("MB_Root.2"))
        .registerResearchItem();

    list = new ArrayList<Object>(4);
    list.add(Config.miscResources.getStackForType(ResourceType.LORE_FRAGMENT));
    list.add(Config.miscResources.getStackForType(ResourceType.LORE_FRAGMENT));
    list.add(Config.miscResources.getStackForType(ResourceType.LORE_FRAGMENT));
    list.add(Config.miscResources.getStackForType(ResourceType.LORE_FRAGMENT));
    recipe =
        new ShapelessRecipes(
            new ItemStack(Config.tcMiscResource, 1, MiscResource.KNOWLEDGE_FRAGMENT.ordinal()),
            list);

    new ResearchItem(
            "MB_LoreFragment",
            category,
            new AspectList(),
            0,
            -3,
            1,
            Config.miscResources.getStackForType(ResourceType.LORE_FRAGMENT))
        .setPages(getResearchPage("MB_LoreFragment.1"), new ResearchPage(recipe))
        .setParents("MB_Root")
        .setStub()
        .setAutoUnlock()
        .setRound()
        .registerResearchItem();

    new ResearchItem(
            "MB_Scoop",
            category,
            new AspectList().add(Aspect.TOOL, 1).add(Aspect.MAGIC, 1).add(Aspect.AIR, 1),
            -2,
            -3,
            1,
            new ItemStack(Config.thaumiumScoop))
        .setPages(getResearchPage("MB_Scoop.1"), new ResearchPage((IArcaneRecipe) thaumScoop))
        .setParentsHidden("THAUMIUM")
        .registerResearchItem();

    new ResearchItem(
            "MB_Grafter",
            category,
            new AspectList().add(Aspect.TOOL, 1).add(Aspect.TREE, 1).add(Aspect.GREED, 1),
            -2,
            -1,
            2,
            new ItemStack(Config.thaumiumGrafter))
        .setPages(getResearchPage("MB_Grafter.1"), new ResearchPage((IArcaneRecipe) thaumGrafter))
        .setParents("MB_Scoop")
        .registerResearchItem();

    new ResearchItem(
            "MB_FrameMagic",
            category,
            new AspectList().add(Aspect.TOOL, 1).add(Aspect.ARMOR, 1),
            -2,
            1,
            1,
            new ItemStack(Config.hiveFrameMagic))
        .setPages(getResearchPage("MB_FrameMagic"), new ResearchPage((IArcaneRecipe) frameMagic))
        .registerResearchItem();

    input = new ItemStack(Config.hiveFrameMagic);
    list = new ArrayList<Object>(2);
    list.add(Config.miscResources.getStackForType(ResourceType.ESSENCE_FALSE_LIFE));
    list.add(input);
    recipe = new ShapelessRecipes(new ItemStack(Config.hiveFrameGentle), list);

    new ResearchItem(
            "MB_EssenceLife",
            category,
            new AspectList().add(Aspect.LIFE, 1).add(Aspect.MAGIC, 1),
            2,
            -1,
            1,
            Config.miscResources.getStackForType(ResourceType.ESSENCE_FALSE_LIFE))
        .setPages(
            getResearchPage("MB_EssenceLife.1"),
            new ResearchPage((CrucibleRecipe) essenceLife),
            new ResearchPage(recipe))
        .setParentsHidden("CRUCIBLE")
        .registerResearchItem();

    list = new ArrayList<Object>(2);
    list.add(Config.miscResources.getStackForType(ResourceType.ESSENCE_EVERLASTING_DURABILITY));
    list.add(input);
    recipe = new ShapelessRecipes(new ItemStack(Config.hiveFrameResilient), list);

    new ResearchItem(
            "MB_EssenceArmor",
            category,
            new AspectList().add(Aspect.ARMOR, 1).add(Aspect.MAGIC, 1),
            5,
            0,
            2,
            Config.miscResources.getStackForType(ResourceType.ESSENCE_EVERLASTING_DURABILITY))
        .setPages(
            getResearchPage("MB_EssenceArmor.1"),
            new ResearchPage((CrucibleRecipe) essenceArmor),
            new ResearchPage(recipe))
        .setParents("MB_EssenceLife")
        .registerResearchItem();

    list = new ArrayList<Object>(2);
    list.add(Config.miscResources.getStackForType(ResourceType.ESSENCE_FICKLE_PERMANENCE));
    list.add(input);
    recipe = new ShapelessRecipes(new ItemStack(Config.hiveFrameMetabolic), list);

    new ResearchItem(
            "MB_EssenceUnstable",
            category,
            new AspectList().add(Aspect.ENTROPY, 1).add(Aspect.ORDER, 1),
            3,
            1,
            2,
            Config.miscResources.getStackForType(ResourceType.ESSENCE_FICKLE_PERMANENCE))
        .setPages(
            getResearchPage("MB_EssenceUnstable.1"),
            new ResearchPage((CrucibleRecipe) essenceUnstableA),
            new ResearchPage((CrucibleRecipe) essenceUnstableB),
            new ResearchPage(recipe))
        .setParents("MB_EssenceLife")
        .setConcealed()
        .registerResearchItem();

    list = new ArrayList<Object>(2);
    list.add(Config.miscResources.getStackForType(ResourceType.ESSENCE_SHALLOW_GRAVE));
    list.add(input);
    recipe = new ShapelessRecipes(new ItemStack(Config.hiveFrameNecrotic), list);

    new ResearchItem(
            "MB_EssenceDeath",
            category,
            new AspectList().add(Aspect.DEATH, 1).add(Aspect.MAGIC, 1),
            2,
            3,
            1,
            Config.miscResources.getStackForType(ResourceType.ESSENCE_SHALLOW_GRAVE))
        .setPages(
            getResearchPage("MB_EssenceDeath.1"),
            new ResearchPage((CrucibleRecipe) essenceDeath),
            new ResearchPage(recipe))
        .setParents("MB_EssenceUnstable")
        .setConcealed()
        .registerResearchItem();

    list = new ArrayList<Object>(2);
    list.add(Config.miscResources.getStackForType(ResourceType.ESSENCE_LOST_TIME));
    list.add(input);
    recipe = new ShapelessRecipes(new ItemStack(Config.hiveFrameTemporal), list);

    new ResearchItem(
            "MB_EssenceTime",
            category,
            new AspectList().add((Aspect) aspectTime, 1).add(Aspect.MAGIC, 1),
            0,
            2,
            2,
            Config.miscResources.getStackForType(ResourceType.ESSENCE_LOST_TIME))
        .setPages(
            getResearchPage("MB_EssenceTime.1"),
            new ResearchPage((CrucibleRecipe) essenceTime),
            new ResearchPage(recipe))
        .setParents("MB_EssenceUnstable")
        .setConcealed()
        .registerResearchItem();

    new ResearchItem(
            "MB_DimensionalSingularity",
            category,
            new AspectList()
                .add(Aspect.ELDRITCH, 1)
                .add((Aspect) aspectTime, 1)
                .add(Aspect.VOID, 1),
            -1,
            4,
            3,
            Config.miscResources.getStackForType(ResourceType.DIMENSIONAL_SINGULARITY))
        .setPages(
            getResearchPage("MB_DimensionalSingularity.1"),
            new ResearchPage((InfusionRecipe) singularityA),
            new ResearchPage((InfusionRecipe) singularityB))
        .setParents("MB_FrameMagic", "MB_EssenceTime", "MB_EssenceDeath")
        .setConcealed()
        .setSpecial()
        .registerResearchItem();

    list = new ArrayList<Object>(2);
    list.add(Config.miscResources.getStackForType(ResourceType.ESSENCE_SCORNFUL_OBLIVION));
    list.add(ItemInterface.getItemStack("frameProven"));
    recipe = new ShapelessRecipes(new ItemStack(Config.hiveFrameOblivion), list);

    new ResearchItem(
            "MB_EssenceOblivion",
            category,
            new AspectList().add(Aspect.VOID, 1).add(Aspect.HUNGER, 1).add((Aspect) aspectTime, 1),
            -3,
            3,
            3,
            Config.miscResources.getStackForType(ResourceType.ESSENCE_SCORNFUL_OBLIVION))
        .setPages(
            getResearchPage("MB_EssenceOblivion.1"),
            new ResearchPage((IArcaneRecipe) essenceOblivion),
            new ResearchPage(recipe))
        .setParents("MB_DimensionalSingularity")
        .setConcealed()
        .registerResearchItem();

    new ResearchItem(
            "MB_VisAuraProvider",
            category,
            new AspectList().add(Aspect.MAGIC, 1).add(Aspect.ENERGY, 1).add(Aspect.AURA, 1),
            -5,
            5,
            3,
            new ItemStack(Config.visAuraProvider))
        .setPages(
            getResearchPage("MB_VisAuraProvider.1"),
            new ResearchPage((IArcaneRecipe) visAuraProvider))
        .setParentsHidden("VISPOWER")
        .registerResearchItem();
  }