Updated Upstream (CraftBukkit)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
4ed5af5e SPIGOT-6956: Reduce differences caused by setKeepSpawnInMemory(false)
21fe78aa SPIGOT-6957: Bad default value for WorldCreator#generatorSettings
ce373be6 PR-1022: Fix get HighestBlockAt in chunk snapshot
This commit is contained in:
Nassim Jahnke 2022-03-04 09:33:13 +01:00
parent c09365aeac
commit 719daa8bbf
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B
40 changed files with 133 additions and 137 deletions

View File

@ -183,10 +183,10 @@ index 2a6969baca7c07c52223672de58886dd05c032eb..a620e53021e02da1663b8d8b68d429b2
public void write(FriendlyByteBuf buf) {
buf.writeInt(this.playerId);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 8754e5899067bc5e8e83a6264c6fcc38846f6baa..425fe208a1bf5490421d4256a8c47c16e47362d0 100644
index 89522ebf7b11801cf8b9893a1bae50a1ee88ff79..a47303382db64d8121c6252d70739d597cfd6231 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1778,7 +1778,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1774,7 +1774,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
PackRepository resourcepackrepository = this.packRepository;
Objects.requireNonNull(this.packRepository);

View File

@ -5001,7 +5001,7 @@ index 0000000000000000000000000000000000000000..9f292deee1b793d52b5774304318e940
+ }
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 425fe208a1bf5490421d4256a8c47c16e47362d0..32dbb6e7add72ca8068e431e607a9ff570157ff8 100644
index a47303382db64d8121c6252d70739d597cfd6231..9db23400a5538200ae26ef620da7bafb7fe75c37 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -296,6 +296,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@ -5012,7 +5012,7 @@ index 425fe208a1bf5490421d4256a8c47c16e47362d0..32dbb6e7add72ca8068e431e607a9ff5
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
AtomicReference<S> atomicreference = new AtomicReference();
@@ -967,6 +968,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -963,6 +964,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
MinecraftServer.LOGGER.error("Failed to unlock level {}", this.storageSource.getLevelId(), ioexception1);
}
// Spigot start
@ -5022,7 +5022,7 @@ index 425fe208a1bf5490421d4256a8c47c16e47362d0..32dbb6e7add72ca8068e431e607a9ff5
if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) {
MinecraftServer.LOGGER.info("Saving usercache.json");
this.getProfileCache().save();
@@ -1029,6 +1033,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1025,6 +1029,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.lastOverloadWarning = this.nextTickTime;
}
@ -5030,7 +5030,7 @@ index 425fe208a1bf5490421d4256a8c47c16e47362d0..32dbb6e7add72ca8068e431e607a9ff5
if ( tickCount++ % MinecraftServer.SAMPLE_INTERVAL == 0 )
{
double currentTps = 1E3 / ( curTime - tickSection ) * MinecraftServer.SAMPLE_INTERVAL;
@@ -1271,7 +1276,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1267,7 +1272,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
MinecraftServer.LOGGER.debug("Autosave finished");
SpigotTimings.worldSaveTimer.stopTiming(); // Spigot
}
@ -5039,7 +5039,7 @@ index 425fe208a1bf5490421d4256a8c47c16e47362d0..32dbb6e7add72ca8068e431e607a9ff5
this.profiler.push("tallying");
long l = this.tickTimes[this.tickCount % 100] = Util.getNanos() - i;
@@ -1334,6 +1339,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1330,6 +1335,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
try {
worldserver.timings.doTick.startTiming(); // Spigot
worldserver.tick(shouldKeepTicking);

View File

@ -759,7 +759,7 @@ index 13421daa96b4ba302581f36abcd730952713d8cd..049e64c355d5f064009b1107ad15d28c
} catch (Exception exception) {
if (listener.shouldPropagateHandlingExceptions()) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 32dbb6e7add72ca8068e431e607a9ff570157ff8..aca0adb9f714f96b10546b837d08fe9ef90b4d89 100644
index 9db23400a5538200ae26ef620da7bafb7fe75c37..3112f15993972c90d5bb797638a0186d88b403dc 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -180,7 +180,7 @@ import org.bukkit.craftbukkit.generator.CustomWorldChunkManager;
@ -771,7 +771,7 @@ index 32dbb6e7add72ca8068e431e607a9ff570157ff8..aca0adb9f714f96b10546b837d08fe9e
import org.spigotmc.SlackActivityAccountant; // Spigot
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements CommandSource, AutoCloseable {
@@ -899,6 +899,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -895,6 +895,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
// CraftBukkit end
MinecraftServer.LOGGER.info("Stopping server");
@ -779,7 +779,7 @@ index 32dbb6e7add72ca8068e431e607a9ff570157ff8..aca0adb9f714f96b10546b837d08fe9e
// CraftBukkit start
if (this.server != null) {
this.server.disablePlugins();
@@ -1141,9 +1142,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1137,9 +1138,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
private boolean haveTime() {
// CraftBukkit start
@ -801,7 +801,7 @@ index 32dbb6e7add72ca8068e431e607a9ff570157ff8..aca0adb9f714f96b10546b837d08fe9e
private void executeModerately() {
this.runAllTasks();
java.util.concurrent.locks.LockSupport.parkNanos("executing tasks", 1000L);
@@ -1151,9 +1164,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1147,9 +1160,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit end
protected void waitUntilNextTick() {
@ -813,7 +813,7 @@ index 32dbb6e7add72ca8068e431e607a9ff570157ff8..aca0adb9f714f96b10546b837d08fe9e
});
}
@@ -1239,10 +1252,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1235,10 +1248,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public void onServerExit() {}
public void tickServer(BooleanSupplier shouldKeepTicking) {
@ -833,7 +833,7 @@ index 32dbb6e7add72ca8068e431e607a9ff570157ff8..aca0adb9f714f96b10546b837d08fe9e
++this.tickCount;
this.tickChildren(shouldKeepTicking);
if (i - this.lastServerStatus >= 5000000000L) {
@@ -1268,15 +1289,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1264,15 +1285,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
if (this.autosavePeriod > 0 && this.tickCount % this.autosavePeriod == 0) { // CraftBukkit
@ -854,7 +854,7 @@ index 32dbb6e7add72ca8068e431e607a9ff570157ff8..aca0adb9f714f96b10546b837d08fe9e
this.profiler.push("tallying");
long l = this.tickTimes[this.tickCount % 100] = Util.getNanos() - i;
@@ -1287,30 +1311,29 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1283,30 +1307,29 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.profiler.pop();
org.spigotmc.WatchdogThread.tick(); // Spigot
this.slackActivityAccountant.tickEnded(l); // Spigot
@ -893,7 +893,7 @@ index 32dbb6e7add72ca8068e431e607a9ff570157ff8..aca0adb9f714f96b10546b837d08fe9e
// Send time updates to everyone, it will get the right time from the world the player is in.
if (this.tickCount % 20 == 0) {
for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
@@ -1318,7 +1341,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1314,7 +1337,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
entityplayer.connection.send(new ClientboundSetTimePacket(entityplayer.level.getGameTime(), entityplayer.getPlayerTime(), entityplayer.level.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT))); // Add support for per player time
}
}
@ -902,7 +902,7 @@ index 32dbb6e7add72ca8068e431e607a9ff570157ff8..aca0adb9f714f96b10546b837d08fe9e
while (iterator.hasNext()) {
ServerLevel worldserver = (ServerLevel) iterator.next();
@@ -1364,24 +1387,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1360,24 +1383,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
this.profiler.popPush("connection");
@ -1700,7 +1700,7 @@ index 95abf42577725383a2b49242c28b81beef487ee5..4e5cfc508e356691a9a249013553f97e
};
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index eac877cda0cd37d8717c770b86b590213ee0567e..14b028b75470b164e64a60cc47a2938ba54b3652 100644
index 93b70a144bca1e567b0d3f3eafc1dd4b3ac2d2ba..420ca3fa5b84b3dc178496343062ec3f42dd5ae4 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2280,12 +2280,31 @@ public final class CraftServer implements Server {

View File

@ -19,10 +19,10 @@ index f092497b6defd28c94393e483a9288d121158a1e..df44790b1c342d0a6ff794bea86319fa
if (outputStream != null) {
try {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index aca0adb9f714f96b10546b837d08fe9ef90b4d89..905dbf6bb3fbbdf7b463c9b9baa59f54b83c3687 100644
index 3112f15993972c90d5bb797638a0186d88b403dc..8bacbb2289a9e5203766d71be6ba0a31f48b626e 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1464,7 +1464,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1460,7 +1460,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@DontObfuscate
public String getServerModName() {
@ -32,7 +32,7 @@ index aca0adb9f714f96b10546b837d08fe9ef90b4d89..905dbf6bb3fbbdf7b463c9b9baa59f54
public SystemReport fillSystemReport(SystemReport details) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index e577c2fb100c217faeaf2d85d6a4374d6de047e1..a5f9e484f597680aea3a95ac27441dc09e1087ec 100644
index ba53a17a8730344882502995245171190b2de5ee..ad70bb6419bdfa75ffc8ce4f42150097ef0ead0f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -245,7 +245,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;

View File

@ -12,7 +12,7 @@ Previous implementation did not calculate TPS correctly.
Switch to a realistic rolling average and factor in std deviation as an extra reporting variable
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 905dbf6bb3fbbdf7b463c9b9baa59f54b83c3687..9f7d562131c7b4e5bf1e5028c6e4734f73b395d8 100644
index 8bacbb2289a9e5203766d71be6ba0a31f48b626e..18f03367174651b93682d5e5f4350d8c7e6e3b98 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -283,7 +283,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@ -33,7 +33,7 @@ index 905dbf6bb3fbbdf7b463c9b9baa59f54b83c3687..9f7d562131c7b4e5bf1e5028c6e4734f
public final double[] recentTps = new double[ 3 ];
public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant();
// Spigot end
@@ -1009,6 +1009,57 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1005,6 +1005,57 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
{
return ( avg * exp ) + ( tps * ( 1 - exp ) );
}
@ -91,7 +91,7 @@ index 905dbf6bb3fbbdf7b463c9b9baa59f54b83c3687..9f7d562131c7b4e5bf1e5028c6e4734f
// Spigot End
protected void runServer() {
@@ -1021,26 +1072,33 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1017,26 +1068,33 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Spigot start
Arrays.fill( recentTps, 20 );
@ -133,7 +133,7 @@ index 905dbf6bb3fbbdf7b463c9b9baa59f54b83c3687..9f7d562131c7b4e5bf1e5028c6e4734f
tickSection = curTime;
}
// Spigot end
@@ -1050,7 +1108,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1046,7 +1104,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.debugCommandProfiler = new MinecraftServer.TimeProfiler(Util.getNanos(), this.tickCount);
}
@ -144,7 +144,7 @@ index 905dbf6bb3fbbdf7b463c9b9baa59f54b83c3687..9f7d562131c7b4e5bf1e5028c6e4734f
this.startMetricsRecordingTick();
this.profiler.push("tick");
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index a5f9e484f597680aea3a95ac27441dc09e1087ec..9251a33715c271e17cad8b9d0de5da444ad25100 100644
index ad70bb6419bdfa75ffc8ce4f42150097ef0ead0f..8f1d3ac7c59963feb54cba60f749880fd9e8fcd9 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2362,6 +2362,17 @@ public final class CraftServer implements Server {

View File

@ -25,10 +25,10 @@ index bc35bdd9cbd544ae2ab27ad042d7d1b3166db9a6..2b0a75dc2e292e655ca3300f64bc1211
+ }
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 9f7d562131c7b4e5bf1e5028c6e4734f73b395d8..26646df983507bfb1d75a7a3a9f4c12c7bf9fd49 100644
index 18f03367174651b93682d5e5f4350d8c7e6e3b98..ac88d79685c5f988d02122bce38d5af41fe11445 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1443,6 +1443,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1439,6 +1439,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.profiler.pop();
this.profiler.pop();

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener
Saves on some object allocation and processing when no plugin listens to this
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 26646df983507bfb1d75a7a3a9f4c12c7bf9fd49..99478fe8f16783e7d2ae128f32199fa4b465dc83 100644
index ac88d79685c5f988d02122bce38d5af41fe11445..ba2b8c886d6c4d68b669186724e8049531987979 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1404,6 +1404,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1400,6 +1400,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
while (iterator.hasNext()) {
ServerLevel worldserver = (ServerLevel) iterator.next();

View File

@ -6,7 +6,7 @@ Subject: [PATCH] remove null possibility for getServer singleton
to stop IDE complaining about potential NPE
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 0f743a46195ce83bb3d96a5a65067cfab3a369e8..0eaa13cf0f452fe6604767e40d8c9b6664df31bb 100644
index 199401eb1a0722d84700681a0a5cba67953c6bec..9fb842e86aa6302259a98e5352da5296dbd07054 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -186,6 +186,7 @@ import org.spigotmc.SlackActivityAccountant; // Spigot
@ -25,7 +25,7 @@ index 0f743a46195ce83bb3d96a5a65067cfab3a369e8..0eaa13cf0f452fe6604767e40d8c9b66
this.metricsRecorder = InactiveMetricsRecorder.INSTANCE;
this.profiler = this.metricsRecorder.getProfiler();
this.onMetricsRecordingStopped = (methodprofilerresults) -> {
@@ -2314,7 +2316,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2310,7 +2312,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@Deprecated
public static MinecraftServer getServer() {

View File

@ -12,10 +12,10 @@ the user never changed the default setting for Spigot's save on stop only.
1.17: TODO does this need the synchronized blocks anymore?
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 0eaa13cf0f452fe6604767e40d8c9b6664df31bb..3e858ae243eaf9e145cbc5288ac2e3467082e369 100644
index 9fb842e86aa6302259a98e5352da5296dbd07054..d864cd5b511e36c9e0c0773324e7de4849595566 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -991,7 +991,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -987,7 +987,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} catch (java.lang.InterruptedException ignored) {} // Paper
if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) {
MinecraftServer.LOGGER.info("Saving usercache.json");

View File

@ -30,7 +30,7 @@ will have plugins and worlds saving to the disk has a high potential to result
in corruption/dataloss.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 3e858ae243eaf9e145cbc5288ac2e3467082e369..fc64c29058e68239e25c51cefe97627be2a13d33 100644
index d864cd5b511e36c9e0c0773324e7de4849595566..f17cee5678f912e7118e12c8e0ff907ed49e3acf 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -230,6 +230,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@ -41,7 +41,7 @@ index 3e858ae243eaf9e145cbc5288ac2e3467082e369..fc64c29058e68239e25c51cefe97627b
private boolean stopped;
private int tickCount;
protected final Proxy proxy;
@@ -930,7 +931,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -926,7 +927,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (this.playerList != null) {
MinecraftServer.LOGGER.info("Saving players");
this.playerList.saveAll();
@ -50,7 +50,7 @@ index 3e858ae243eaf9e145cbc5288ac2e3467082e369..fc64c29058e68239e25c51cefe97627b
try { Thread.sleep(100); } catch (InterruptedException ex) {} // CraftBukkit - SPIGOT-625 - give server at least a chance to send packets
}
@@ -1010,6 +1011,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1006,6 +1007,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public void halt(boolean flag) {

View File

@ -19,7 +19,7 @@ Other changes:
configuration
diff --git a/build.gradle.kts b/build.gradle.kts
index 9d0639f65cf4e7bd8febbab69a01fe71c0e8d67e..e7eca424ffa81f60a08a2ab655e085bd3e49983c 100644
index f08a6a00ad4d4c96166b386b3e79dc1ea021db3a..6c86bb7ff8c7bfcfc29fe79ea8c6f79656a3d7ae 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -12,7 +12,17 @@ repositories {
@ -112,7 +112,7 @@ index 0000000000000000000000000000000000000000..685deaa0e5d1ddc13e3a7c0471b1cfcf
+
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index fc64c29058e68239e25c51cefe97627be2a13d33..72dd9c4c8a9266bdcf7f096ade9d6478f4ed30f0 100644
index f17cee5678f912e7118e12c8e0ff907ed49e3acf..7adbe2f133e74d566b31098d5c805f5000ee3310 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -169,7 +169,7 @@ import org.slf4j.Logger;
@ -152,7 +152,7 @@ index fc64c29058e68239e25c51cefe97627be2a13d33..72dd9c4c8a9266bdcf7f096ade9d6478
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
}
// CraftBukkit end
@@ -1187,7 +1191,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1183,7 +1187,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
org.spigotmc.WatchdogThread.doStop(); // Spigot
// CraftBukkit start - Restore terminal to original settings
try {
@ -161,7 +161,7 @@ index fc64c29058e68239e25c51cefe97627be2a13d33..72dd9c4c8a9266bdcf7f096ade9d6478
} catch (Exception ignored) {
}
// CraftBukkit end
@@ -1603,7 +1607,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1599,7 +1603,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@Override
public void sendMessage(Component message, UUID sender) {
@ -236,7 +236,7 @@ index 5b1dcf148d24bbd61728d8c2af611b7c4f8dd166..03fc0bca0c1a11db43d315236ca05dfe
this.bans = new UserBanList(PlayerList.USERBANLIST_FILE);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index ef55ae870e341af0087bc99341a77c5d1b851328..89d9ac790b28fedc7d30b54f30cc6235f9b12a64 100644
index fb46d2cf6caf033e4edd1e8f8145f90f408abdad..dba46a37d30baaaec830503aa5bb7d56a315658c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -45,7 +45,6 @@ import java.util.logging.Level;

View File

@ -190,7 +190,7 @@ index 67455a5ba75c9b816213e44d6872c5ddf8e27e98..23efad80934930beadf15e65781551d4
public ClientboundStatusResponsePacket(ServerStatus metadata) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 72dd9c4c8a9266bdcf7f096ade9d6478f4ed30f0..d48232d6bef4728242d2cde6b37d95a7041677d8 100644
index 7adbe2f133e74d566b31098d5c805f5000ee3310..61edb76381a83f36d0ade1c35e9999eaad58abd2 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2,6 +2,9 @@ package net.minecraft.server;
@ -203,7 +203,7 @@ index 72dd9c4c8a9266bdcf7f096ade9d6478f4ed30f0..d48232d6bef4728242d2cde6b37d95a7
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
@@ -1357,7 +1360,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1353,7 +1356,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.lastServerStatus = i;
this.status.setPlayers(new ServerStatus.Players(this.getMaxPlayers(), this.getPlayerCount()));
if (!this.hidesOnlinePlayers()) {

View File

@ -36,10 +36,10 @@ index 9dba4eb0e9c4e4d974edaeaf41c370d3996dd94e..62671d6c04f973594a6ca95446774c4b
public static int tabSpamLimit = 500;
private static void tabSpamLimiters() {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index d48232d6bef4728242d2cde6b37d95a7041677d8..86e789515922345ed3ce623b24f81a5a379a020c 100644
index 61edb76381a83f36d0ade1c35e9999eaad58abd2..432f1d6e5989f861e762a8b919a0048b58e77ce7 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1102,6 +1102,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1098,6 +1098,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.updateStatusIcon(this.status);
// Spigot start
@ -48,7 +48,7 @@ index d48232d6bef4728242d2cde6b37d95a7041677d8..86e789515922345ed3ce623b24f81a5a
long start = System.nanoTime(), curTime, tickSection = start; // Paper - Further improve server tick loop
lastTick = start - TICK_TIME; // Paper
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 23e33857b5cc888f4cbac273939fad81e3081103..53650ba59f05d8c7549a71d89c3734e02c6a7fea 100644
index 104162d1641499af3559e51fe9ad32b91785416a..8d429d2ebe63a429912bafe20eb24688aae939a1 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -904,6 +904,7 @@ public final class CraftServer implements Server {

View File

@ -2318,10 +2318,10 @@ index 8f5784ed4df46f3c7d4c6b4ff76ad839d436be1f..6a006f22d33491be4413fb64649ba9f6
DedicatedServer dedicatedserver1 = new DedicatedServer(optionset, config.get(), ops.get(), thread, convertable_conversionsession, resourcepackrepository, worldstem, dedicatedserversettings, DataFixers.getDataFixer(), minecraftsessionservice, gameprofilerepository, usercache, LoggerChunkProgressListener::new);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 86e789515922345ed3ce623b24f81a5a379a020c..ca48908148b6d9f4ae03fd55bcaf37e5fdb01cab 100644
index 432f1d6e5989f861e762a8b919a0048b58e77ce7..f347842c224ee565d45f5120b2e3a359a9cade65 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1002,7 +1002,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -998,7 +998,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.getProfileCache().save(false); // Paper
}
// Spigot end

View File

@ -8,10 +8,10 @@ the updates per world, so that we can re-use the same packet
object for every player unless they have per-player time enabled.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 2cc2e496991db1ca4154816ecd6121b82fca07c6..fcc8062487e41802988337796a52e8a7fcb59aad 100644
index e2150c3a7cb7898adda6e53d9aeed8698d819a30..e8d88e47247afd3f0b4fee61260b0b8baa007d9e 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1427,12 +1427,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1423,12 +1423,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper
// Send time updates to everyone, it will get the right time from the world the player is in.

View File

@ -6,10 +6,10 @@ 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 fcc8062487e41802988337796a52e8a7fcb59aad..5c976fd8aa5f79d1ef4174063acb0db7a5ce835c 100644
index e8d88e47247afd3f0b4fee61260b0b8baa007d9e..9be13843b17fff55cac404bd372581f7fadee4ac 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1355,6 +1355,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1351,6 +1351,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
});
isOversleep = false;MinecraftTimings.serverOversleep.stopTiming();
// Paper end
@ -17,7 +17,7 @@ index fcc8062487e41802988337796a52e8a7fcb59aad..5c976fd8aa5f79d1ef4174063acb0db7
++this.tickCount;
this.tickChildren(shouldKeepTicking);
@@ -1393,6 +1394,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1389,6 +1390,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.runAllTasks();
}
// Paper end

View File

@ -16,10 +16,10 @@ handling that should have been handled synchronously will be handled
synchronously when the server gets shut down.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 5c976fd8aa5f79d1ef4174063acb0db7a5ce835c..b24064e5f5029b0c42ea0083533eb581cad01528 100644
index 9be13843b17fff55cac404bd372581f7fadee4ac..6cb94b3b188a43535658dedf00b74236166665dc 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2341,7 +2341,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2337,7 +2337,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit start
@Override
public boolean isSameThread() {
@ -29,7 +29,7 @@ index 5c976fd8aa5f79d1ef4174063acb0db7a5ce835c..b24064e5f5029b0c42ea0083533eb581
public boolean isDebugging() {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 1373f00a5a93fbb34cc7cb47683a1eef48e88c8c..699d0c6361465bc799a6a135dcf75e2ba3a4a0f1 100644
index 879ad3ef7ea5fc9e047d2abfb77d2b08c5a71079..c35b22387c242d8322e58825a85b2f5289a41b9d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2061,7 +2061,7 @@ public final class CraftServer implements Server {

View File

@ -23,18 +23,14 @@ index eb44aef0aecf65f5c1b19f42bf85a3a263965a7c..5589ee42959e3665dd5df9049fe108b6
config.addDefault("world-settings.default." + path, def);
return config.getBoolean("world-settings." + worldName + "." + path, config.getBoolean("world-settings.default." + path));
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index b24064e5f5029b0c42ea0083533eb581cad01528..e60e4f3693314adb7763c440036f0c80d15f349a 100644
index 6cb94b3b188a43535658dedf00b74236166665dc..e75ca992a5fc0cc16b5d365287f63215c124759b 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -760,35 +760,36 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -760,31 +760,34 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit start
public void prepareLevels(ChunkProgressListener worldloadlistener, ServerLevel worldserver) {
- if (!worldserver.getWorld().getKeepSpawnInMemory()) {
- return;
- }
+ ServerChunkCache chunkproviderserver = worldserver.getChunkSource(); // Paper
// WorldServer worldserver = this.overworld();
this.forceTicks = true;
// CraftBukkit end
@ -49,13 +45,14 @@ index b24064e5f5029b0c42ea0083533eb581cad01528..e60e4f3693314adb7763c440036f0c80
chunkproviderserver.getLightEngine().setTaskPerBatch(500);
this.nextTickTime = Util.getMillis();
- chunkproviderserver.addRegionTicket(TicketType.START, new ChunkPos(blockposition), 11, Unit.INSTANCE);
- // CraftBukkit start
- if (worldserver.getWorld().getKeepSpawnInMemory()) {
- chunkproviderserver.addRegionTicket(TicketType.START, new ChunkPos(blockposition), 11, Unit.INSTANCE);
-
- while (chunkproviderserver.getTickingGenerated() != 441) {
- // CraftBukkit start
- // this.nextTickTime = SystemUtils.getMillis() + 10L;
- this.executeModerately();
- // CraftBukkit end
- while (chunkproviderserver.getTickingGenerated() != 441) {
- // this.nextTickTime = SystemUtils.getMillis() + 10L;
- this.executeModerately();
- }
- }
+ // Paper start - configurable spawn reason
+ int radiusBlocks = worldserver.paperConfig.keepLoadedRange;
@ -67,7 +64,6 @@ index b24064e5f5029b0c42ea0083533eb581cad01528..e60e4f3693314adb7763c440036f0c80
+ worldserver.addTicketsForSpawn(radiusBlocks, blockposition);
+ // Paper end
// CraftBukkit start
// this.nextTickTime = SystemUtils.getMillis() + 10L;
this.executeModerately();
// Iterator iterator = this.levels.values().iterator();
@ -75,7 +71,7 @@ index b24064e5f5029b0c42ea0083533eb581cad01528..e60e4f3693314adb7763c440036f0c80
if (true) {
ServerLevel worldserver1 = worldserver;
@@ -811,7 +812,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -807,7 +810,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// this.nextTickTime = SystemUtils.getMillis() + 10L;
this.executeModerately();
// CraftBukkit end

View File

@ -35,10 +35,10 @@ index 3e3a48a636c225ec113c1c64f6ffc8a37ad9169e..98adf2fd1c2e9fe75456266ea1d7604f
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index e60e4f3693314adb7763c440036f0c80d15f349a..20bbe968b03b32a6124dbf9df1fbf9da71cd668f 100644
index e75ca992a5fc0cc16b5d365287f63215c124759b..8e49a648671b4d4c0d07af35ba6558b63bbf28ee 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1457,6 +1457,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1455,6 +1455,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
while (iterator.hasNext()) {
ServerLevel worldserver = (ServerLevel) iterator.next();
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper

View File

@ -29,10 +29,10 @@ index 98adf2fd1c2e9fe75456266ea1d7604fe64109b1..d9c59ea6faa7155d415c89228c22da33
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 20bbe968b03b32a6124dbf9df1fbf9da71cd668f..49f86ccc3e0d5ba7d42e353a963ab0d4a18e251f 100644
index 8e49a648671b4d4c0d07af35ba6558b63bbf28ee..e621d683df00a7d095cc72f74357224208b0dbca 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -813,7 +813,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -811,7 +811,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.executeModerately();
// CraftBukkit end
if (worldserver.getWorld().getKeepSpawnInMemory()) worldloadlistener.stop(); // Paper

View File

@ -87,7 +87,7 @@ index a3c3656ba4e8bb85bfb3186d6284f02f09975b13..6cfaef1886b517c56ed9a96347be6e51
version = getInt("config-version", 25);
set("config-version", 25);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 49f86ccc3e0d5ba7d42e353a963ab0d4a18e251f..68e7372c4a01006dd8549aa8dde5e06de2d3f9d9 100644
index e621d683df00a7d095cc72f74357224208b0dbca..1ab4e3a1d2e3a576ea5f05c2d92a1aae47b1f73e 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -245,6 +245,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@ -102,7 +102,7 @@ index 49f86ccc3e0d5ba7d42e353a963ab0d4a18e251f..68e7372c4a01006dd8549aa8dde5e06d
@Nullable
private KeyPair keyPair;
@Nullable
@@ -1406,6 +1411,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1404,6 +1409,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.averageTickTime = this.averageTickTime * 0.8F + (float) l / 1000000.0F * 0.19999999F;
long i1 = Util.getNanos();
@ -115,7 +115,7 @@ index 49f86ccc3e0d5ba7d42e353a963ab0d4a18e251f..68e7372c4a01006dd8549aa8dde5e06d
this.frameTimer.logFrameDuration(i1 - i);
this.profiler.pop();
org.spigotmc.WatchdogThread.tick(); // Spigot
@@ -2543,4 +2554,29 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2541,4 +2552,29 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
};
}
}
@ -146,7 +146,7 @@ index 49f86ccc3e0d5ba7d42e353a963ab0d4a18e251f..68e7372c4a01006dd8549aa8dde5e06d
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 969a0fb7dba180b44cd5fe155b118ec28e0f61be..78ab3c61c2bc9f94835241c801f065f2ffd58482 100644
index 3fb07f047e24e3b2b68bcdc55e941f06c1fb0d9c..770fd30d47df8c2123b125ada615934a28f15efa 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2438,6 +2438,16 @@ public final class CraftServer implements Server {

View File

@ -71,7 +71,7 @@ index 8cc4cb2163a93b9491550fe6d0f5d980fb216920..4dd14d73a37b32288a64fbd67ee22c43
cause = cause.getCause();
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 68e7372c4a01006dd8549aa8dde5e06de2d3f9d9..b15ce2bc3abdcdf97d65edcd09a020241aeb0ffa 100644
index 1ab4e3a1d2e3a576ea5f05c2d92a1aae47b1f73e..2b301ab18cc67c04f6091f3a001aff20faadb9c9 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -298,7 +298,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@ -93,7 +93,7 @@ index 68e7372c4a01006dd8549aa8dde5e06de2d3f9d9..b15ce2bc3abdcdf97d65edcd09a02024
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
AtomicReference<S> atomicreference = new AtomicReference();
Thread thread = new Thread(() -> {
@@ -915,6 +918,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -913,6 +916,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit start
private boolean hasStopped = false;
@ -101,7 +101,7 @@ index 68e7372c4a01006dd8549aa8dde5e06de2d3f9d9..b15ce2bc3abdcdf97d65edcd09a02024
private final Object stopLock = new Object();
public final boolean hasStopped() {
synchronized (this.stopLock) {
@@ -929,6 +933,19 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -927,6 +931,19 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (this.hasStopped) return;
this.hasStopped = true;
}
@ -121,7 +121,7 @@ index 68e7372c4a01006dd8549aa8dde5e06de2d3f9d9..b15ce2bc3abdcdf97d65edcd09a02024
// CraftBukkit end
MinecraftServer.LOGGER.info("Stopping server");
MinecraftTimings.stopServer(); // Paper
@@ -1009,7 +1026,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1007,7 +1024,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.getProfileCache().save(false); // Paper
}
// Spigot end
@ -140,7 +140,7 @@ index 68e7372c4a01006dd8549aa8dde5e06de2d3f9d9..b15ce2bc3abdcdf97d65edcd09a02024
}
public String getLocalIp() {
@@ -1102,6 +1130,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1100,6 +1128,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
protected void runServer() {
try {
@ -148,7 +148,7 @@ index 68e7372c4a01006dd8549aa8dde5e06de2d3f9d9..b15ce2bc3abdcdf97d65edcd09a02024
if (this.initServer()) {
this.nextTickTime = Util.getMillis();
this.status.setDescription(new TextComponent(this.motd));
@@ -1109,6 +1138,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1107,6 +1136,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.updateStatusIcon(this.status);
// Spigot start
@ -167,7 +167,7 @@ index 68e7372c4a01006dd8549aa8dde5e06de2d3f9d9..b15ce2bc3abdcdf97d65edcd09a02024
org.spigotmc.WatchdogThread.hasStarted = true; // Paper
Arrays.fill( recentTps, 20 );
long start = System.nanoTime(), curTime, tickSection = start; // Paper - Further improve server tick loop
@@ -1166,6 +1207,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1164,6 +1205,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.onServerCrash((CrashReport) null);
}
} catch (Throwable throwable) {
@ -180,7 +180,7 @@ index 68e7372c4a01006dd8549aa8dde5e06de2d3f9d9..b15ce2bc3abdcdf97d65edcd09a02024
MinecraftServer.LOGGER.error("Encountered an unexpected exception", throwable);
// Spigot Start
if ( throwable.getCause() != null )
@@ -1199,14 +1246,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1197,14 +1244,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.profileCache.clearExecutor();
}
@ -198,7 +198,7 @@ index 68e7372c4a01006dd8549aa8dde5e06de2d3f9d9..b15ce2bc3abdcdf97d65edcd09a02024
}
}
@@ -1270,6 +1317,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1268,6 +1315,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@Override
public TickTask wrapRunnable(Runnable runnable) {
@ -211,7 +211,7 @@ index 68e7372c4a01006dd8549aa8dde5e06de2d3f9d9..b15ce2bc3abdcdf97d65edcd09a02024
return new TickTask(this.tickCount, runnable);
}
@@ -1498,6 +1551,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1496,6 +1549,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
try {
crashreport = CrashReport.forThrowable(throwable, "Exception ticking world");
} catch (Throwable t) {
@ -219,7 +219,7 @@ index 68e7372c4a01006dd8549aa8dde5e06de2d3f9d9..b15ce2bc3abdcdf97d65edcd09a02024
throw new RuntimeException("Error generating crash report", t);
}
// Spigot End
@@ -1955,7 +2009,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1953,7 +2007,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.packRepository.setSelected(dataPacks);
this.worldData.setDataPackConfig(MinecraftServer.getSelectedPacks(this.packRepository));
this.resources.managers.updateRegistryTags(this.registryAccess());
@ -323,7 +323,7 @@ index a909fea6e1cedd1282bf975be200031dde41f99a..76a15f9a3419c430a288b52b824aa723
final String msg = String.format("BlockEntity threw exception at %s:%s,%s,%s", LevelChunk.this.getLevel().getWorld().getName(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ());
net.minecraft.server.MinecraftServer.LOGGER.error(msg, throwable);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index b65a28d96f9d5a4e6272890ce0ac04b68925d502..41da8bba32211fedc6142b8e2a43e609571eab08 100644
index 20ee8418a40029d5bf962a8fa55b0c6a8aad0663..a4f3b793856042fccd072e76b65e02b6d2824c4f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2061,7 +2061,7 @@ public final class CraftServer implements Server {

View File

@ -29,10 +29,10 @@ index 0000000000000000000000000000000000000000..2d5494d2813b773e60ddba6790b750a9
+ }
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index b15ce2bc3abdcdf97d65edcd09a020241aeb0ffa..df2a564794fa5ee907cbde7a09239a314ea03a57 100644
index 2b301ab18cc67c04f6091f3a001aff20faadb9c9..fe877316a1c347354ee8e0651bbc243fb5eddc81 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -919,6 +919,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -917,6 +917,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit start
private boolean hasStopped = false;
public volatile boolean hasFullyShutdown = false; // Paper
@ -40,7 +40,7 @@ index b15ce2bc3abdcdf97d65edcd09a020241aeb0ffa..df2a564794fa5ee907cbde7a09239a31
private final Object stopLock = new Object();
public final boolean hasStopped() {
synchronized (this.stopLock) {
@@ -933,6 +934,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -931,6 +932,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (this.hasStopped) return;
this.hasStopped = true;
}
@ -48,7 +48,7 @@ index b15ce2bc3abdcdf97d65edcd09a020241aeb0ffa..df2a564794fa5ee907cbde7a09239a31
// Paper start - kill main thread, and kill it hard
shutdownThread = Thread.currentThread();
org.spigotmc.WatchdogThread.doStop(); // Paper
@@ -1058,6 +1060,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1056,6 +1058,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public void safeShutdown(boolean flag, boolean isRestarting) {
this.isRestarting = isRestarting;
@ -74,7 +74,7 @@ index 0af65f1698e4ee9d94724f19b0abd61c437f18f2..d21f45d983bf3047811d2d73f4a38deb
this.connection.send(new ClientboundDisconnectPacket(chatmessage));
this.connection.disconnect(chatmessage);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index b38432ca44cca2fe459d15ef021c7243871fa899..6ae8627d0c80b7b32fe7d26b54fba99b17daf7ef 100644
index feaeb9ce28e800634ee624fd212ee2b7030557b6..eedea56124ebc17f0212eb5d7dc83696384b83d9 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -996,6 +996,7 @@ public final class CraftServer implements Server {

View File

@ -10,10 +10,10 @@ Adds a 5 second grace period for any async tasks to finish and warns
if any are still running after that delay just as reload does.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index df2a564794fa5ee907cbde7a09239a314ea03a57..b00b17681233283b314fc1b4daf88379c3b5dea0 100644
index fe877316a1c347354ee8e0651bbc243fb5eddc81..4658883ffc150e38d29d5387784587e6299fab65 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -954,6 +954,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -952,6 +952,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit start
if (this.server != null) {
this.server.disablePlugins();
@ -22,7 +22,7 @@ index df2a564794fa5ee907cbde7a09239a314ea03a57..b00b17681233283b314fc1b4daf88379
// CraftBukkit end
if (this.getConnection() != null) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 6826b89ebabe6fd54d1d7c751defa2413c72844d..6652d54220832760b31082f280ec148151c9bc8f 100644
index 6086b75025165d4adf56c15a625094ddeb4477d8..b00e95dabbccda983c0e2823bd31b8806ef7933d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1005,6 +1005,35 @@ public final class CraftServer implements Server {

View File

@ -8,10 +8,10 @@ makes it so that the server keeps the last difficulty used instead
of restoring the server.properties every single load.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index b00b17681233283b314fc1b4daf88379c3b5dea0..aeceac6fb547b38e7691cb0435e55da556c69147 100644
index 4658883ffc150e38d29d5387784587e6299fab65..81f611fef60518da5ee1bc34dcd7b8688818b096 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -824,7 +824,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -822,7 +822,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
chunkproviderserver.getLightEngine().setTaskPerBatch(worldserver.paperConfig.lightQueueSize); // Paper - increase light queue size
// CraftBukkit start
// this.updateMobSpawningFlags();
@ -20,7 +20,7 @@ index b00b17681233283b314fc1b4daf88379c3b5dea0..aeceac6fb547b38e7691cb0435e55da5
this.forceTicks = false;
// CraftBukkit end
@@ -1739,11 +1739,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1737,11 +1737,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}
@ -40,7 +40,7 @@ index b00b17681233283b314fc1b4daf88379c3b5dea0..aeceac6fb547b38e7691cb0435e55da5
}
}
@@ -1757,7 +1760,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1755,7 +1758,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
while (iterator.hasNext()) {
ServerLevel worldserver = (ServerLevel) iterator.next();
@ -102,7 +102,7 @@ index 770f11ad28f17427306e79509ecd192555854f1e..e3cc64933133d086bb14b6a941f6dd30
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 6652d54220832760b31082f280ec148151c9bc8f..3f613f1f5942452daa60e919abb80397e8357e63 100644
index b00e95dabbccda983c0e2823bd31b8806ef7933d..c26fd12b2eb9706e3e5850883b9388d56cbdb2fb 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -944,8 +944,8 @@ public final class CraftServer implements Server {

View File

@ -50,10 +50,10 @@ index eae27a641ee69f3383f1200f8c8ab8dd7a4105a4..12a6f12ffa8a45b054b01a7edc73ca8a
config.addDefault("world-settings.default." + path, def);
return config.getBoolean("world-settings." + worldName + "." + path, config.getBoolean("world-settings.default." + path));
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index aeceac6fb547b38e7691cb0435e55da556c69147..c37f0527367f1ee842cec150a141087d83851c23 100644
index 81f611fef60518da5ee1bc34dcd7b8688818b096..2d1163fb234a2327373099dbfb569c3b8af9fa46 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -902,7 +902,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -900,7 +900,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
try {
this.isSaving = true;
@ -62,7 +62,7 @@ index aeceac6fb547b38e7691cb0435e55da556c69147..c37f0527367f1ee842cec150a141087d
flag3 = this.saveAllChunks(suppressLogs, flush, force);
} finally {
this.isSaving = false;
@@ -1445,13 +1445,28 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1443,13 +1443,28 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Cache block data strings
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index c37f0527367f1ee842cec150a141087d83851c23..9f27e35abf7ad6fd1a13a0aca660375354ef288f 100644
index 2d1163fb234a2327373099dbfb569c3b8af9fa46..583031b2d26f9410306cbacd158fb6a21f0f24b5 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2037,6 +2037,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2035,6 +2035,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.getPlayerList().reloadResources();
this.functionManager.replaceLibrary(this.resources.managers.getFunctionLibrary());
this.structureManager.onResourceManagerReload(this.resources.resourceManager);

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Fix deop kicking non-whitelisted player when white list is
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 9f27e35abf7ad6fd1a13a0aca660375354ef288f..1febf1e49f3ebe68c04efed2fd2da1ab1c6a900c 100644
index 583031b2d26f9410306cbacd158fb6a21f0f24b5..de024bf476e07558a249e2734be1f6ef6810ddd9 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2103,13 +2103,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2101,13 +2101,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (this.isEnforceWhitelist()) {
PlayerList playerlist = source.getServer().getPlayerList();
UserWhiteList whitelist = playerlist.getWhiteList();

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Added ServerResourcesReloadedEvent
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 1febf1e49f3ebe68c04efed2fd2da1ab1c6a900c..0f03525066b818a81583618e9a80f245032493b7 100644
index de024bf476e07558a249e2734be1f6ef6810ddd9..670180dd48a8e04b76c65242d2b316d52ae9090f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2006,7 +2006,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2004,7 +2004,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
return this.functionManager;
}
@ -22,7 +22,7 @@ index 1febf1e49f3ebe68c04efed2fd2da1ab1c6a900c..0f03525066b818a81583618e9a80f245
RegistryAccess.Frozen iregistrycustom_dimension = this.registryAccess();
CompletableFuture<Void> completablefuture = CompletableFuture.supplyAsync(() -> {
Stream<String> stream = dataPacks.stream(); // CraftBukkit - decompile error
@@ -2032,6 +2038,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2030,6 +2036,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.packRepository.setSelected(dataPacks);
this.worldData.setDataPackConfig(MinecraftServer.getSelectedPacks(this.packRepository));
this.resources.managers.updateRegistryTags(this.registryAccess());

View File

@ -171,10 +171,10 @@ index 0000000000000000000000000000000000000000..6f39e343147803e15e7681c993b8797a
+public record RegistryKey<API extends Keyed, MINECRAFT>(Class<API> apiClass, ResourceKey<? extends Registry<MINECRAFT>> resourceKey) {
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 0f03525066b818a81583618e9a80f245032493b7..6d1dd3d33bcaa7a1262a53c4fed57564c74df286 100644
index 670180dd48a8e04b76c65242d2b316d52ae9090f..14b1524fcd27341eb8257f3925b94715bd4da152 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2038,6 +2038,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2036,6 +2036,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.packRepository.setSelected(dataPacks);
this.worldData.setDataPackConfig(MinecraftServer.getSelectedPacks(this.packRepository));
this.resources.managers.updateRegistryTags(this.registryAccess());

View File

@ -72,10 +72,10 @@ index 0000000000000000000000000000000000000000..41f6c2e1e60fc32e6393097711412ca2
+ }
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 6d1dd3d33bcaa7a1262a53c4fed57564c74df286..8d197cc55d0afab1bb247623777f6cd8db231846 100644
index 14b1524fcd27341eb8257f3925b94715bd4da152..eafa494d9c4d9fac40b62c439dbdae5bf70fd3a1 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2038,7 +2038,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2036,7 +2036,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.packRepository.setSelected(dataPacks);
this.worldData.setDataPackConfig(MinecraftServer.getSelectedPacks(this.packRepository));
this.resources.managers.updateRegistryTags(this.registryAccess());

View File

@ -5,10 +5,10 @@ Subject: [PATCH] EntityMoveEvent
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 6d1dd3d33bcaa7a1262a53c4fed57564c74df286..c1e9b32fd8f147e0cbbe830a62b8b51ea62c9d30 100644
index eafa494d9c4d9fac40b62c439dbdae5bf70fd3a1..9fb306fdb2071ffcd16e9bb83da75c8923f2ba8e 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1541,6 +1541,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1539,6 +1539,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
while (iterator.hasNext()) {
ServerLevel worldserver = (ServerLevel) iterator.next();
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper

View File

@ -5,7 +5,7 @@ Subject: [PATCH] forced whitelist: use configurable kick message
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index c1e9b32fd8f147e0cbbe830a62b8b51ea62c9d30..1cac02ba1eced8c1cda0de750dfe640acdca21c0 100644
index 9fb306fdb2071ffcd16e9bb83da75c8923f2ba8e..abb6b8f3b69826d69956a248770fc7b87745ba9a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -73,7 +73,6 @@ import net.minecraft.gametest.framework.GameTestTicker;
@ -16,7 +16,7 @@ index c1e9b32fd8f147e0cbbe830a62b8b51ea62c9d30..1cac02ba1eced8c1cda0de750dfe640a
import net.minecraft.network.protocol.game.ClientboundChangeDifficultyPacket;
import net.minecraft.network.protocol.game.ClientboundSetTimePacket;
import net.minecraft.network.protocol.status.ServerStatus;
@@ -2120,7 +2119,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2118,7 +2117,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
ServerPlayer entityplayer = (ServerPlayer) iterator.next();
if (!whitelist.isWhiteListed(entityplayer.getGameProfile()) && !this.getPlayerList().isOp(entityplayer.getGameProfile())) { // Paper - Fix kicking ops when whitelist is reloaded (MC-171420)

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerKickEvent causes
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index e2f647f3bdacd950ba098103d82a6f4f90794f36..d33656cd5729f4debc7ffff2ab7194464c3e629e 100644
index 5a2c5dc61580ff343ca96561fa56400c31995529..ce40b5999e97b1bc56342876861b5bdad18d6cd6 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2123,7 +2123,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2121,7 +2121,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
ServerPlayer entityplayer = (ServerPlayer) iterator.next();
if (!whitelist.isWhiteListed(entityplayer.getGameProfile()) && !this.getPlayerList().isOp(entityplayer.getGameProfile())) { // Paper - Fix kicking ops when whitelist is reloaded (MC-171420)

View File

@ -19,10 +19,10 @@ index b27021a42cbed3f0648a8d0903d00d03922ae221..eada966d7f108a6081be7a848f5c1dfc
private MinecraftTimings() {}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index d33656cd5729f4debc7ffff2ab7194464c3e629e..f37dfe1bd53567239bf69852e75f09440dc1628c 100644
index ce40b5999e97b1bc56342876861b5bdad18d6cd6..ee33fd892e97e1ffea259a4f7974675923377d6b 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1348,6 +1348,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1346,6 +1346,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
private boolean pollTaskInternal() {
if (super.pollTask()) {
@ -30,7 +30,7 @@ index d33656cd5729f4debc7ffff2ab7194464c3e629e..f37dfe1bd53567239bf69852e75f0944
return true;
} else {
if (this.haveTime()) {
@@ -2671,4 +2672,74 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2669,4 +2670,74 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}
// Paper end

View File

@ -9,10 +9,10 @@ This might result in chunks loading far slower in the nether,
for example.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 7a3ca8968e4d2ea26ed20bb4c8d78ab12ee44258..63c86ae637eabb07095a46852da530b53acb9ff3 100644
index 4eafa147edad4fe66fb419635c320a01186e7fea..b69af9a2f1a0e3d578aaade1fb040d3d4230a941 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1358,6 +1358,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1356,6 +1356,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.executeMidTickTasks(); // Paper - execute chunk tasks mid tick
return true;
} else {
@ -20,7 +20,7 @@ index 7a3ca8968e4d2ea26ed20bb4c8d78ab12ee44258..63c86ae637eabb07095a46852da530b5
if (this.haveTime()) {
Iterator iterator = this.getAllLevels().iterator();
@@ -1365,12 +1366,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1363,12 +1364,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
ServerLevel worldserver = (ServerLevel) iterator.next();
if (worldserver.getChunkSource().pollTask()) {

View File

@ -24,10 +24,10 @@ index 0000000000000000000000000000000000000000..6b0bed550763f34e18c9e92f9a47ec0c
+ }
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index bfa1e44aa9368b26cc6b10fec8d0848335f15d4e..750cac1cec048250494a4228c30d652717e03233 100644
index 05b834a99649e3f3e8e7759234006b1c0b799629..85b3bf7718e51ffa52799c0748843aaad3fd3813 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2061,6 +2061,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2059,6 +2059,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.worldData.setDataPackConfig(MinecraftServer.getSelectedPacks(this.packRepository));
this.resources.managers.updateRegistryTags(this.registryAccess());
io.papermc.paper.registry.PaperRegistry.clearCaches(); // Paper
@ -164,7 +164,7 @@ index 287205bce7f655f9a6b815f40d349c3db4c1e788..5c0f1488c8a8100cd39a03adeccded99
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 557121d00eb47c29779a1a076cbc4ba0f61a548a..5a6290e5d7b82dbc069d159ea53292e4dbc94d03 100644
index 5c6f70250339c83cd4f4af4d3ae4801000eab3a3..7343bd96a4a15f4abc081e565175db8df930a470 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -284,6 +284,7 @@ public final class CraftServer implements Server {

View File

@ -7,10 +7,10 @@ Subject: [PATCH] Fix World#locateNearestStructure
impl needs to be changed to reflect that
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 750cac1cec048250494a4228c30d652717e03233..d86fa3bbdc6cc838ed0ab96c2c084386dd4593e9 100644
index 85b3bf7718e51ffa52799c0748843aaad3fd3813..17e87875a95495940899b862eabf98b3d6a365da 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2062,6 +2062,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2060,6 +2060,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.resources.managers.updateRegistryTags(this.registryAccess());
io.papermc.paper.registry.PaperRegistry.clearCaches(); // Paper
net.minecraft.world.item.alchemy.PotionBrewing.reload(); // Paper

View File

@ -7,10 +7,10 @@ The watchdog thread sets MinecraftServer#forceTicks to true which will
cause waitUntilNextTick to hang when the task queue is drained.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index d86fa3bbdc6cc838ed0ab96c2c084386dd4593e9..46a959633a88ad146e8935d297ffddee2384e275 100644
index 17e87875a95495940899b862eabf98b3d6a365da..07c382f30ed3736ed15b5b71f48dc4a1de958242 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1014,7 +1014,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1012,7 +1012,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}, false);
}

@ -1 +1 @@
Subproject commit 86292d3e084729f53ce77af17b7b20d91754b7a5
Subproject commit 4ed5af5e63dea4884c9466901b4bfb0996455f7e