More Logging rework

This commit is contained in:
Zixxl committed 2015-07-09 11:28:40 +02:00
1 parent ece7dca426
commit 2dd8e910f4
60 files changed
+464 -322

No files matched your search

@@ -8,7 +8,7 @@ import minetweaker.MineTweakerAPI;
import minetweaker.MineTweakerImplementationAPI;
import minetweaker.api.player.IPlayer;
import minetweaker.api.server.ICommandFunction;
import modtweaker2.helpers.InputHelper;
import modtweaker2.helpers.LogHelper;
import modtweaker2.helpers.StringHelper;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.recipe.RecipeElvenTrade;
@@ -39,8 +39,8 @@ public class BotaniaLogger implements ICommandFunction {
if(args.isEmpty() || args.contains("apothecary")) {
for(RecipePetals recipe : BotaniaAPI.petalRecipes) {
MineTweakerAPI.logCommand(String.format("mods.botania.Apothecary.addRecipe(%s, %s);",
InputHelper.getStackDescription(recipe.getOutput()),
InputHelper.getArrayDescription(recipe.getInputs()) // Need to resolve "petalXXX" to an item
LogHelper.getStackDescription(recipe.getOutput()),
LogHelper.getListDescription(recipe.getInputs()) // Need to resolve "petalXXX" to an item
));
}
}
@@ -48,8 +48,8 @@ public class BotaniaLogger implements ICommandFunction {
if(args.isEmpty() || args.contains("elventrade")) {
for(RecipeElvenTrade recipe : BotaniaAPI.elvenTradeRecipes) {
MineTweakerAPI.logCommand(String.format("mods.botania.ElvenTrade.addRecipe(%s, %s);",
InputHelper.getStackDescription(recipe.getOutput()),
InputHelper.getArrayDescription(recipe.getInputs()
LogHelper.getStackDescription(recipe.getOutput()),
LogHelper.getListDescription(recipe.getInputs()
)));
}
}
@@ -58,8 +58,8 @@ public class BotaniaLogger implements ICommandFunction {
for(RecipeManaInfusion recipe : BotaniaAPI.manaInfusionRecipes) {
MineTweakerAPI.logCommand(String.format("mods.botania.ManaInfusion.add%s(%s, %s, %d);",
recipe.isAlchemy() ? "Alchemy" : recipe.isConjuration() ? "Conjuration" : "Infusion",
InputHelper.getStackDescription(recipe.getOutput()),
InputHelper.getStackDescription(recipe.getInput()),
LogHelper.getStackDescription(recipe.getOutput()),
LogHelper.getStackDescription(recipe.getInput()),
recipe.getManaToConsume()
));
}
@@ -68,8 +68,8 @@ public class BotaniaLogger implements ICommandFunction {
if(args.isEmpty() || args.contains("runealtar")) {
for(RecipeRuneAltar recipe : BotaniaAPI.runeAltarRecipes) {
MineTweakerAPI.logCommand(String.format("mods.botania.RuneAltar.addRecipe(%s, %s, %d);",
InputHelper.getStackDescription(recipe.getOutput()),
InputHelper.getArrayDescription(recipe.getInputs()),
LogHelper.getStackDescription(recipe.getOutput()),
LogHelper.getListDescription(recipe.getInputs()),
recipe.getManaUsage()
));
}