Пример #1
0
 public void loadCraftingRecipes(String outputId, Object... results) {
   if (outputId.equals("chisel2.chisel")) {
     for (String name : Carving.chisel.getSortedGroupNames()) {
       ICarvingGroup g = Carving.chisel.getGroup(name);
       if (!g.getVariations().isEmpty()) {
         addCached(getVariationStacks(g));
       }
     }
   } else {
     super.loadCraftingRecipes(outputId, results);
   }
 }
Пример #2
0
 private static List<ItemStack> getVariationStacks(ICarvingGroup g) {
   List<ItemStack> stacks = new ArrayList<ItemStack>();
   for (ICarvingVariation v : g.getVariations()) {
     stacks.add(CarvingUtils.getStack(v));
   }
   String oreName = g.getOreName();
   if (oreName != null) {
     check:
     for (ItemStack ore : OreDictionary.getOres(oreName)) {
       for (ItemStack stack : stacks) {
         if (NEIServerUtils.areStacksSameTypeCrafting(stack, ore)) {
           continue check;
         }
       }
       stacks.add(ore.copy());
     }
   }
   return stacks;
 }