Better fix for #7854

This commit is contained in:
Anuken
2022-11-10 08:22:53 -05:00
parent 2e9026936e
commit 3fe38e8925
4 changed files with 9 additions and 4 deletions

View File

@@ -303,7 +303,7 @@ public class ControlPathfinder{
if(net.client()) return;
//TODO currently capped at 6 threads, might be a good idea to make it more?
threads = new PathfindThread[Mathf.clamp(Runtime.getRuntime().availableProcessors() - 2, 1, 6)];
threads = new PathfindThread[Mathf.clamp(Runtime.getRuntime().availableProcessors() - 1, 1, 6)];
for(int i = 0; i < threads.length; i ++){
threads[i] = new PathfindThread("ControlPathfindThread-" + i);
threads[i].setPriority(Thread.MIN_PRIORITY);