aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0281-Server-Tick-Events.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0281-Server-Tick-Events.patch')
-rw-r--r--patches/server/0281-Server-Tick-Events.patch20
1 files changed, 10 insertions, 10 deletions
diff --git a/patches/server/0281-Server-Tick-Events.patch b/patches/server/0281-Server-Tick-Events.patch
index 597da613b9..5e04076791 100644
--- a/patches/server/0281-Server-Tick-Events.patch
+++ b/patches/server/0281-Server-Tick-Events.patch
@@ -6,21 +6,21 @@ Subject: [PATCH] Server Tick Events
Fires event at start and end of a server tick
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 7f511a811a73a092ea6a27e4f8afef58dd83b50a..f245b10bc2931ab165057f27a8ff79ea77ea726e 100644
+index 8f427475f7418bbfb8121dbd3e25e7827775ea41..447b8f9ede3f57c6c5f968a0d25153c5c8770c5a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1504,6 +1504,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
- });
- isOversleep = false;MinecraftTimings.serverOversleep.stopTiming();
- // Paper end
-+ new com.destroystokyo.paper.event.server.ServerTickStartEvent(this.tickCount+1).callEvent(); // Paper - Server Tick Events
+@@ -1482,6 +1482,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+ }
+ }
++ new com.destroystokyo.paper.event.server.ServerTickStartEvent(this.tickCount+1).callEvent(); // Paper - Server Tick Events
++this.tickCount;
this.tickRateManager.tick();
-@@ -1525,6 +1526,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
- this.runAllTasks();
- }
- // Paper end
+ this.tickChildren(shouldKeepTicking);
+@@ -1498,6 +1499,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+ ProfilerFiller gameprofilerfiller = Profiler.get();
+
+ this.runAllTasks(); // Paper - move runAllTasks() into full server tick (previously for timings)
+ // Paper start - Server Tick Events
+ long endTime = System.nanoTime();
+ long remaining = (TICK_TIME - (endTime - lastTick)) - catchupTime;