Increase log level of changing stuff and make the corresponding configs work

This commit is contained in:
Bernhard Bonigl committed 2014-07-30 19:24:46 +02:00
1 parent fbbd0855e3
commit 0a811ed49d
2 files changed
+13 -6

No files matched your search

@@ -1,5 +1,6 @@
package iguanaman.iguanatweakstconstruct.harvestlevels;
import iguanaman.iguanatweakstconstruct.reference.Config;
import iguanaman.iguanatweakstconstruct.util.HarvestLevels;
import iguanaman.iguanatweakstconstruct.util.Log;
@@ -51,7 +52,8 @@ public abstract class HarvestLevelTweaks {
Blocks.obsidian.setHarvestLevel("pickaxe", HarvestLevels._5_diamond);
Log.trace("Modified vanilla blocks");
if(Config.logHarvestLevelChanges)
Log.debug("Modified vanilla blocks");
}
private static void modifyOredictBlocks()
@@ -73,7 +75,8 @@ public abstract class HarvestLevelTweaks {
}
// metal-blocks
Log.trace("Modified oredicted blocks");
if(Config.logHarvestLevelChanges)
Log.debug("Modified oredicted blocks");
}
@@ -82,7 +85,8 @@ public abstract class HarvestLevelTweaks {
{
Block block = Block.getBlockFromItem(stack.getItem());
Log.trace(String.format("Changed Harvest Level of %s from %d to %d", block.getLocalizedName(), block.getHarvestLevel(stack.getItemDamage()), harvestLevel));
if(Config.logHarvestLevelChanges)
Log.debug(String.format("Changed Harvest Level of %s from %d to %d", block.getLocalizedName(), block.getHarvestLevel(stack.getItemDamage()), harvestLevel));
block.setHarvestLevel("pickaxe", harvestLevel, stack.getItemDamage());
}
@@ -117,10 +121,12 @@ public abstract class HarvestLevelTweaks {
}
item.setHarvestLevel("pickaxe", hlvl);
Log.trace(String.format("Changed Harvest Level of %s from %d to %d", item.getUnlocalizedName(), old, hlvl));
if(Config.logMiningLevelChanges)
Log.debug(String.format("Changed Harvest Level of %s from %d to %d", item.getUnlocalizedName(), old, hlvl));
}
Log.trace("Modified tools");
if(Config.logMiningLevelChanges)
Log.debug("Modified tools");
}
// HarvestLevels
@@ -95,7 +95,8 @@ public abstract class TinkerToolTweaks {
TConstructRegistry.toolMaterials.put(id, newMaterial);
TConstructRegistry.toolMaterialStrings.put(newMaterial.name(), newMaterial);
Log.trace(String.format("Modified tool material %d: %s (level: %d, durability: %d, speed: %d)", id, old.name(), harvestLevel, durability, speed));
if(Config.logToolMaterialChanges)
Log.debug(String.format("Modified tool material %d: %s (level: %d, durability: %d, speed: %d)", id, old.name(), harvestLevel, durability, speed));
}
else
Log.error("Couldn't find ToolMaterial ID for " + old.name());