diff --git a/src/main/java/com/falsepattern/lib/api/Deprecation.java b/src/main/java/com/falsepattern/lib/api/Deprecation.java index 4b1279e..c3f3751 100644 --- a/src/main/java/com/falsepattern/lib/api/Deprecation.java +++ b/src/main/java/com/falsepattern/lib/api/Deprecation.java @@ -1,10 +1,22 @@ package com.falsepattern.lib.api; final class Deprecation { + private static boolean shortWarning = false; static void warn() { - new Exception("\nDEPRECATION WARNING\nDEPRECATION WARNING\n" + - "Someone used the deprecated FalsePatternLib api from 0.5 and before.\n" + - "This api was deprecated in 0.6.0, and will be REMOVED in FalsePatternLib 0.7! You should probably update your mods.\n" + - "See the following stacktrace for hints on what mod might be the cause.").printStackTrace(); + if (shortWarning) { + new DeprecationWarning("FalsePatternLib api deprecation warning. The api will be removed in 0.7! Update your mod. Stacktrace:").printStackTrace(); + } else { + new DeprecationWarning("\nDEPRECATION WARNING\nDEPRECATION WARNING\n" + + "Someone used the deprecated FalsePatternLib api from 0.5 and before.\n" + + "This api was deprecated in 0.6.0, and will be REMOVED in FalsePatternLib 0.7! You should probably update your mods.\n" + + "See the following stacktrace for hints on what mod might be the cause.").printStackTrace(); + shortWarning = true; + } + } + + private static class DeprecationWarning extends Exception { + public DeprecationWarning(String message) { + super(message); + } } }