PaperMC/paper-server/patches/sources/net/minecraft/util/thread/BlockableEventLoop.java.patch
Aikar b01c811c2f MC Utils
== AT ==
public net.minecraft.server.level.ServerChunkCache mainThread
public net.minecraft.server.level.ServerLevel chunkSource
public org.bukkit.craftbukkit.inventory.CraftItemStack handle
public net.minecraft.server.level.ChunkMap getVisibleChunkIfPresent(J)Lnet/minecraft/server/level/ChunkHolder;
public net.minecraft.server.level.ServerChunkCache mainThreadProcessor
public net.minecraft.server.level.ServerChunkCache$MainThreadExecutor
public net.minecraft.world.level.chunk.LevelChunkSection states
2016-03-28 20:55:47 -04:00

16 lines
560 B
Diff

--- a/net/minecraft/util/thread/BlockableEventLoop.java
+++ b/net/minecraft/util/thread/BlockableEventLoop.java
@@ -82,6 +82,13 @@
runnable.run();
}
}
+ // 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 runnable) {