13
0
geforkt von Mirrors/Paper

[Auto] 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:
9294ebbf0 SPIGOT-5877: Add support for Vanilla custom dimensions
Dieser Commit ist enthalten in:
Aikar 2021-04-15 20:47:34 -04:00
Ursprung 606cdac609
Commit a08be1ec7c
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 401ADFC9891FAAFE
38 geänderte Dateien mit 112 neuen und 112 gelöschten Zeilen

Datei anzeigen

@ -236,10 +236,10 @@ index ab08336043d4f558434ed1f38d25cc555ace1ac0..a892521db1197369bf6363bd2f5da24b
});
this.b = Lists.newArrayList();
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index e4fae57da4ee232a818e608912f021694bcea0f2..078631631616874741b0e0662e51b3faadcddcec 100644
index a95c52035177cb86c7e3a580d5c26a5dd20a17e2..81cff54c93bc04d19e3cc0f5307799c62d139ab2 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1665,9 +1665,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1675,9 +1675,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
ResourcePackRepository resourcepackrepository = this.resourcePackRepository;
this.resourcePackRepository.getClass();

Datei anzeigen

@ -3009,10 +3009,10 @@ index 0000000000000000000000000000000000000000..18b56b59fd6efd618e6ff6f9cf3a02f5
+ }
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 078631631616874741b0e0662e51b3faadcddcec..8203192a94da26e8bfd6cf9999a2b2e8d26b1acf 100644
index 81cff54c93bc04d19e3cc0f5307799c62d139ab2..cd3e7b8a23e40c717829bd262bfa675e4e3532f9 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -874,6 +874,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -884,6 +884,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
MinecraftServer.LOGGER.error("Failed to unlock level {}", this.convertable.getLevelName(), ioexception1);
}
// Spigot start

Datei anzeigen

@ -788,7 +788,7 @@ index 21f5474a1cd60168ca059da542a432d40d88b514..07ca1234ad6ffa797003f7317fb88abf
int k = 0;
CustomFunction.c[] acustomfunction_c = customfunction.b();
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 8203192a94da26e8bfd6cf9999a2b2e8d26b1acf..4555a94cdb0a22f5f562099ac6ac0db454ff60c4 100644
index cd3e7b8a23e40c717829bd262bfa675e4e3532f9..511d6094403d17522212fcdda6903a13517c44fa 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -174,7 +174,7 @@ import org.bukkit.craftbukkit.Main;
@ -811,7 +811,7 @@ index 8203192a94da26e8bfd6cf9999a2b2e8d26b1acf..4555a94cdb0a22f5f562099ac6ac0db4
private final ResourcePackRepository resourcePackRepository;
private final ScoreboardServer scoreboardServer;
@Nullable
@@ -820,6 +820,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -830,6 +830,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
// CraftBukkit end
MinecraftServer.LOGGER.info("Stopping server");
@ -819,7 +819,7 @@ index 8203192a94da26e8bfd6cf9999a2b2e8d26b1acf..4555a94cdb0a22f5f562099ac6ac0db4
// CraftBukkit start
if (this.server != null) {
this.server.disablePlugins();
@@ -1017,9 +1018,21 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1027,9 +1028,21 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
private boolean canSleepForTick() {
// CraftBukkit start
@ -841,7 +841,7 @@ index 8203192a94da26e8bfd6cf9999a2b2e8d26b1acf..4555a94cdb0a22f5f562099ac6ac0db4
private void executeModerately() {
this.executeAll();
java.util.concurrent.locks.LockSupport.parkNanos("executing tasks", 1000L);
@@ -1027,9 +1040,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1037,9 +1050,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
// CraftBukkit end
protected void sleepForTick() {
@ -853,7 +853,7 @@ index 8203192a94da26e8bfd6cf9999a2b2e8d26b1acf..4555a94cdb0a22f5f562099ac6ac0db4
});
}
@@ -1112,10 +1125,18 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1122,10 +1135,18 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
protected void exit() {}
protected void a(BooleanSupplier booleansupplier) {
@ -873,7 +873,7 @@ index 8203192a94da26e8bfd6cf9999a2b2e8d26b1acf..4555a94cdb0a22f5f562099ac6ac0db4
++this.ticks;
this.b(booleansupplier);
if (i - this.T >= 5000000000L) {
@@ -1133,14 +1154,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1143,14 +1164,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit
@ -888,7 +888,7 @@ index 8203192a94da26e8bfd6cf9999a2b2e8d26b1acf..4555a94cdb0a22f5f562099ac6ac0db4
}
this.methodProfiler.enter("snooper");
@@ -1153,6 +1172,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1163,6 +1182,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
this.methodProfiler.exit();
@ -902,7 +902,7 @@ index 8203192a94da26e8bfd6cf9999a2b2e8d26b1acf..4555a94cdb0a22f5f562099ac6ac0db4
this.methodProfiler.enter("tallying");
long l = this.h[this.ticks % 100] = SystemUtils.getMonotonicNanos() - i;
@@ -1163,30 +1189,29 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1173,30 +1199,29 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.methodProfiler.exit();
org.spigotmc.WatchdogThread.tick(); // Spigot
this.slackActivityAccountant.tickEnded(l); // Spigot
@ -941,7 +941,7 @@ index 8203192a94da26e8bfd6cf9999a2b2e8d26b1acf..4555a94cdb0a22f5f562099ac6ac0db4
// Send time updates to everyone, it will get the right time from the world the player is in.
if (this.ticks % 20 == 0) {
for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
@@ -1194,7 +1219,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1204,7 +1229,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
entityplayer.playerConnection.sendPacket(new PacketPlayOutUpdateTime(entityplayer.world.getTime(), entityplayer.getPlayerTime(), entityplayer.world.getGameRules().getBoolean(GameRules.DO_DAYLIGHT_CYCLE))); // Add support for per player time
}
}
@ -950,7 +950,7 @@ index 8203192a94da26e8bfd6cf9999a2b2e8d26b1acf..4555a94cdb0a22f5f562099ac6ac0db4
while (iterator.hasNext()) {
WorldServer worldserver = (WorldServer) iterator.next();
@@ -1235,24 +1260,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1245,24 +1270,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
this.methodProfiler.exitEnter("connection");

Datei anzeigen

@ -19,10 +19,10 @@ index a5171d28b960b12c2743ea68a36d747bc967697d..a0f53c9eff04a40780b3ba568dbfc5bb
throwable = throwable1;
throw throwable1;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 422ee5fb0d917399b2b1e5d893219405c5dbe82d..60a768ea8ffa965dd309c05bebddf5563b5e1992 100644
index 511d6094403d17522212fcdda6903a13517c44fa..9ba05ab7ec97896349f4b754f2993cda9ab1bbfd 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1332,7 +1332,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1342,7 +1342,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
public String getServerModName() {
@ -45,7 +45,7 @@ index 2f6b49e3ae7a7407eaec9810af8bf72e3a4896de..1818a6af3a55d15be698d5219e0eea63
private final String bukkitVersion = Versioning.getBukkitVersion();
private final Logger logger = Logger.getLogger("Minecraft");
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 3a6578170765a472d36b169b999e9dc57bf8070b..a34b1ba17e6f7121ed70c3d95ec8f4aa24f1ef5c 100644
index 3b48799d084f14722f815cb35cbd48b618380fca..8efd3919bec5f497ce4bee041586c0a313931211 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -200,12 +200,25 @@ public class Main {

Datei anzeigen

@ -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 60a768ea8ffa965dd309c05bebddf5563b5e1992..2b3c32bda846b1a559f9a9d9d6870cb4ec6bfe12 100644
index 9ba05ab7ec97896349f4b754f2993cda9ab1bbfd..add4f149fd31d1420d825b646b3e088808e5896b 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -253,7 +253,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -33,7 +33,7 @@ index 60a768ea8ffa965dd309c05bebddf5563b5e1992..2b3c32bda846b1a559f9a9d9d6870cb4
public final double[] recentTps = new double[ 3 ];
public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant();
// Spigot end
@@ -915,6 +915,57 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -925,6 +925,57 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
{
return ( avg * exp ) + ( tps * ( 1 - exp ) );
}
@ -91,7 +91,7 @@ index 60a768ea8ffa965dd309c05bebddf5563b5e1992..2b3c32bda846b1a559f9a9d9d6870cb4
// Spigot End
protected void w() {
@@ -927,30 +978,38 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -937,30 +988,38 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
// Spigot start
Arrays.fill( recentTps, 20 );

Datei anzeigen

@ -25,10 +25,10 @@ index e6e18f309dc09ea9416ea37dcc697ddc2b571a96..4881b03d470646843bad1bc343eb6a6a
+ }
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 2b3c32bda846b1a559f9a9d9d6870cb4ec6bfe12..2c295e070a0418c7d3bc4a4a531df699acadb0ff 100644
index add4f149fd31d1420d825b646b3e088808e5896b..06071e15851d5d27f1c9a0d60a764a6214e0ba0f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1316,6 +1316,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1326,6 +1326,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.methodProfiler.exit();
this.methodProfiler.exit();

Datei anzeigen

@ -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 fec2e723d2cdc4d0144f9f2292804a2d364769f9..8c389b06dbd47c44f01d6bdd8a6b283c75353043 100644
index 06071e15851d5d27f1c9a0d60a764a6214e0ba0f..33139f9dc6a9c6030f565b01c9b6fd411cafa710 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1282,6 +1282,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1292,6 +1292,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
while (iterator.hasNext()) {
WorldServer worldserver = (WorldServer) iterator.next();
@ -18,7 +18,7 @@ index fec2e723d2cdc4d0144f9f2292804a2d364769f9..8c389b06dbd47c44f01d6bdd8a6b283c
this.methodProfiler.a(() -> {
return worldserver + " " + worldserver.getDimensionKey().a();
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
index 3403ed91e7ec98116438398fb7247e7f05171feb..addbb868ac43538b9fc468eb2601ffc9f974fa37 100644
index a5ee8bf7904444ff6fd82260a66a81c9af479f9e..c5baf9c448761f24c4fd49d7c4bade7dee43edf4 100644
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
@@ -196,6 +196,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {

Datei anzeigen

@ -32,7 +32,7 @@ index bc40f2cbe1645fd60c4cee106b90f17cd043d32d..c1bb5c325286119891e8d68ce8f7328c
packetdataserializer.a(this.c);
packetdataserializer.a(this.d);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 8c389b06dbd47c44f01d6bdd8a6b283c75353043..19ca2ea39ca3a3c820141467388eca65a0b744d0 100644
index 33139f9dc6a9c6030f565b01c9b6fd411cafa710..026ddfba26439a00685f3962084aa6194086c9b7 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -151,6 +151,7 @@ import net.minecraft.world.phys.Vec2F;
@ -43,7 +43,7 @@ index 8c389b06dbd47c44f01d6bdd8a6b283c75353043..19ca2ea39ca3a3c820141467388eca65
import org.apache.commons.lang3.Validate;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -541,6 +542,20 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -552,6 +553,20 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldLoadEvent(worldserver.getWorld()));
}

Datei anzeigen

@ -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 19ca2ea39ca3a3c820141467388eca65a0b744d0..3d20206c3817cc7bf1d0168c0b556b7505eebf93 100644
index 026ddfba26439a00685f3962084aa6194086c9b7..f990f242a8d812a93b454b065a17fd4e8170355a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -180,6 +180,7 @@ import org.spigotmc.SlackActivityAccountant; // Spigot
@ -25,7 +25,7 @@ index 19ca2ea39ca3a3c820141467388eca65a0b744d0..3d20206c3817cc7bf1d0168c0b556b75
this.m = new GameProfilerSwitcher(SystemUtils.a, this::ai);
this.methodProfiler = GameProfilerDisabled.a;
this.serverPing = new ServerPing();
@@ -2153,7 +2155,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -2163,7 +2165,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@Deprecated
public static MinecraftServer getServer() {

Datei anzeigen

@ -10,10 +10,10 @@ Additionally, move Saving of the User cache to be done async, incase
the user never changed the default setting for Spigot's save on stop only.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 3d20206c3817cc7bf1d0168c0b556b7505eebf93..9ae25f9496355d3114c0032731c8dcb621d243dc 100644
index f990f242a8d812a93b454b065a17fd4e8170355a..283c1111d99b6ae09b6db0c0079eeb0f1cbb7b2b 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -897,7 +897,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -907,7 +907,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
} catch (java.lang.InterruptedException ignored) {} // Paper
if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) {
LOGGER.info("Saving usercache.json");

Datei anzeigen

@ -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 9ae25f9496355d3114c0032731c8dcb621d243dc..7637e17e8a811214931c2df3dab50651a4cbcde6 100644
index 283c1111d99b6ae09b6db0c0079eeb0f1cbb7b2b..d92ca78e483b3f085e3bad1d1250cac2f9031fa7 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -201,6 +201,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -41,7 +41,7 @@ index 9ae25f9496355d3114c0032731c8dcb621d243dc..7637e17e8a811214931c2df3dab50651
private boolean isStopped;
private int ticks;
protected final Proxy proxy;
@@ -850,7 +851,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -860,7 +861,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
if (this.playerList != null) {
MinecraftServer.LOGGER.info("Saving players");
this.playerList.savePlayers();
@ -50,7 +50,7 @@ index 9ae25f9496355d3114c0032731c8dcb621d243dc..7637e17e8a811214931c2df3dab50651
try { Thread.sleep(100); } catch (InterruptedException ex) {} // CraftBukkit - SPIGOT-625 - give server at least a chance to send packets
}
@@ -915,8 +916,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -925,8 +926,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
return this.isRunning;
}
@ -64,7 +64,7 @@ index 9ae25f9496355d3114c0032731c8dcb621d243dc..7637e17e8a811214931c2df3dab50651
if (flag) {
try {
this.serverThread.join();
@@ -926,6 +932,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -936,6 +942,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
}

Datei anzeigen

@ -143,7 +143,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 7637e17e8a811214931c2df3dab50651a4cbcde6..d181a41c1724ee6e84f5239649ab74df158d5f24 100644
index d92ca78e483b3f085e3bad1d1250cac2f9031fa7..62ee4708a3196cfa395317a6312b3ac6c036793a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -160,7 +160,7 @@ import org.apache.logging.log4j.Logger;
@ -183,7 +183,7 @@ index 7637e17e8a811214931c2df3dab50651a4cbcde6..d181a41c1724ee6e84f5239649ab74df
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
}
// CraftBukkit end
@@ -1088,7 +1092,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1098,7 +1102,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
org.spigotmc.WatchdogThread.doStop(); // Spigot
// CraftBukkit start - Restore terminal to original settings
try {
@ -192,7 +192,7 @@ index 7637e17e8a811214931c2df3dab50651a4cbcde6..d181a41c1724ee6e84f5239649ab74df
} catch (Exception ignored) {
}
// CraftBukkit end
@@ -1459,7 +1463,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1469,7 +1473,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@Override
public void sendMessage(IChatBaseComponent ichatbasecomponent, UUID uuid) {

Datei anzeigen

@ -223,7 +223,7 @@ index 005ae7a75dfb19152abb606da29acad07c85e499..b9e36a83837913cd3e5abe598f695ba7
this.c = agameprofile;
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index d181a41c1724ee6e84f5239649ab74df158d5f24..9672619d3f206a5290d459b300ecdf53b7b70d91 100644
index 62ee4708a3196cfa395317a6312b3ac6c036793a..dbf5a849358158324e8a5c87f831236b71f7ec0d 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;
@ -236,7 +236,7 @@ index d181a41c1724ee6e84f5239649ab74df158d5f24..9672619d3f206a5290d459b300ecdf53
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
@@ -1229,7 +1232,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1239,7 +1242,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
if (i - this.T >= 5000000000L) {
this.T = i;
this.serverPing.setPlayerSample(new ServerPing.ServerPingPlayerSample(this.getMaxPlayers(), this.getPlayerCount()));

Datei anzeigen

@ -36,10 +36,10 @@ index bd508025b771424c942fd856c31d520b6f548082..62621562137cba4804f0465c58d25ca2
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 9672619d3f206a5290d459b300ecdf53b7b70d91..8166ad11642bb1b4b11722a5a09e773a2e749c47 100644
index dbf5a849358158324e8a5c87f831236b71f7ec0d..1733717b7cae3e7a805e5275ff89967744c4bc4a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1008,6 +1008,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1018,6 +1018,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.a(this.serverPing);
// Spigot start

Datei anzeigen

@ -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 021adb8a6b8c9e05c03391d0f8edfa71b3c0c246..dd207a5138c4933c281255f4135f42b8fb0351d2 100644
index 4cb57914db19d6024501f2b75361c3d8acdd4149..7dee17e52a5b23ba4d8089482b39215041a64579 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1305,12 +1305,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1315,12 +1315,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper
// Send time updates to everyone, it will get the right time from the world the player is in.

Datei anzeigen

@ -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 dd207a5138c4933c281255f4135f42b8fb0351d2..f07579d5b2450e7f972e0a942287ea1205740722 100644
index 7dee17e52a5b23ba4d8089482b39215041a64579..602deb6b456de6cdefc480bf1aab959f9d60007d 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1228,6 +1228,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1238,6 +1238,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
});
isOversleep = false;MinecraftTimings.serverOversleep.stopTiming();
// Paper end
@ -17,7 +17,7 @@ index dd207a5138c4933c281255f4135f42b8fb0351d2..f07579d5b2450e7f972e0a942287ea12
++this.ticks;
this.b(booleansupplier);
@@ -1271,6 +1272,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1281,6 +1282,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
// Paper end

Datei anzeigen

@ -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 f07579d5b2450e7f972e0a942287ea1205740722..b704401da2832601dd45d3c29e950cb52033a3fd 100644
index 602deb6b456de6cdefc480bf1aab959f9d60007d..5020b1ef1e0fc08a00a40aecfd3eeb74348865d1 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2181,7 +2181,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -2191,7 +2191,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
// CraftBukkit start
@Override
public boolean isMainThread() {

Datei anzeigen

@ -21,10 +21,10 @@ index 38d25a12c6a52d8a83214e2a0f43a218cf15ceac..ffe9b1a63d78925e1d77b9e730aef42f
+ }
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index b704401da2832601dd45d3c29e950cb52033a3fd..90eb5d8ed7698b5e19d38cec647c1bcbc15532f4 100644
index 5020b1ef1e0fc08a00a40aecfd3eeb74348865d1..4605b26cedbd0478b41e976f4b48ad78f12e37ff 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -707,35 +707,36 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -717,35 +717,36 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
// CraftBukkit start
public void loadSpawn(WorldLoadListener worldloadlistener, WorldServer worldserver) {

Datei anzeigen

@ -29,7 +29,7 @@ index ffe9b1a63d78925e1d77b9e730aef42fed6d58fa..1278d09f70c1e97607ef20d87a178dc2
+ }
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 90eb5d8ed7698b5e19d38cec647c1bcbc15532f4..78fc9046c64f612dfc56431ce6ea0e1cc7d66f15 100644
index 4605b26cedbd0478b41e976f4b48ad78f12e37ff..4da16809f8f084fc4af4c50b5232914ea8aee04e 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -262,6 +262,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -40,7 +40,7 @@ index 90eb5d8ed7698b5e19d38cec647c1bcbc15532f4..78fc9046c64f612dfc56431ce6ea0e1c
public CommandDispatcher vanillaCommandDispatcher;
private boolean forceTicks;
// CraftBukkit end
@@ -1247,14 +1248,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1257,14 +1258,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.serverPing.b().a(agameprofile);
}

Datei anzeigen

@ -2348,10 +2348,10 @@ index 191a74bd9b894f9d64d0a55747cb17e07ceef597..1732fc552c290d294b68d6f92f2a58d9
DedicatedServer dedicatedserver1 = new DedicatedServer(optionset, datapackconfiguration1, thread, iregistrycustom_dimension, convertable_conversionsession, resourcepackrepository, datapackresources, null, dedicatedserversettings, DataConverterRegistry.a(), minecraftsessionservice, gameprofilerepository, usercache, WorldLoadListenerLogger::new);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 78fc9046c64f612dfc56431ce6ea0e1cc7d66f15..d2b81e14f8f58f5746a5577e23357d26f22e74fe 100644
index 4da16809f8f084fc4af4c50b5232914ea8aee04e..74c4462bc32e966055732944dfb931e75d7fad1f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -911,7 +911,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -921,7 +921,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.getUserCache().b(false); // Paper
}
// Spigot end

Datei anzeigen

@ -7,10 +7,10 @@ If the Bukkit generator already has a spawn, use it immediately instead
of spending time generating one that we won't use
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index d2b81e14f8f58f5746a5577e23357d26f22e74fe..705dad5092cb5f7355eeac9af395093d0a7a2212 100644
index 74c4462bc32e966055732944dfb931e75d7fad1f..b3401b59e0b99b32e3a600b3c33163a85f7c3ab2 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -619,12 +619,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -629,12 +629,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
} else if (flag1) {
iworlddataserver.setSpawn(BlockPosition.ZERO.up(), 0.0F);
} else {
@ -24,7 +24,7 @@ index d2b81e14f8f58f5746a5577e23357d26f22e74fe..705dad5092cb5f7355eeac9af395093d
// CraftBukkit start
if (worldserver.generator != null) {
Random rand = new Random(worldserver.getSeed());
@@ -640,6 +635,15 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -650,6 +645,15 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
}
// CraftBukkit end

Datei anzeigen

@ -31,7 +31,7 @@ index edda2121f8c1046478beaa77030ebb36d403b334..7fbd501d70dccf869a4454e2789a5d68
+ }
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 705dad5092cb5f7355eeac9af395093d0a7a2212..bf6fbb8e80eb64bdfdf29347b794f01ace31cec0 100644
index b3401b59e0b99b32e3a600b3c33163a85f7c3ab2..6dd9d35eb7f1424edaea43521ab2ab4dbe786b48 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -128,6 +128,7 @@ import net.minecraft.world.level.WorldSettings;
@ -42,7 +42,7 @@ index 705dad5092cb5f7355eeac9af395093d0a7a2212..bf6fbb8e80eb64bdfdf29347b794f01a
import net.minecraft.world.level.border.IWorldBorderListener;
import net.minecraft.world.level.border.WorldBorder;
import net.minecraft.world.level.chunk.ChunkGenerator;
@@ -1351,6 +1352,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1361,6 +1362,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
while (iterator.hasNext()) {
WorldServer worldserver = (WorldServer) iterator.next();
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper

Datei anzeigen

@ -28,10 +28,10 @@ index 6c8e9d498c9a30a1aa88494ba09c3cae012a8fa1..cd248eb6be663e8be33f2c3c6b06b77b
+ }
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 039c76a07bae4eec407e06adf077d1887919e9d8..2d3da64041849fed4a28204c6aaf3a1c8a8aa905 100644
index 835f84c2d33e48b2bcdaed822c7a50f3431bc323..31f09291015e805379ee55360bbf262ec371f493 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -766,7 +766,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -776,7 +776,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.executeModerately();
// CraftBukkit end
worldloadlistener.b();

Datei anzeigen

@ -56,10 +56,10 @@ index da93d38fe63035e4ff198ada84a4431f52d97c01..ddbc8cb712c50038922eded75dd6ca85
+ }
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 2d3da64041849fed4a28204c6aaf3a1c8a8aa905..fd07b682bec1bb534f42350ef95c7da7191b027e 100644
index 31f09291015e805379ee55360bbf262ec371f493..5563fea8b2af7b681bc76c51898100e9915a9e7f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1046,6 +1046,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1056,6 +1056,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
// Paper end
tickSection = curTime;
}
@ -67,7 +67,7 @@ index 2d3da64041849fed4a28204c6aaf3a1c8a8aa905..fd07b682bec1bb534f42350ef95c7da7
// Spigot end
//MinecraftServer.currentTick = (int) (System.currentTimeMillis() / 50); // CraftBukkit // Paper - don't overwrite current tick time
@@ -1115,7 +1116,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1125,7 +1126,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
@ -76,7 +76,7 @@ index 2d3da64041849fed4a28204c6aaf3a1c8a8aa905..fd07b682bec1bb534f42350ef95c7da7
// CraftBukkit start
if (isOversleep) return canOversleep();// Paper - because of our changes, this logic is broken
return this.forceTicks || this.isEntered() || SystemUtils.getMonotonicMillis() < (this.X ? this.W : this.nextTick);
@@ -1145,6 +1146,23 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1155,6 +1156,23 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
});
}
@ -100,7 +100,7 @@ index 2d3da64041849fed4a28204c6aaf3a1c8a8aa905..fd07b682bec1bb534f42350ef95c7da7
@Override
public TickTask postToMainThread(Runnable runnable) {
return new TickTask(this.ticks, runnable);
@@ -1231,6 +1249,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1241,6 +1259,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
// Paper start - move oversleep into full server tick
isOversleep = true;MinecraftTimings.serverOversleep.startTiming();
this.awaitTasks(() -> {
@ -108,7 +108,7 @@ index 2d3da64041849fed4a28204c6aaf3a1c8a8aa905..fd07b682bec1bb534f42350ef95c7da7
return !this.canOversleep();
});
isOversleep = false;MinecraftTimings.serverOversleep.stopTiming();
@@ -1309,13 +1328,16 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1319,13 +1338,16 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
protected void b(BooleanSupplier booleansupplier) {
@ -125,7 +125,7 @@ index 2d3da64041849fed4a28204c6aaf3a1c8a8aa905..fd07b682bec1bb534f42350ef95c7da7
this.methodProfiler.exitEnter("levels");
Iterator iterator = this.getWorlds().iterator();
@@ -1326,7 +1348,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1336,7 +1358,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
processQueue.remove().run();
}
MinecraftTimings.processQueueTimer.stopTiming(); // Spigot
@ -134,7 +134,7 @@ index 2d3da64041849fed4a28204c6aaf3a1c8a8aa905..fd07b682bec1bb534f42350ef95c7da7
MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper
// Send time updates to everyone, it will get the right time from the world the player is in.
// Paper start - optimize time updates
@@ -1368,9 +1390,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1378,9 +1400,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.methodProfiler.enter("tick");
try {

Datei anzeigen

@ -87,7 +87,7 @@ index ddbc8cb712c50038922eded75dd6ca85fe851078..78271b400c79578d043b20a5389a37b1
version = getInt("config-version", 20);
set("config-version", 20);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index fd07b682bec1bb534f42350ef95c7da7191b027e..ed5712cc7c070f44500e5c1a1d41cd26bdd13fec 100644
index 5563fea8b2af7b681bc76c51898100e9915a9e7f..e302c84db5d129c3d302b6361c80af88806c35b4 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -218,6 +218,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -102,7 +102,7 @@ index fd07b682bec1bb534f42350ef95c7da7191b027e..ed5712cc7c070f44500e5c1a1d41cd26
@Nullable
private KeyPair H;
@Nullable
@@ -1320,6 +1325,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1330,6 +1335,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.ag = this.ag * 0.8F + (float) l / 1000000.0F * 0.19999999F;
long i1 = SystemUtils.getMonotonicNanos();
@ -115,7 +115,7 @@ index fd07b682bec1bb534f42350ef95c7da7191b027e..ed5712cc7c070f44500e5c1a1d41cd26
this.circularTimer.a(i1 - i);
this.methodProfiler.exit();
org.spigotmc.WatchdogThread.tick(); // Spigot
@@ -2292,4 +2303,30 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -2302,4 +2313,30 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
public ITextFilter a(EntityPlayer entityplayer) {
return null;
}

Datei anzeigen

@ -83,7 +83,7 @@ index 397194b3e90c9df39cfae17b401c7ac891b0dbb7..61b4c42e95994343772a91640b243b8e
a(SystemUtils.e);
a(SystemUtils.f);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index ed5712cc7c070f44500e5c1a1d41cd26bdd13fec..fe3fe04981a0cc1ddeac2e030ee754baae4e8409 100644
index e302c84db5d129c3d302b6361c80af88806c35b4..701dcbf9d3f23b63d740fbe10a642080128b7f62 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -270,7 +270,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -104,7 +104,7 @@ index ed5712cc7c070f44500e5c1a1d41cd26bdd13fec..fe3fe04981a0cc1ddeac2e030ee754ba
public static <S extends MinecraftServer> S a(Function<Thread, S> function) {
AtomicReference<S> atomicreference = new AtomicReference();
Thread thread = new Thread(() -> {
@@ -842,6 +844,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -852,6 +854,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
// CraftBukkit start
private boolean hasStopped = false;
@ -112,7 +112,7 @@ index ed5712cc7c070f44500e5c1a1d41cd26bdd13fec..fe3fe04981a0cc1ddeac2e030ee754ba
private final Object stopLock = new Object();
public final boolean hasStopped() {
synchronized (stopLock) {
@@ -856,6 +859,23 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -866,6 +869,23 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
if (hasStopped) return;
hasStopped = true;
}
@ -136,7 +136,7 @@ index ed5712cc7c070f44500e5c1a1d41cd26bdd13fec..fe3fe04981a0cc1ddeac2e030ee754ba
// CraftBukkit end
MinecraftServer.LOGGER.info("Stopping server");
MinecraftTimings.stopServer(); // Paper
@@ -921,7 +941,18 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -931,7 +951,18 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.getUserCache().b(false); // Paper
}
// Spigot end
@ -155,7 +155,7 @@ index ed5712cc7c070f44500e5c1a1d41cd26bdd13fec..fe3fe04981a0cc1ddeac2e030ee754ba
}
public String getServerIp() {
@@ -1014,6 +1045,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1024,6 +1055,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
protected void w() {
try {
@ -163,7 +163,7 @@ index ed5712cc7c070f44500e5c1a1d41cd26bdd13fec..fe3fe04981a0cc1ddeac2e030ee754ba
if (this.init()) {
this.nextTick = SystemUtils.getMonotonicMillis();
this.serverPing.setMOTD(new ChatComponentText(this.motd));
@@ -1021,6 +1053,18 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1031,6 +1063,18 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.a(this.serverPing);
// Spigot start
@ -182,7 +182,7 @@ index ed5712cc7c070f44500e5c1a1d41cd26bdd13fec..fe3fe04981a0cc1ddeac2e030ee754ba
org.spigotmc.WatchdogThread.hasStarted = true; // Paper
Arrays.fill( recentTps, 20 );
long start = System.nanoTime(), curTime, tickSection = start; // Paper - Further improve server tick loop
@@ -1076,6 +1120,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1086,6 +1130,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.a((CrashReport) null);
}
} catch (Throwable throwable) {
@ -195,7 +195,7 @@ index ed5712cc7c070f44500e5c1a1d41cd26bdd13fec..fe3fe04981a0cc1ddeac2e030ee754ba
MinecraftServer.LOGGER.error("Encountered an unexpected exception", throwable);
// Spigot Start
if ( throwable.getCause() != null )
@@ -1107,14 +1157,14 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1117,14 +1167,14 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
} catch (Throwable throwable1) {
MinecraftServer.LOGGER.error("Exception stopping the server", throwable1);
} finally {
@ -213,7 +213,7 @@ index ed5712cc7c070f44500e5c1a1d41cd26bdd13fec..fe3fe04981a0cc1ddeac2e030ee754ba
}
}
@@ -1170,6 +1220,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1180,6 +1230,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@Override
public TickTask postToMainThread(Runnable runnable) {
@ -226,7 +226,7 @@ index ed5712cc7c070f44500e5c1a1d41cd26bdd13fec..fe3fe04981a0cc1ddeac2e030ee754ba
return new TickTask(this.ticks, runnable);
}
@@ -1412,6 +1468,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1422,6 +1478,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
try {
crashreport = CrashReport.a(throwable, "Exception ticking world");
} catch (Throwable t) {
@ -234,7 +234,7 @@ index ed5712cc7c070f44500e5c1a1d41cd26bdd13fec..fe3fe04981a0cc1ddeac2e030ee754ba
throw new RuntimeException("Error generating crash report", t);
}
// Spigot End
@@ -1869,7 +1926,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1879,7 +1936,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.resourcePackRepository.a(collection);
this.saveData.a(a(this.resourcePackRepository));
datapackresources.i();

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Use distance map to optimise entity tracker
Use the distance map to find candidate players for tracking.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index fe3fe04981a0cc1ddeac2e030ee754baae4e8409..580e08347d06e6b4b9558b3f25f1f095c41fcf91 100644
index 701dcbf9d3f23b63d740fbe10a642080128b7f62..b94f7f4fed3d0d5bab2a9c9b6c7f3fb2f0311a50 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1642,6 +1642,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1652,6 +1652,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
}
@ -18,7 +18,7 @@ index fe3fe04981a0cc1ddeac2e030ee754baae4e8409..580e08347d06e6b4b9558b3f25f1f095
return i;
}
diff --git a/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java
index bcc1103e21cc10d5b405a2b89f3dfe78eda271bd..4c82266656d0a60a166faa082a9aaaaed7f062d3 100644
index 6110d7723b70df5380338a42b5cbff3446294bac..b64aa6c9ce906b08e43891f8c465fa4e8b2a8906 100644
--- a/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java
+++ b/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java
@@ -101,6 +101,7 @@ public class EntityTrackerEntry {

Datei anzeigen

@ -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 580e08347d06e6b4b9558b3f25f1f095c41fcf91..2deeaf23b8dd0ee5dc126797b271681a5f7880df 100644
index b94f7f4fed3d0d5bab2a9c9b6c7f3fb2f0311a50..7ee8074a356df5db227bca78a545d14c5e8794e8 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -882,6 +882,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -892,6 +892,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
// CraftBukkit start
if (this.server != null) {
this.server.disablePlugins();

Datei anzeigen

@ -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 2deeaf23b8dd0ee5dc126797b271681a5f7880df..3867e1d9a3d3648aaea46816643c0d8f070baf5d 100644
index 7ee8074a356df5db227bca78a545d14c5e8794e8..2c66ea1bda456da10d70ed180547bf73b7942f8b 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1635,11 +1635,15 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1645,11 +1645,15 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
}
@ -72,7 +72,7 @@ index ec1f36736d79d4054ad7ff4da4e3659f35c811d6..c4df472050622eb2469b2ddb4d2ed917
@Override
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
index 134f1f811d7d822e1871d306129ae0cbb1d1c8b2..316cb57870a6a3f568bb3d353540283b9d785976 100644
index 1b399bcd366f66d6b5e0d54e3a5e34f9e96f5a41..dc3f874b2a19d2d2c3890b7e1125cd1ec14cf673 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -3027,7 +3027,7 @@ public class PlayerConnection implements PacketListenerPlayIn {

Datei anzeigen

@ -25,10 +25,10 @@ index b67ba8f75e4a3358d7c2462918b85b0bf9b5a922..fdbd8b89bb8bf3b61f60b812b90483c9
+ }
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 3867e1d9a3d3648aaea46816643c0d8f070baf5d..ca284cd0419f5d99efa7e73c19fa1591261d8d5b 100644
index 2c66ea1bda456da10d70ed180547bf73b7942f8b..07dd48fd300ac72edfa768632287c49ecf57fa75 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1337,9 +1337,15 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1347,9 +1347,15 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
//if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit // Paper - move down
//MinecraftServer.LOGGER.debug("Autosave started"); // Paper
serverAutoSave = (autosavePeriod > 0 && this.ticks % autosavePeriod == 0); // Paper

Datei anzeigen

@ -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 ca284cd0419f5d99efa7e73c19fa1591261d8d5b..97085ae04f77b79a367cd328905d4b68ebaca133 100644
index 07dd48fd300ac72edfa768632287c49ecf57fa75..604646affe004fce68a61640326fdaefeae72802 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1943,6 +1943,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1953,6 +1953,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.getPlayerList().reload();
this.customFunctionData.a(this.dataPackResources.a());
this.ak.a(this.dataPackResources.h());

Datei anzeigen

@ -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 97085ae04f77b79a367cd328905d4b68ebaca133..6d00525b24efa76931ff4dd2bdf1947b1466930a 100644
index 604646affe004fce68a61640326fdaefeae72802..cd1cd1d4adbe6d304fd7634fa2fe712a0874e189 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2008,6 +2008,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -2018,6 +2018,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
if (this.aN()) {
PlayerList playerlist = commandlistenerwrapper.getServer().getPlayerList();
WhiteList whitelist = playerlist.getWhitelist();

Datei anzeigen

@ -59,7 +59,7 @@ index 0000000000000000000000000000000000000000..c6ea429819c07e7f4bc257cad73463a0
+ }
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 6d00525b24efa76931ff4dd2bdf1947b1466930a..732237bf3a950238e7edc5593691c8bff43c1c91 100644
index cd1cd1d4adbe6d304fd7634fa2fe712a0874e189..6ae5dc6fe52fb172bec709d4ab80c624535b8e43 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -181,6 +181,7 @@ import org.bukkit.event.server.ServerLoadEvent;
@ -70,7 +70,7 @@ index 6d00525b24efa76931ff4dd2bdf1947b1466930a..732237bf3a950238e7edc5593691c8bf
public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTask> implements IMojangStatistics, ICommandListener, AutoCloseable {
@@ -1065,6 +1066,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1075,6 +1076,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
LOGGER.info("Done ({})! For help, type \"help\"", doneTime);
// Paper end

Datei anzeigen

@ -5,7 +5,7 @@ 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 732237bf3a950238e7edc5593691c8bff43c1c91..c4da751bed3014a5521ac0014b07c139b69b1187 100644
index 6ae5dc6fe52fb172bec709d4ab80c624535b8e43..3b5df83d3a7d12fb23ac488a8936e1b4921fb5fd 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2,9 +2,6 @@ package net.minecraft.server;
@ -26,7 +26,7 @@ index 732237bf3a950238e7edc5593691c8bff43c1c91..c4da751bed3014a5521ac0014b07c139
public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTask> implements IMojangStatistics, ICommandListener, AutoCloseable {
@@ -1924,7 +1922,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1934,7 +1932,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
return this.customFunctionData;
}
@ -40,7 +40,7 @@ index 732237bf3a950238e7edc5593691c8bff43c1c91..c4da751bed3014a5521ac0014b07c139
CompletableFuture<Void> completablefuture = CompletableFuture.supplyAsync(() -> {
Stream<String> stream = collection.stream(); // CraftBukkit - decompile error
ResourcePackRepository resourcepackrepository = this.resourcePackRepository;
@@ -1940,6 +1944,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1950,6 +1954,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.resourcePackRepository.a(collection);
this.saveData.a(a(this.resourcePackRepository));
datapackresources.i();

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] EntityMoveEvent
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index c4da751bed3014a5521ac0014b07c139b69b1187..5da58830459d2ff10e7fde28b41995699134459f 100644
index 3b5df83d3a7d12fb23ac488a8936e1b4921fb5fd..fdbe97912f53cfba5ed23ef05e0ad4b9dd010f54 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -12,6 +12,7 @@ import com.mojang.datafixers.DataFixer;
@ -16,7 +16,7 @@ index c4da751bed3014a5521ac0014b07c139b69b1187..5da58830459d2ff10e7fde28b4199569
import it.unimi.dsi.fastutil.longs.LongIterator;
import java.awt.image.BufferedImage;
import java.io.BufferedWriter;
@@ -1448,6 +1449,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1458,6 +1459,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
while (iterator.hasNext()) {
WorldServer worldserver = (WorldServer) iterator.next();
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper

Datei anzeigen

@ -29,7 +29,7 @@ index 0000000000000000000000000000000000000000..2d5494d2813b773e60ddba6790b750a9
+ }
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 5da58830459d2ff10e7fde28b41995699134459f..c372e6897c73fad6f9c478cec9f58303fb0cce17 100644
index fdbe97912f53cfba5ed23ef05e0ad4b9dd010f54..2aaddbe9cad6433f0243c658716825641b6c64c8 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -13,6 +13,7 @@ import io.netty.buffer.ByteBuf;
@ -40,7 +40,7 @@ index 5da58830459d2ff10e7fde28b41995699134459f..c372e6897c73fad6f9c478cec9f58303
import it.unimi.dsi.fastutil.longs.LongIterator;
import java.awt.image.BufferedImage;
import java.io.BufferedWriter;
@@ -845,6 +846,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -855,6 +856,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
// CraftBukkit start
private boolean hasStopped = false;
public volatile boolean hasFullyShutdown = false; // Paper
@ -48,7 +48,7 @@ index 5da58830459d2ff10e7fde28b41995699134459f..c372e6897c73fad6f9c478cec9f58303
private final Object stopLock = new Object();
public final boolean hasStopped() {
synchronized (stopLock) {
@@ -859,6 +861,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -869,6 +871,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
if (hasStopped) return;
hasStopped = true;
}
@ -56,7 +56,7 @@ index 5da58830459d2ff10e7fde28b41995699134459f..c372e6897c73fad6f9c478cec9f58303
// Paper start - kill main thread, and kill it hard
shutdownThread = Thread.currentThread();
org.spigotmc.WatchdogThread.doStop(); // Paper
@@ -975,6 +978,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -985,6 +988,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
public void safeShutdown(boolean flag, boolean isRestarting) {
this.isRunning = false;
this.isRestarting = isRestarting;

Datei anzeigen

@ -5,10 +5,10 @@ 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 c372e6897c73fad6f9c478cec9f58303fb0cce17..0db00322ebf600245bf9311e547c8c743a60a173 100644
index 2aaddbe9cad6433f0243c658716825641b6c64c8..8ee622108cebff2bba8a44fb255a3b6c03ed0220 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2030,7 +2030,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -2040,7 +2040,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
EntityPlayer entityplayer = (EntityPlayer) iterator.next();
if (!whitelist.isWhitelisted(entityplayer.getProfile())) {

@ -1 +1 @@
Subproject commit 35124087d2993a66a899a209e01fe467bbeebaa1
Subproject commit 9294ebbf051ad7340d7e37265568884439973a4a