From 64011e201b290d89f82522c7b02735e090bcd3c9 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Tue, 22 Feb 2022 14:24:28 -0800 Subject: [PATCH] Add mid-tick task execution to block ticking Dropped from the ticking block list rewrite --- .../server/Execute-chunk-tasks-mid-tick.patch | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/patches/server/Execute-chunk-tasks-mid-tick.patch b/patches/server/Execute-chunk-tasks-mid-tick.patch index d9634705f3..9aba6f8d06 100644 --- a/patches/server/Execute-chunk-tasks-mid-tick.patch +++ b/patches/server/Execute-chunk-tasks-mid-tick.patch @@ -142,6 +142,22 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // CraftBukkit start private int tickPosition; +@@ -0,0 +0,0 @@ public class ServerLevel extends Level implements WorldGenLevel { + if (fluid1.is(fluid)) { + fluid1.tick(this, pos); + } ++ MinecraftServer.getServer().executeMidTickTasks(); // Paper - exec chunk tasks during world tick + + } + +@@ -0,0 +0,0 @@ public class ServerLevel extends Level implements WorldGenLevel { + if (iblockdata.is(block)) { + iblockdata.tick(this, pos, this.random); + } ++ MinecraftServer.getServer().executeMidTickTasks(); // Paper - exec chunk tasks during world tick + + } + diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/Level.java