Forgot to convert duration to millis per the API expectation for tick event
This commit is contained in:
parent
be067fea11
commit
def0033929
|
@ -1,4 +1,4 @@
|
||||||
From a64fa8711ba3b64574459546673a90803f46011d Mon Sep 17 00:00:00 2001
|
From 1c8319a0ee657a502aa5f7a42fb4a2668928ecbd Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Wed, 27 Mar 2019 22:48:45 -0400
|
Date: Wed, 27 Mar 2019 22:48:45 -0400
|
||||||
Subject: [PATCH] Server Tick Events
|
Subject: [PATCH] Server Tick Events
|
||||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Server Tick Events
|
||||||
Fires event at start and end of a server tick
|
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
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index b93fccf91..9a56afeb3 100644
|
index b93fccf91..d6250c472 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -927,6 +927,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
@@ -927,6 +927,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||||
|
@ -24,7 +24,7 @@ index b93fccf91..9a56afeb3 100644
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ long endTime = System.nanoTime();
|
+ long endTime = System.nanoTime();
|
||||||
+ long remaining = (TICK_TIME - (endTime - lastTick)) - catchupTime;
|
+ long remaining = (TICK_TIME - (endTime - lastTick)) - catchupTime;
|
||||||
+ new com.destroystokyo.paper.event.server.ServerTickEndEvent(this.ticks, endTime - lastTick, remaining).callEvent();
|
+ new com.destroystokyo.paper.event.server.ServerTickEndEvent(this.ticks, ((double)(endTime - lastTick) / 1000000D), remaining).callEvent();
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper
|
co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue