Exemplo n.º 1
0
 @Override
 public ArrayList<PacketEntry> getPacketInformation() {
   ArrayList<PacketEntry> entries = new ArrayList<PacketEntry>();
   String[] recipes = new String[addedRecipes.size()];
   for (int zahl = 0; zahl < recipes.length; zahl++)
     recipes[zahl] =
         StringUtils.ObjectsToString(
             WorkbenchHelper.getRecipeCategoryString(addedRecipes.get(zahl)),
             WorkbenchHelper.RecipeToString((IRecipe) addedRecipes.get(zahl)));
   entries.addAll(ArrayPacketEntry.getPacketArray(recipes));
   return entries;
 }
Exemplo n.º 2
0
 @Override
 public void saveConfig(Configuration config) {
   if (config.getCategory("addshapedore") != null) config.getCategory("addshapedore").clear();
   if (config.getCategory("addshapelessore") != null)
     config.getCategory("addshapelessore").clear();
   for (int zahl = 0; zahl < addedRecipes.size(); zahl++) {
     IRecipe recipeO = (IRecipe) addedRecipes.get(zahl);
     if (recipeO != null)
       config.get(
           "add" + WorkbenchHelper.getRecipeCategoryString(recipeO),
           WorkbenchHelper.RecipeToString(recipeO),
           true);
   }
 }