2016-03-29 02:55:47 +02:00
|
|
|
--- a/net/minecraft/util/thread/BlockableEventLoop.java
|
|
|
|
+++ b/net/minecraft/util/thread/BlockableEventLoop.java
|
2024-12-14 15:51:03 +01:00
|
|
|
@@ -83,6 +_,14 @@
|
2016-03-29 02:55:47 +02:00
|
|
|
}
|
|
|
|
}
|
2024-12-14 15:51:03 +01:00
|
|
|
|
2016-03-29 02:55:47 +02:00
|
|
|
+ // 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
|
2024-12-14 15:51:03 +01:00
|
|
|
+
|
2016-03-29 02:55:47 +02:00
|
|
|
@Override
|
2024-12-14 15:51:03 +01:00
|
|
|
public void schedule(R task) {
|
|
|
|
this.pendingRunnables.add(task);
|