9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-27 10:59:16 +00:00

Dont throw in async thread & Clean up (#222)

* Dont throw in async thread

* Fix typo
This commit is contained in:
Creeam
2025-02-11 08:03:00 -08:00
committed by GitHub
parent b26dc8d3f0
commit 3b6ce17b1f
4 changed files with 19 additions and 26 deletions

View File

@@ -1,6 +1,5 @@
package org.dreeam.leaf.async.path;
import com.destroystokyo.paper.util.SneakyThrow;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import net.minecraft.server.MinecraftServer;
@@ -71,7 +70,7 @@ public class AsyncPathProcessor {
.exceptionally(throwable -> {
if (throwable instanceof TimeoutException e) {
LOGGER.warn("Async Pathfinding process timed out", e);
} else SneakyThrow.sneaky(throwable);
} else LOGGER.warn("Error occurred while processing async path", throwable);
return null;
});
}