Add stacktrace deobfuscation in more places (#8484)

This commit is contained in:
Jason Penilla
2022-10-18 19:21:07 -07:00
parent 03245caed0
commit 13f7207665
7 changed files with 98 additions and 12 deletions

View File

@@ -5292,7 +5292,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public static void ensureMain(String reason, Runnable run) {
+ if (!isMainThread()) {
+ if (reason != null) {
+ new IllegalStateException("Asynchronous " + reason + "!").printStackTrace();
+ MinecraftServer.LOGGER.warn("Asynchronous " + reason + "!", new IllegalStateException());
+ }
+ getProcessQueue().add(run);
+ return;
@@ -5317,7 +5317,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public static <T> T ensureMain(String reason, Supplier<T> run) {
+ if (!isMainThread()) {
+ if (reason != null) {
+ new IllegalStateException("Asynchronous " + reason + "! Blocking thread until it returns ").printStackTrace();
+ MinecraftServer.LOGGER.warn("Asynchronous " + reason + "! Blocking thread until it returns ", new IllegalStateException());
+ }
+ Waitable<T> wait = new Waitable<T>() {
+ @Override
@@ -5329,7 +5329,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ try {
+ return wait.get();
+ } catch (InterruptedException | ExecutionException e) {
+ e.printStackTrace();
+ MinecraftServer.LOGGER.warn("Encountered exception", e);
+ }
+ return null;
+ }