Ejemplo 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();
 }
Ejemplo 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();
 }