Update to 1.14.3

This commit is contained in:
William Blake Galbreath
2019-06-25 21:12:19 -05:00
parent 5d6c6b7efa
commit 4bc7fbcdfa
23 changed files with 444 additions and 477 deletions

View File

@@ -1,4 +1,4 @@
From 73b651b11025e6e1648f0443de1e6f7e946c1deb Mon Sep 17 00:00:00 2001
From 097fb95e55092078634a4fa36161cf604a76a801 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Wed, 22 May 2019 22:30:08 -0500
Subject: [PATCH] Tick loop config options
@@ -9,10 +9,10 @@ Subject: [PATCH] Tick loop config options
2 files changed, 28 insertions(+), 10 deletions(-)
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index fc57f154f5..0a4d37cd42 100644
index 5ec9a980c9..0324a90ca5 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -865,16 +865,21 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -868,16 +868,21 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
long start = System.nanoTime(), curTime, tickSection = start; // Paper - Further improve server tick loop
lastTick = start - TICK_TIME; // Paper
while (this.isRunning) {
@@ -43,16 +43,16 @@ index fc57f154f5..0a4d37cd42 100644
if ( ++MinecraftServer.currentTick % SAMPLE_INTERVAL == 0 )
{
@@ -905,7 +910,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -908,7 +913,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.a(this::canSleepForTick);
this.methodProfiler.exitEnter("nextTickWait");
this.ac = true;
- this.ab = Math.max(SystemUtils.getMonotonicMillis() + 50L, this.nextTick);
this.ab = true;
- this.aa = Math.max(SystemUtils.getMonotonicMillis() + 50L, this.nextTick);
+ // Purpur start - tps catchup
+ if (net.pl3x.purpur.PurpurConfig.enableTPSCatchup) {
+ this.ab = Math.max(SystemUtils.getMonotonicMillis() + 50L, this.nextTick);
+ this.aa = Math.max(SystemUtils.getMonotonicMillis() + 50L, this.nextTick);
+ } else {
+ this.ab = this.nextTick = curTime / 1000000L + 50L;
+ this.aa = this.nextTick = curTime / 1000000L + 50L;
+ }
+ // Purpur end - tps catchup
this.sleepForTick();