diff --git a/gradle.properties b/gradle.properties index 6da43fb..712e59b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ org.gradle.jvmargs = -Xmx3G org.gradle.daemon = false # Mod Information -mod_version = 0.1.26 +mod_version = 1.0.0 maven_group = srki2k archives_base_name = tweakedlib diff --git a/src/main/java/srki2k/tweakedlib/api/logging/errorlogginglib/ICustomLogger.java b/src/main/java/srki2k/tweakedlib/api/logging/errorlogginglib/ICustomLogger.java index 1bc4faa..635271c 100644 --- a/src/main/java/srki2k/tweakedlib/api/logging/errorlogginglib/ICustomLogger.java +++ b/src/main/java/srki2k/tweakedlib/api/logging/errorlogginglib/ICustomLogger.java @@ -6,18 +6,42 @@ public interface ICustomLogger { + /** + * This should return true if it found errors. + */ boolean startupChecks(); + /** + * This should return true if it found errors at startup. + * This will be called at startup if it's enabled in the configs, + * or if you request a non-existent powerTier. + */ boolean runtimeChecks(); + + /** + * Return true if this logger doesn't have any runtime checks. + */ boolean discardLoggerAfterStartup(); + /** + * Return your mods logger + */ Logger getModLogger(); + /** + * Return your mods configs, may be employ array + */ String[] getConfigs(); + /** + * Returns a lost of errors found by startupChecks() or runtimeChecks(); + */ List getErrors(); + /** + * You should call clear() on your list if your logger has runtime and startup checks + */ void clean(); } diff --git a/src/main/java/srki2k/tweakedlib/common/powertierlogging/PowerTierLogging.java b/src/main/java/srki2k/tweakedlib/common/powertierlogging/PowerTierLogging.java index 7d1d1cc..bd4b6e6 100644 --- a/src/main/java/srki2k/tweakedlib/common/powertierlogging/PowerTierLogging.java +++ b/src/main/java/srki2k/tweakedlib/common/powertierlogging/PowerTierLogging.java @@ -9,6 +9,8 @@ import java.util.ArrayList; import java.util.List; +import static srki2k.tweakedlib.common.Configs.TLConfigs.Logging.logMissingPowerTier; + public class PowerTierLogging implements ICustomLogger { public static void RegisterLogger() { @@ -43,17 +45,9 @@ public Logger getModLogger() { @Override public String[] getConfigs() { - String[] strings = new String[8]; - - strings[0] = "Default Pumpjack Power Tiers:"; -/* strings[1] = "Load these configs" + DefaultPumpjackPowerTiers.load; - strings[2] = "Power Tier ID" + DefaultPumpjackPowerTiers.capacity; - strings[3] = "Default consumption" + DefaultPumpjackPowerTiers.rft; + String[] strings = new String[1]; - strings[4] = "Default Excavator Power Tiers:"; - strings[5] = "Load these configs" + DefaultExcavatorPowerTiers.load; - strings[6] = "Power Tier ID" + DefaultExcavatorPowerTiers.capacity; - strings[7] = "Default consumption" + DefaultExcavatorPowerTiers.rft;*/ + strings[0] = "Logging: " + logMissingPowerTier; return strings; }