mirror of
https://github.com/LegacyModdingMC/UniMix.git
synced 2026-11-19 15:29:17 +00:00
Only emit this warning if calling externally
This commit is contained in:
1 parent
7bfca4ba78
commit
0541ed4d3c
1 file changed
+4
-1
@@ -1224,7 +1224,10 @@ public final class MixinEnvironment implements ITokenProvider {
|
||||
*/
|
||||
@Deprecated
|
||||
public static void setCompatibilityLevel(CompatibilityLevel level) throws IllegalArgumentException {
|
||||
MixinEnvironment.logger.warn("MixinEnvironment::setCompatibilityLevel is deprecated and will be removed. Set level via config instead!");
|
||||
StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
|
||||
if (!"org.spongepowered.asm.mixin.transformer.MixinConfig".equals(stackTrace[2].getClassName())) {
|
||||
MixinEnvironment.logger.warn("MixinEnvironment::setCompatibilityLevel is deprecated and will be removed. Set level via config instead!");
|
||||
}
|
||||
|
||||
if (level != MixinEnvironment.compatibility && level.isAtLeast(MixinEnvironment.compatibility)) {
|
||||
if (!level.isSupported()) {
|
||||
|
||||
Reference in new issue
Block a user