Example #1
0
 private void logChocolateRecipes(IPlayer player) {
   for (Map.Entry<Object, ItemStack> entry :
       RecipeRegisterManager.chocoRecipe.getRecipeList().entrySet()) {
     String input = getObjectDeclaration(entry.getKey());
     if (player != null) player.sendChat(input + " ---> " + getItemDeclaration(entry.getValue()));
     MineTweakerAPI.logCommand(
         "mods.amt.Pan.addChocolateRecipe("
             + getItemDeclaration(entry.getValue())
             + ", "
             + input
             + ");");
   }
 }
Example #2
0
 private void logBarrelRecipes(IPlayer player) {
   for (Map.Entry<Fluid, Fluid> entry : BrewingRecipe.instance.recipeMap().entrySet()) {
     if (player != null)
       player.sendChat(
           getItemDeclaration(entry.getKey()) + " ---> " + getItemDeclaration(entry.getValue()));
     MineTweakerAPI.logCommand(
         "mods.amt.Pan.addChocolateRecipe("
             + getItemDeclaration(entry.getValue())
             + ", "
             + getItemDeclaration(entry.getKey())
             + ");");
   }
 }
Example #3
0
 private void logBoth(IPlayer player, String s) {
   MineTweakerAPI.logCommand(s);
   if (player != null) player.sendChat(s);
 }
Example #4
0
 @Override
 public void execute(String[] arguments, IPlayer player) {
   if (arguments.length > 0) {
     if (arguments[0].equalsIgnoreCase("charge")) {
       logBoth(player, "Battery:");
       for (IChargeItem i : ChargeItemManager.chargeItem.getChargeItemList()) {
         String s = getItemDeclaration(i.getItem());
         if (i.returnItem() != null) {
           s += " --> " + getItemDeclaration(i.returnItem());
         }
         s += " --- " + i.getItem().getDisplayName() + " (" + i.chargeAmount() + ")";
         logBoth(player, s);
       }
       logBoth(player, "Ice Maker:");
       for (IChargeIce i : RecipeRegisterManager.iceRecipe.getChargeItemList()) {
         logBoth(
             player,
             getItemDeclaration(i.getItem())
                 + " --- "
                 + i.getItem().getDisplayName()
                 + " ("
                 + i.chargeAmount()
                 + ")");
       }
     } else if (arguments[0].equalsIgnoreCase("choco")) {
       logBoth(player, "Chocolate Recipes:");
       logChocolateRecipes(player);
       /*
       for (Map.Entry<Object, ItemStack> entry: RecipeRegisterManager.chocoRecipe.getRecipeList().entrySet()) {
           String input = "";
           if (entry.getKey() instanceof String) {
               input = "<ore:" + (String) entry.getKey() + ">";
           } else {
               input = getItemDeclaration((ItemStack) entry.getKey());
           }
           player.sendChat(input + " ---> " + getItemDeclaration(entry.getValue()));
           MineTweakerAPI.logCommand("mods.amt.Pan.addChocolateRecipe(" + getItemDeclaration(entry.getValue()) + ", " + input + ");");
       }
       */
     } else if (arguments[0].equalsIgnoreCase("heat")) {
       logBoth(player, "Pan:");
       for (ItemStack i : RecipeRegisterManager.panRecipe.getHeatSourceList()) {
         logBoth(player, getItemDeclaration(i) + " -- " + i.getDisplayName());
       }
       logBoth(player, "Plate:");
       for (ItemStack i : RecipeRegisterManager.plateRecipe.getHeatSourceList()) {
         logBoth(player, getItemDeclaration(i) + " -- " + i.getDisplayName());
       }
     } else if (arguments[0].equalsIgnoreCase("recipes")) {
       MineTweakerAPI.logCommand("Barrel brewing recipes:");
       logBarrelRecipes(null);
       MineTweakerAPI.logCommand("Chocolate fondue recipes:");
       logChocolateRecipes(null);
       MineTweakerAPI.logCommand("Evaporator recipes:");
       logEvaporatorRecipes();
       MineTweakerAPI.logCommand("Ice Maker recipes:");
       logIceRecipes();
       MineTweakerAPI.logCommand("Pan recipes:");
       logPanRecipes();
       MineTweakerAPI.logCommand("Plate recipes:");
       logPlateRecipes();
       MineTweakerAPI.logCommand("Processor recipes:");
       logProcessorRecipes();
       MineTweakerAPI.logCommand("Teamaker recipes:");
       logTeaRecipes();
       player.sendChat("AMT recipes have been written to the MineTweaker log.");
     } else if (arguments[0].equalsIgnoreCase("slag")) {
       for (int l = 1; l <= 5; l++) {
         logBoth(player, "Tier " + l + ":");
         for (ItemStack i : RecipeRegisterManager.slagLoot.getLootList(l)) {
           logBoth(player, getItemDeclaration(i) + " -- " + i.getDisplayName());
         }
       }
     } else {
       player.sendChat("Unknown subcommand: " + arguments[0]);
     }
   } else {
     player.sendChat("Please use a subcommand.");
   }
 }