9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-25 09:59:15 +00:00

Do thread check if async mob spawn enabled

This commit is contained in:
Dreeam
2025-07-02 18:07:13 +08:00
parent 7c2174d91e
commit 199749f50d
5 changed files with 26 additions and 20 deletions

View File

@@ -27,11 +27,13 @@ public class AsyncLocator extends ConfigModules {
asyncLocatorThreads = config.getInt(getBasePath() + ".threads", asyncLocatorThreads);
asyncLocatorKeepalive = config.getInt(getBasePath() + ".keepalive", asyncLocatorKeepalive);
if (asyncLocatorThreads <= 0)
if (asyncLocatorThreads <= 0) {
asyncLocatorThreads = 1;
if (!enabled)
}
if (!enabled) {
asyncLocatorThreads = 0;
else
} else {
LeafConfig.LOGGER.info("Using {} threads for Async Locator", asyncLocatorThreads);
}
}
}