net.minecraft.util.thread

This commit is contained in:
Noah van der Aa 2024-12-14 15:51:03 +01:00
parent 6fdbfef28e
commit 649f20ca93
No known key found for this signature in database
GPG key ID: 547D90BC6FF753CF

View file

@ -1,9 +1,9 @@
--- a/net/minecraft/util/thread/BlockableEventLoop.java
+++ b/net/minecraft/util/thread/BlockableEventLoop.java
@@ -82,6 +82,13 @@
runnable.run();
@@ -83,6 +_,14 @@
}
}
+ // Paper start
+ public void scheduleOnMain(Runnable runnable) {
+ // postToMainThread does not work the same as older versions of mc
@ -11,6 +11,7 @@
+ this.schedule(this.wrapRunnable(runnable));
+ }
+ // Paper end
+
@Override
public void schedule(R runnable) {
public void schedule(R task) {
this.pendingRunnables.add(task);