9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-20 15:29:15 +00:00

apply minecraft sources

This commit is contained in:
NONPLAYT
2025-04-21 18:29:21 +03:00
parent 58ef06d87a
commit 9f8678ca4d
22 changed files with 24 additions and 24 deletions

View File

@@ -0,0 +1,21 @@
--- a/net/minecraft/util/thread/BlockableEventLoop.java
+++ b/net/minecraft/util/thread/BlockableEventLoop.java
@@ -22,7 +_,7 @@
import org.slf4j.Logger;
public abstract class BlockableEventLoop<R extends Runnable> implements ProfilerMeasured, TaskScheduler<R>, Executor {
- public static final long BLOCK_TIME_NANOS = 100000L;
+ public static final long BLOCK_TIME_NANOS = 2000000L; // DivineMC - Fix MC-183518
private final String name;
private static final Logger LOGGER = LogUtils.getLogger();
private final Queue<R> pendingRunnables = Queues.newConcurrentLinkedQueue();
@@ -146,8 +_,7 @@
}
protected void waitForTasks() {
- Thread.yield();
- LockSupport.parkNanos("waiting for tasks", 100000L);
+ LockSupport.parkNanos("waiting for tasks", 2000000L); // DivineMC - Fix MC-183518
}
protected void doRunTask(R task) {