mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 12:02:36 +01:00
17 lines
570 B
Diff
17 lines
570 B
Diff
--- a/net/minecraft/util/thread/BlockableEventLoop.java
|
|
+++ b/net/minecraft/util/thread/BlockableEventLoop.java
|
|
@@ -83,6 +_,14 @@
|
|
}
|
|
}
|
|
|
|
+ // Paper start
|
|
+ public void scheduleOnMain(Runnable runnable) {
|
|
+ // postToMainThread does not work the same as older versions of mc
|
|
+ // This method is actually used to create a TickTask, which can then be posted onto main
|
|
+ this.schedule(this.wrapRunnable(runnable));
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
@Override
|
|
public void schedule(R task) {
|
|
this.pendingRunnables.add(task);
|