Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-14 20:10:05 +01:00
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9648)
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 Bukkit Changes: 6b34da8f SPIGOT-7467: Add getAddress to RemoteConsoleCommandSender CraftBukkit Changes: db4ba2897 SPIGOT-7467: Add getAddress to RemoteConsoleCommandSender 4f7ff4dec PR-1246: Add missing AbstractTestingBase to tests which need them f70a7b68d SPIGOT-7465, MC-264979: Fresh installations print NoSuchFileException for server.properties 8ef7afef6 PR-1240: Call BlockGrowEvent for vines that are growing on additional sides of an existing vine block Spigot Changes: d2eba2c8 Rebuild patches
Dieser Commit ist enthalten in:
Ursprung
0c0a480d82
Commit
b8edb0e130
@ -4585,10 +4585,10 @@ index e7240acad17dc9c0d93f2792cc0d90c1855ac436..35e7f8e7b19c217fa5f3f55abb0f8b9c
|
||||
String s = (String) Optional.ofNullable((String) optionset.valueOf("world")).orElse(dedicatedserversettings.getProperties().levelName);
|
||||
LevelStorageSource convertable = LevelStorageSource.createDefault(file.toPath());
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index c7d90803c302fc3cb06f44abf12d86c7e02944cd..a6e12acf65068a2eaea75a7df877f6145a229195 100644
|
||||
index 60e683ac0adaa192c502d059f6e448d0a23e8a09..6877a10fe56b46cf3fb7ccccf5a55e57d03048e9 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -295,6 +295,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -294,6 +294,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
private static final int SAMPLE_INTERVAL = 100;
|
||||
public final double[] recentTps = new double[ 3 ];
|
||||
// Spigot end
|
||||
@ -4596,7 +4596,7 @@ index c7d90803c302fc3cb06f44abf12d86c7e02944cd..a6e12acf65068a2eaea75a7df877f614
|
||||
|
||||
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
|
||||
AtomicReference<S> atomicreference = new AtomicReference();
|
||||
@@ -385,6 +386,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -384,6 +385,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
}
|
||||
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
|
||||
@ -4643,7 +4643,7 @@ index 71e7beac6cf1e0f813d5ff3e9c51c13491be7139..f1cc27809c1e8612f7c4fa912f5e39c0
|
||||
|
||||
@Nullable
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index a58c0be585a2761d5b781a23934b956def221c5b..2ac30ef2dd72582f2b7f6a05b1f94b12b44fafc9 100644
|
||||
index ea5657d31f51469d6c0b9463fcc5cea9c270fb2e..546ad678af2705e3956f5f139aa847354a6fdeae 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -183,6 +183,10 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@ -4658,10 +4658,10 @@ index a58c0be585a2761d5b781a23934b956def221c5b..2ac30ef2dd72582f2b7f6a05b1f94b12
|
||||
this.setPvpAllowed(dedicatedserverproperties.pvp);
|
||||
this.setFlightAllowed(dedicatedserverproperties.allowFlight);
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/Settings.java b/src/main/java/net/minecraft/server/dedicated/Settings.java
|
||||
index 635c1164defec812af378a69d45c7ae0aed5024f..9dde5b89e6de9d470b0c0b08e3aa6c471cd075fe 100644
|
||||
index 37ab411817008d4e6194e177d88d50931e53b42e..ca23639f15107ccd43b874ae38fa37279b827a8f 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/Settings.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/Settings.java
|
||||
@@ -114,6 +114,7 @@ public abstract class Settings<T extends Settings<T>> {
|
||||
@@ -119,6 +119,7 @@ public abstract class Settings<T extends Settings<T>> {
|
||||
try {
|
||||
// CraftBukkit start - Don't attempt writing to file if it's read only
|
||||
if (path.toFile().exists() && !path.toFile().canWrite()) {
|
||||
|
@ -94,10 +94,10 @@ index 41d6569c00db3d467f6e90d33ebd261529b89f4c..5f051cb22ae77f4d8994b07ac5b963bd
|
||||
};
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index a6e12acf65068a2eaea75a7df877f6145a229195..b45950f3fec4540f9a65c7704a34125d9e588dcb 100644
|
||||
index 6877a10fe56b46cf3fb7ccccf5a55e57d03048e9..8c7d762219e848387b153fb50553b7de58bc9627 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1775,7 +1775,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);
|
||||
|
@ -5538,10 +5538,10 @@ index e6c4379b0fd7c1338e1713281cd9515cb54acecb..a63e7ee5c42bd51312155feab31c6ec4
|
||||
throw new SkipPacketException(var10);
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index b45950f3fec4540f9a65c7704a34125d9e588dcb..d2a858f4e15920649aaa39fdebfad5b50a788cc5 100644
|
||||
index 8c7d762219e848387b153fb50553b7de58bc9627..e896917b3546f9d075179198c6dcd714f6cddd50 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
|
||||
@@ -295,6 +295,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public final double[] recentTps = new double[ 3 ];
|
||||
// Spigot end
|
||||
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations;
|
||||
@ -5549,7 +5549,7 @@ index b45950f3fec4540f9a65c7704a34125d9e588dcb..d2a858f4e15920649aaa39fdebfad5b5
|
||||
|
||||
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
|
||||
AtomicReference<S> atomicreference = new AtomicReference();
|
||||
@@ -929,6 +930,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -928,6 +929,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
MinecraftServer.LOGGER.error("Failed to unlock level {}", this.storageSource.getLevelId(), ioexception1);
|
||||
}
|
||||
// Spigot start
|
||||
@ -5559,7 +5559,7 @@ index b45950f3fec4540f9a65c7704a34125d9e588dcb..d2a858f4e15920649aaa39fdebfad5b5
|
||||
if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) {
|
||||
MinecraftServer.LOGGER.info("Saving usercache.json");
|
||||
this.getProfileCache().save();
|
||||
@@ -993,6 +997,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -992,6 +996,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.lastOverloadWarning = this.nextTickTime;
|
||||
}
|
||||
|
||||
@ -5567,7 +5567,7 @@ index b45950f3fec4540f9a65c7704a34125d9e588dcb..d2a858f4e15920649aaa39fdebfad5b5
|
||||
if ( tickCount++ % MinecraftServer.SAMPLE_INTERVAL == 0 )
|
||||
{
|
||||
double currentTps = 1E3 / ( curTime - tickSection ) * MinecraftServer.SAMPLE_INTERVAL;
|
||||
@@ -1210,7 +1215,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1209,7 +1214,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
MinecraftServer.LOGGER.debug("Autosave finished");
|
||||
SpigotTimings.worldSaveTimer.stopTiming(); // Spigot
|
||||
}
|
||||
@ -5576,7 +5576,7 @@ index b45950f3fec4540f9a65c7704a34125d9e588dcb..d2a858f4e15920649aaa39fdebfad5b5
|
||||
this.profiler.push("tallying");
|
||||
long j = this.tickTimes[this.tickCount % 100] = Util.getNanos() - i;
|
||||
|
||||
@@ -1300,6 +1305,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1299,6 +1304,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
try {
|
||||
worldserver.timings.doTick.startTiming(); // Spigot
|
||||
worldserver.tick(shouldKeepTicking);
|
||||
|
@ -2189,7 +2189,7 @@ index 5f051cb22ae77f4d8994b07ac5b963bd0ff05673..7952635a963e28cb670c8f4869664103
|
||||
list.forEach((loader) -> {
|
||||
Registry<?> registry = loader.getFirst();
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index d2a858f4e15920649aaa39fdebfad5b50a788cc5..049755ed087a764cd1f0d7df82c21eef7538fbbf 100644
|
||||
index e896917b3546f9d075179198c6dcd714f6cddd50..58457e3493100e9726288ae7b027ab47947bd4d4 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -194,6 +194,7 @@ import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
||||
@ -2210,7 +2210,7 @@ index d2a858f4e15920649aaa39fdebfad5b50a788cc5..049755ed087a764cd1f0d7df82c21eef
|
||||
private int playerIdleTimeout;
|
||||
public final long[] tickTimes;
|
||||
@Nullable
|
||||
@@ -1232,7 +1232,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1231,7 +1231,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
private ServerStatus buildServerStatus() {
|
||||
ServerStatus.Players serverping_serverpingplayersample = this.buildPlayerStatus();
|
||||
|
||||
@ -2219,7 +2219,7 @@ index d2a858f4e15920649aaa39fdebfad5b50a788cc5..049755ed087a764cd1f0d7df82c21eef
|
||||
}
|
||||
|
||||
private ServerStatus.Players buildPlayerStatus() {
|
||||
@@ -1261,6 +1261,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1260,6 +1260,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
SpigotTimings.schedulerTimer.startTiming(); // Spigot
|
||||
this.server.getScheduler().mainThreadHeartbeat(this.tickCount); // CraftBukkit
|
||||
SpigotTimings.schedulerTimer.stopTiming(); // Spigot
|
||||
@ -2227,7 +2227,7 @@ index d2a858f4e15920649aaa39fdebfad5b50a788cc5..049755ed087a764cd1f0d7df82c21eef
|
||||
this.profiler.push("commandFunctions");
|
||||
SpigotTimings.commandFunctionsTimer.startTiming(); // Spigot
|
||||
this.getFunctions().tick();
|
||||
@@ -1626,10 +1627,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1625,10 +1626,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public abstract boolean isCommandBlockEnabled();
|
||||
|
||||
public String getMotd() {
|
||||
@ -2249,7 +2249,7 @@ index d2a858f4e15920649aaa39fdebfad5b50a788cc5..049755ed087a764cd1f0d7df82c21eef
|
||||
this.motd = motd;
|
||||
}
|
||||
|
||||
@@ -2343,39 +2354,29 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2342,39 +2353,29 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public void logChatMessage(Component message, ChatType.Bound params, @Nullable String prefix) {
|
||||
@ -3474,10 +3474,10 @@ index f3cb4102ab223f379f60dac317df7da1fab812a8..324e6d1a4fadd3e557e4ba05f04e6a58
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java
|
||||
index 03027fe2b7ffe4c7ce7f1bb4f56051a4743c7f01..a6612cc0ea87aeb8e87521ff7b5fe58c7b06b9ef 100644
|
||||
index d545a3fa3d7728f9d4761175fc0acaa7a6fe3b01..ad731c5f76f19394866a121c64d4169ea8fb8cd7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java
|
||||
@@ -29,6 +29,13 @@ public class CraftRemoteConsoleCommandSender extends ServerCommandSender impleme
|
||||
@@ -39,6 +39,13 @@ public class CraftRemoteConsoleCommandSender extends ServerCommandSender impleme
|
||||
return "Rcon";
|
||||
}
|
||||
|
||||
|
@ -732,7 +732,7 @@ index fc4dcd801480fe6d89a985de411baa9a3a66f6ef..4a1148a76020089caf01f888f87afdbb
|
||||
} 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 049755ed087a764cd1f0d7df82c21eef7538fbbf..6994fff6ce9b946adba7dabf84b165f404495257 100644
|
||||
index 58457e3493100e9726288ae7b027ab47947bd4d4..73c3070b2e300e0ab29ac1db1631023cef7970f8 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -189,7 +189,7 @@ import org.bukkit.event.player.AsyncPlayerChatPreviewEvent;
|
||||
@ -744,7 +744,7 @@ index 049755ed087a764cd1f0d7df82c21eef7538fbbf..6994fff6ce9b946adba7dabf84b165f4
|
||||
|
||||
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements CommandSource, AutoCloseable {
|
||||
|
||||
@@ -861,6 +861,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -860,6 +860,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
MinecraftServer.LOGGER.info("Stopping server");
|
||||
@ -752,7 +752,7 @@ index 049755ed087a764cd1f0d7df82c21eef7538fbbf..6994fff6ce9b946adba7dabf84b165f4
|
||||
// CraftBukkit start
|
||||
if (this.server != null) {
|
||||
this.server.disablePlugins();
|
||||
@@ -1099,9 +1100,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1098,9 +1099,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
private boolean haveTime() {
|
||||
// CraftBukkit start
|
||||
@ -774,7 +774,7 @@ index 049755ed087a764cd1f0d7df82c21eef7538fbbf..6994fff6ce9b946adba7dabf84b165f4
|
||||
private void executeModerately() {
|
||||
this.runAllTasks();
|
||||
java.util.concurrent.locks.LockSupport.parkNanos("executing tasks", 1000L);
|
||||
@@ -1109,9 +1122,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1108,9 +1121,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// CraftBukkit end
|
||||
|
||||
protected void waitUntilNextTick() {
|
||||
@ -786,7 +786,7 @@ index 049755ed087a764cd1f0d7df82c21eef7538fbbf..6994fff6ce9b946adba7dabf84b165f4
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1196,9 +1209,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1195,9 +1208,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public void onServerExit() {}
|
||||
|
||||
public void tickServer(BooleanSupplier shouldKeepTicking) {
|
||||
@ -805,7 +805,7 @@ index 049755ed087a764cd1f0d7df82c21eef7538fbbf..6994fff6ce9b946adba7dabf84b165f4
|
||||
++this.tickCount;
|
||||
this.tickChildren(shouldKeepTicking);
|
||||
if (i - this.lastServerStatus >= 5000000000L) {
|
||||
@@ -1207,15 +1228,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1206,15 +1227,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
if (this.autosavePeriod > 0 && this.tickCount % this.autosavePeriod == 0) { // CraftBukkit
|
||||
@ -826,7 +826,7 @@ index 049755ed087a764cd1f0d7df82c21eef7538fbbf..6994fff6ce9b946adba7dabf84b165f4
|
||||
this.profiler.push("tallying");
|
||||
long j = this.tickTimes[this.tickCount % 100] = Util.getNanos() - i;
|
||||
|
||||
@@ -1225,8 +1249,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1224,8 +1248,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.frameTimer.logFrameDuration(k - i);
|
||||
this.profiler.pop();
|
||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||
@ -836,7 +836,7 @@ index 049755ed087a764cd1f0d7df82c21eef7538fbbf..6994fff6ce9b946adba7dabf84b165f4
|
||||
}
|
||||
|
||||
private ServerStatus buildServerStatus() {
|
||||
@@ -1258,26 +1281,26 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1257,26 +1280,26 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public void tickChildren(BooleanSupplier shouldKeepTicking) {
|
||||
@ -870,7 +870,7 @@ index 049755ed087a764cd1f0d7df82c21eef7538fbbf..6994fff6ce9b946adba7dabf84b165f4
|
||||
// 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) {
|
||||
@@ -1285,7 +1308,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1284,7 +1307,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
|
||||
}
|
||||
}
|
||||
@ -879,7 +879,7 @@ index 049755ed087a764cd1f0d7df82c21eef7538fbbf..6994fff6ce9b946adba7dabf84b165f4
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
ServerLevel worldserver = (ServerLevel) iterator.next();
|
||||
@@ -1331,24 +1354,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1330,24 +1353,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
this.profiler.popPush("connection");
|
||||
@ -924,7 +924,7 @@ index 009ef03e520aeb57b29b5375a65634ed76aa9163..4a610b712acfe0b1b4dcf4988bc22c6a
|
||||
i = this.context.runTopCommand(function, source);
|
||||
} finally {
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 59eed41e1c6012650597f1faa85063a2d536873f..51eac8b7177db66c005e4eaca689cf96d10edeaa 100644
|
||||
index cfc4cad33d36e720f32b7ad6d1d4b3983f7aad39..14101c77fd9814a5d1e8e1bf0d8584f42086b051 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -58,8 +58,9 @@ import org.apache.logging.log4j.Level;
|
||||
@ -934,11 +934,11 @@ index 59eed41e1c6012650597f1faa85063a2d536873f..51eac8b7177db66c005e4eaca689cf96
|
||||
-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
||||
+import co.aikar.timings.MinecraftTimings; // Paper
|
||||
import org.bukkit.event.server.ServerCommandEvent;
|
||||
+import org.bukkit.craftbukkit.util.Waitable;
|
||||
+import org.bukkit.craftbukkit.util.Waitable; // Paper
|
||||
import org.bukkit.event.server.RemoteServerCommandEvent;
|
||||
// CraftBukkit end
|
||||
|
||||
@@ -404,7 +405,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -403,7 +404,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
}
|
||||
|
||||
public void handleConsoleInputs() {
|
||||
@ -947,7 +947,7 @@ index 59eed41e1c6012650597f1faa85063a2d536873f..51eac8b7177db66c005e4eaca689cf96
|
||||
while (!this.consoleInput.isEmpty()) {
|
||||
ConsoleInput servercommand = (ConsoleInput) this.consoleInput.remove(0);
|
||||
|
||||
@@ -419,7 +420,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -418,7 +419,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
@ -956,22 +956,28 @@ index 59eed41e1c6012650597f1faa85063a2d536873f..51eac8b7177db66c005e4eaca689cf96
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -667,6 +668,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -671,7 +672,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
}
|
||||
|
||||
@Override
|
||||
public String runCommand(String command) {
|
||||
+ Waitable[] waitableArray = new Waitable[1];
|
||||
this.rconConsoleSource.prepareForCommand();
|
||||
public String runCommand(RconConsoleSource rconConsoleSource, String s) {
|
||||
+ Waitable[] waitableArray = new Waitable[1]; // Paper
|
||||
rconConsoleSource.prepareForCommand();
|
||||
+ final java.util.concurrent.atomic.AtomicReference<String> command = new java.util.concurrent.atomic.AtomicReference<>(s); // Paper
|
||||
this.executeBlocking(() -> {
|
||||
// CraftBukkit start - fire RemoteServerCommandEvent
|
||||
@@ -675,10 +677,39 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
CommandSourceStack wrapper = rconConsoleSource.createCommandSourceStack();
|
||||
RemoteServerCommandEvent event = new RemoteServerCommandEvent(rconConsoleSource.getBukkitSender(wrapper), s);
|
||||
@@ -679,9 +682,40 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
if (event.isCancelled()) {
|
||||
return;
|
||||
}
|
||||
- ConsoleInput serverCommand = new ConsoleInput(event.getCommand(), wrapper);
|
||||
- server.dispatchServerCommand(event.getSender(), serverCommand);
|
||||
+
|
||||
+ // Paper start
|
||||
+ if (command.toLowerCase().startsWith("timings") && command.toLowerCase().matches("timings (report|paste|get|merged|seperate)")) {
|
||||
+ command.set(event.getCommand());
|
||||
+ if (event.getCommand().toLowerCase().startsWith("timings") && event.getCommand().toLowerCase().matches("timings (report|paste|get|merged|seperate)")) {
|
||||
+ org.bukkit.command.BufferedCommandSender sender = new org.bukkit.command.BufferedCommandSender();
|
||||
+ Waitable<String> waitable = new Waitable<String>() {
|
||||
+ Waitable<String> waitable = new Waitable<>() {
|
||||
+ @Override
|
||||
+ protected String evaluate() {
|
||||
+ return sender.getBuffer();
|
||||
@ -981,10 +987,9 @@ index 59eed41e1c6012650597f1faa85063a2d536873f..51eac8b7177db66c005e4eaca689cf96
|
||||
+ co.aikar.timings.Timings.generateReport(new co.aikar.timings.TimingsReportListener(sender, waitable));
|
||||
+ } else {
|
||||
+ // Paper end
|
||||
ConsoleInput serverCommand = new ConsoleInput(event.getCommand(), this.rconConsoleSource.createCommandSourceStack());
|
||||
server.dispatchServerCommand(remoteConsole, serverCommand);
|
||||
+ ConsoleInput serverCommand = new ConsoleInput(event.getCommand(), wrapper);
|
||||
+ server.dispatchServerCommand(event.getSender(), serverCommand);
|
||||
+ } // Paper
|
||||
// CraftBukkit end
|
||||
});
|
||||
+ // Paper start
|
||||
+ if (waitableArray[0] != null) {
|
||||
@ -993,17 +998,17 @@ index 59eed41e1c6012650597f1faa85063a2d536873f..51eac8b7177db66c005e4eaca689cf96
|
||||
+ try {
|
||||
+ return waitable.get();
|
||||
+ } catch (java.util.concurrent.ExecutionException e) {
|
||||
+ throw new RuntimeException("Exception processing rcon command " + command, e.getCause());
|
||||
+ throw new RuntimeException("Exception processing rcon command " + command.get(), e.getCause());
|
||||
+ } catch (InterruptedException e) {
|
||||
+ Thread.currentThread().interrupt(); // Maintain interrupted state
|
||||
+ throw new RuntimeException("Interrupted processing rcon command " + command, e);
|
||||
+ throw new RuntimeException("Interrupted processing rcon command " + command.get(), e);
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+ // Paper end
|
||||
return this.rconConsoleSource.getCommandResponse();
|
||||
return rconConsoleSource.getCommandResponse();
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index c943e64d70bab240f8dc733e78a185172664c5e4..a645263f148a25e5b4baeed51775eb8e7f596fe8 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
|
@ -15686,7 +15686,7 @@ index 0000000000000000000000000000000000000000..962d3cae6340fc11607b59355e291629
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
index 0083b66889bfb6d3c4e4219fc73f410477109e37..499b7e84a42517c9a82e27e425a8aefd9ad614ee 100644
|
||||
index 45f1436cdd4b81b621ab71e4336c2aa666572105..622684f50a12ddd412e2d6ff305407e7c13684bf 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
@@ -24,6 +24,45 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
@ -16831,10 +16831,10 @@ index 72c2f0bf9434e09a0dd51294d3a2200f1e0ed1b1..5d56c35d6d3478dbc53e4f5c3547d4dc
|
||||
DedicatedServer dedicatedserver1 = new DedicatedServer(optionset, worldLoader.get(), thread, convertable_conversionsession, resourcepackrepository, worldstem, dedicatedserversettings, DataFixers.getDataFixer(), services, LoggerChunkProgressListener::new);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 6994fff6ce9b946adba7dabf84b165f404495257..ce9f408ff7394d931bc015c08e9db8221b8f7f39 100644
|
||||
index 73c3070b2e300e0ab29ac1db1631023cef7970f8..f46ae930c6d1609dbefb56e67853f6e8504b749f 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -300,7 +300,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -299,7 +299,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
|
||||
AtomicReference<S> atomicreference = new AtomicReference();
|
||||
@ -16843,7 +16843,7 @@ index 6994fff6ce9b946adba7dabf84b165f404495257..ce9f408ff7394d931bc015c08e9db822
|
||||
((MinecraftServer) atomicreference.get()).runServer();
|
||||
}, "Server thread");
|
||||
|
||||
@@ -583,7 +583,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -582,7 +582,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.forceDifficulty();
|
||||
for (ServerLevel worldserver : this.getAllLevels()) {
|
||||
this.prepareLevels(worldserver.getChunkSource().chunkMap.progressListener, worldserver);
|
||||
@ -16852,7 +16852,7 @@ index 6994fff6ce9b946adba7dabf84b165f404495257..ce9f408ff7394d931bc015c08e9db822
|
||||
this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldLoadEvent(worldserver.getWorld()));
|
||||
}
|
||||
|
||||
@@ -783,6 +783,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -782,6 +782,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public abstract boolean shouldRconBroadcast();
|
||||
|
||||
public boolean saveAllChunks(boolean suppressLogs, boolean flush, boolean force) {
|
||||
@ -16865,7 +16865,7 @@ index 6994fff6ce9b946adba7dabf84b165f404495257..ce9f408ff7394d931bc015c08e9db822
|
||||
boolean flag3 = false;
|
||||
|
||||
for (Iterator iterator = this.getAllLevels().iterator(); iterator.hasNext(); flag3 = true) {
|
||||
@@ -791,8 +797,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -790,8 +796,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (!suppressLogs) {
|
||||
MinecraftServer.LOGGER.info("Saving chunks for level '{}'/{}", worldserver, worldserver.dimension().location());
|
||||
}
|
||||
@ -16880,7 +16880,7 @@ index 6994fff6ce9b946adba7dabf84b165f404495257..ce9f408ff7394d931bc015c08e9db822
|
||||
}
|
||||
|
||||
// CraftBukkit start - moved to WorldServer.save
|
||||
@@ -811,7 +821,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -810,7 +820,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
while (iterator1.hasNext()) {
|
||||
ServerLevel worldserver2 = (ServerLevel) iterator1.next();
|
||||
|
||||
@ -16889,7 +16889,7 @@ index 6994fff6ce9b946adba7dabf84b165f404495257..ce9f408ff7394d931bc015c08e9db822
|
||||
}
|
||||
|
||||
MinecraftServer.LOGGER.info("ThreadedAnvilChunkStorage: All dimensions are saved");
|
||||
@@ -891,36 +901,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -890,36 +900,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
}
|
||||
|
||||
@ -16927,7 +16927,7 @@ index 6994fff6ce9b946adba7dabf84b165f404495257..ce9f408ff7394d931bc015c08e9db822
|
||||
|
||||
this.isSaving = false;
|
||||
this.resources.close();
|
||||
@@ -939,7 +920,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -938,7 +919,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.getProfileCache().save();
|
||||
}
|
||||
// Spigot end
|
||||
@ -16936,7 +16936,7 @@ index 6994fff6ce9b946adba7dabf84b165f404495257..ce9f408ff7394d931bc015c08e9db822
|
||||
}
|
||||
|
||||
public String getLocalIp() {
|
||||
@@ -973,6 +954,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -972,6 +953,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
// Spigot End
|
||||
|
||||
@ -16945,7 +16945,7 @@ index 6994fff6ce9b946adba7dabf84b165f404495257..ce9f408ff7394d931bc015c08e9db822
|
||||
protected void runServer() {
|
||||
try {
|
||||
if (!this.initServer()) {
|
||||
@@ -987,6 +970,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -986,6 +969,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
Arrays.fill( recentTps, 20 );
|
||||
long curTime, tickSection = Util.getMillis(), tickCount = 1;
|
||||
while (this.running) {
|
||||
@ -16958,7 +16958,7 @@ index 6994fff6ce9b946adba7dabf84b165f404495257..ce9f408ff7394d931bc015c08e9db822
|
||||
long i = (curTime = Util.getMillis()) - this.nextTickTime;
|
||||
|
||||
if (i > 5000L && this.nextTickTime - this.lastOverloadWarning >= 30000L) { // CraftBukkit
|
||||
@@ -1099,6 +1088,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1098,6 +1087,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
private boolean haveTime() {
|
||||
@ -16970,7 +16970,7 @@ index 6994fff6ce9b946adba7dabf84b165f404495257..ce9f408ff7394d931bc015c08e9db822
|
||||
// CraftBukkit start
|
||||
if (isOversleep) return canOversleep();// Paper - because of our changes, this logic is broken
|
||||
return this.forceTicks || this.runningTask() || Util.getMillis() < (this.mayHaveDelayedTasks ? this.delayedTasksMaxNextTickTime : this.nextTickTime);
|
||||
@@ -2248,7 +2242,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2247,7 +2241,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// CraftBukkit start
|
||||
@Override
|
||||
public boolean isSameThread() {
|
||||
@ -16980,10 +16980,10 @@ index 6994fff6ce9b946adba7dabf84b165f404495257..ce9f408ff7394d931bc015c08e9db822
|
||||
|
||||
public boolean isDebugging() {
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 51eac8b7177db66c005e4eaca689cf96d10edeaa..4f55f04812fe0306acfc4be45189f1f679e18e63 100644
|
||||
index 32d5d085721a6b9c539b261a2249f6206d0f8a87..ff279901038dfbed6a0b51cc5355ccd17efc6883 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -400,7 +400,34 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -399,7 +399,34 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
return this.getProperties().allowNether;
|
||||
}
|
||||
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index bea4e947577ee2f5fd680eb932409283f8504ee7..b9a49f92e38daf4f80b6d3bf465eb9d249606976 100644
|
||||
index f46ae930c6d1609dbefb56e67853f6e8504b749f..787f32156b02063adf6426b7430da4c4956b759c 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1458,7 +1458,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1457,7 +1457,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
@DontObfuscate
|
||||
public String getServerModName() {
|
||||
|
@ -201,7 +201,7 @@ index 0000000000000000000000000000000000000000..aac3f66cb23d260729c2a48d8710a9de
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 4f55f04812fe0306acfc4be45189f1f679e18e63..049f7dc31576980007eb8f0caab926bb58fead78 100644
|
||||
index ff279901038dfbed6a0b51cc5355ccd17efc6883..2c2d492fdfafb1d2e4e962e6818bd9d7466347d5 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -189,6 +189,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
|
@ -12,19 +12,19 @@ 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 b9a49f92e38daf4f80b6d3bf465eb9d249606976..71c8bb318b2e99b7d0b91196ac0b1b5bfbc8bc79 100644
|
||||
index 787f32156b02063adf6426b7430da4c4956b759c..be23196f7bf439c54218debb517dd3f37f6dea6f 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
|
||||
@@ -282,7 +282,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public OptionSet options;
|
||||
public org.bukkit.command.ConsoleCommandSender console;
|
||||
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
|
||||
public ConsoleReader reader;
|
||||
- public static int currentTick = (int) (System.currentTimeMillis() / 50);
|
||||
+ public static int currentTick = 0; // Paper - Further improve tick loop
|
||||
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
||||
public int autosavePeriod;
|
||||
public Commands vanillaCommandDispatcher;
|
||||
@@ -292,7 +292,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -291,7 +291,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// Spigot start
|
||||
public static final int TPS = 20;
|
||||
public static final int TICK_TIME = 1000000000 / MinecraftServer.TPS;
|
||||
@ -33,7 +33,7 @@ index b9a49f92e38daf4f80b6d3bf465eb9d249606976..71c8bb318b2e99b7d0b91196ac0b1b5b
|
||||
public final double[] recentTps = new double[ 3 ];
|
||||
// Spigot end
|
||||
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations;
|
||||
@@ -952,6 +952,57 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -951,6 +951,57 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
{
|
||||
return ( avg * exp ) + ( tps * ( 1 - exp ) );
|
||||
}
|
||||
@ -91,7 +91,7 @@ index b9a49f92e38daf4f80b6d3bf465eb9d249606976..71c8bb318b2e99b7d0b91196ac0b1b5b
|
||||
// Spigot End
|
||||
|
||||
public static volatile RuntimeException chunkSystemCrash; // Paper - rewrite chunk system
|
||||
@@ -968,7 +1019,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -967,7 +1018,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
// Spigot start
|
||||
Arrays.fill( recentTps, 20 );
|
||||
@ -101,7 +101,7 @@ index b9a49f92e38daf4f80b6d3bf465eb9d249606976..71c8bb318b2e99b7d0b91196ac0b1b5b
|
||||
while (this.running) {
|
||||
// Paper start - rewrite chunk system
|
||||
// guarantee that nothing can stop the server from halting if it can at least still tick
|
||||
@@ -976,7 +1028,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -975,7 +1027,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
throw this.chunkSystemCrash;
|
||||
}
|
||||
// Paper end - rewrite chunk system
|
||||
@ -110,7 +110,7 @@ index b9a49f92e38daf4f80b6d3bf465eb9d249606976..71c8bb318b2e99b7d0b91196ac0b1b5b
|
||||
|
||||
if (i > 5000L && this.nextTickTime - this.lastOverloadWarning >= 30000L) { // CraftBukkit
|
||||
long j = i / 50L;
|
||||
@@ -988,12 +1040,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -987,12 +1039,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
++MinecraftServer.currentTickLong; // Paper
|
||||
@ -134,7 +134,7 @@ index b9a49f92e38daf4f80b6d3bf465eb9d249606976..71c8bb318b2e99b7d0b91196ac0b1b5b
|
||||
tickSection = curTime;
|
||||
}
|
||||
// Spigot end
|
||||
@@ -1003,7 +1061,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1002,7 +1060,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.debugCommandProfiler = new MinecraftServer.TimeProfiler(Util.getNanos(), this.tickCount);
|
||||
}
|
||||
|
||||
|
@ -10,10 +10,10 @@ This patch adds a per-tick cache that is used for storing and retrieving
|
||||
an entity's exposure during an explosion.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 71c8bb318b2e99b7d0b91196ac0b1b5bfbc8bc79..3ff9a5a8f4b9a91958f6d846a7a5337a01dbb803 100644
|
||||
index be23196f7bf439c54218debb517dd3f37f6dea6f..ebfc20247ac5a548e6616a099b8885db9c7a8d25 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
|
||||
@@ -1403,6 +1403,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
this.profiler.pop();
|
||||
this.profiler.pop();
|
||||
|
@ -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 3ff9a5a8f4b9a91958f6d846a7a5337a01dbb803..1af6a1ed4111e5e1feaede68be2783070ed90c76 100644
|
||||
index ebfc20247ac5a548e6616a099b8885db9c7a8d25..4b9de3ca81b60eb4a916006cdfbc2a630a390a39 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1365,6 +1365,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1364,6 +1364,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
ServerLevel worldserver = (ServerLevel) iterator.next();
|
||||
|
@ -18,10 +18,10 @@ index 1294b38262505b0d54089e428df9b363219de1f0..ee37ec0de1ca969144824427ae42b0c8
|
||||
buf.writeComponent(this.playerPrefix);
|
||||
buf.writeComponent(this.playerSuffix);
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 1af6a1ed4111e5e1feaede68be2783070ed90c76..010d0192da65e4dfe5516126b522d30b776394c0 100644
|
||||
index 4b9de3ca81b60eb4a916006cdfbc2a630a390a39..bb8546e5f7f223cb499ab404845aba524726ea16 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -587,6 +587,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -586,6 +586,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldLoadEvent(worldserver.getWorld()));
|
||||
}
|
||||
|
||||
|
@ -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 010d0192da65e4dfe5516126b522d30b776394c0..c09ac4ef459c8df6c8623de7fbb63f8c2558bd2d 100644
|
||||
index bb8546e5f7f223cb499ab404845aba524726ea16..0ee486f807d7c44e2252c4c744e29b506d916d9c 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -193,6 +193,7 @@ import co.aikar.timings.MinecraftTimings; // Paper
|
||||
@ -17,7 +17,7 @@ index 010d0192da65e4dfe5516126b522d30b776394c0..c09ac4ef459c8df6c8623de7fbb63f8c
|
||||
public static final Logger LOGGER = LogUtils.getLogger();
|
||||
public static final net.kyori.adventure.text.logger.slf4j.ComponentLogger COMPONENT_LOGGER = net.kyori.adventure.text.logger.slf4j.ComponentLogger.logger(LOGGER.getName()); // Paper
|
||||
public static final String VANILLA_BRAND = "vanilla";
|
||||
@@ -320,6 +321,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -319,6 +320,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
public MinecraftServer(OptionSet options, WorldLoader.DataLoadContext worldLoader, Thread thread, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PackRepository resourcepackrepository, WorldStem worldstem, Proxy proxy, DataFixer datafixer, Services services, ChunkProgressListenerFactory worldloadlistenerfactory) {
|
||||
super("Server");
|
||||
@ -25,7 +25,7 @@ index 010d0192da65e4dfe5516126b522d30b776394c0..c09ac4ef459c8df6c8623de7fbb63f8c
|
||||
this.metricsRecorder = InactiveMetricsRecorder.INSTANCE;
|
||||
this.profiler = this.metricsRecorder.getProfiler();
|
||||
this.onMetricsRecordingStopped = (methodprofilerresults) -> {
|
||||
@@ -2324,9 +2326,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2323,9 +2325,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Async GameProfileCache saving
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index c09ac4ef459c8df6c8623de7fbb63f8c2558bd2d..006289473c03c8484b26264c61eaf6a5e73658c0 100644
|
||||
index 0ee486f807d7c44e2252c4c744e29b506d916d9c..b5ededfb23980abca01ef25207cca95ad390a70d 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -933,7 +933,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -932,7 +932,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");
|
||||
@ -18,7 +18,7 @@ index c09ac4ef459c8df6c8623de7fbb63f8c2558bd2d..006289473c03c8484b26264c61eaf6a5
|
||||
// Spigot end
|
||||
io.papermc.paper.chunk.system.io.RegionFileIOThread.close(true); // Paper // Paper - rewrite chunk system
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 049f7dc31576980007eb8f0caab926bb58fead78..81a0a897a1fd2a408bfe43f24ed5e5f4bbefe161 100644
|
||||
index 2c2d492fdfafb1d2e4e962e6818bd9d7466347d5..131de2ca246cfbe4cb253e74cb05a73efbbcca73 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -242,7 +242,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
|
@ -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 006289473c03c8484b26264c61eaf6a5e73658c0..72161fef4ff8a469e028d136f71dda86e6220d0a 100644
|
||||
index b5ededfb23980abca01ef25207cca95ad390a70d..5abde8722e22e074d4ef44956f7bb5344441e174 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -237,6 +237,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -41,7 +41,7 @@ index 006289473c03c8484b26264c61eaf6a5e73658c0..72161fef4ff8a469e028d136f71dda86
|
||||
private boolean stopped;
|
||||
private int tickCount;
|
||||
protected final Proxy proxy;
|
||||
@@ -901,7 +902,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -900,7 +901,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 006289473c03c8484b26264c61eaf6a5e73658c0..72161fef4ff8a469e028d136f71dda86
|
||||
try { Thread.sleep(100); } catch (InterruptedException ex) {} // CraftBukkit - SPIGOT-625 - give server at least a chance to send packets
|
||||
}
|
||||
|
||||
@@ -952,6 +953,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -951,6 +952,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public void halt(boolean waitForShutdown) {
|
||||
|
@ -252,7 +252,7 @@ index c3631efda9c7fa531a8a9f18fbee7b5f8655382b..769f6489632302627fa1730cc08e77f5
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 72161fef4ff8a469e028d136f71dda86e6220d0a..a6d6652fab0dcb490b4229cbf6a7a63112cbfa26 100644
|
||||
index 5abde8722e22e074d4ef44956f7bb5344441e174..bb1280569181e8e3acb78ef622b4d2f905007222 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -165,7 +165,7 @@ import com.mojang.datafixers.util.Pair;
|
||||
@ -264,16 +264,16 @@ index 72161fef4ff8a469e028d136f71dda86e6220d0a..a6d6652fab0dcb490b4229cbf6a7a631
|
||||
import joptsimple.OptionSet;
|
||||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.resources.RegistryOps;
|
||||
@@ -284,7 +284,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -283,7 +283,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public org.bukkit.craftbukkit.CraftServer server;
|
||||
public OptionSet options;
|
||||
public org.bukkit.command.ConsoleCommandSender console;
|
||||
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
|
||||
- public ConsoleReader reader;
|
||||
+ //public ConsoleReader reader; // Paper
|
||||
public static int currentTick = 0; // Paper - Further improve tick loop
|
||||
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
||||
public int autosavePeriod;
|
||||
@@ -368,7 +368,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -367,7 +367,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.options = options;
|
||||
this.worldLoader = worldLoader;
|
||||
this.vanillaCommandDispatcher = worldstem.dataPackResources().commands; // CraftBukkit
|
||||
@ -283,7 +283,7 @@ index 72161fef4ff8a469e028d136f71dda86e6220d0a..a6d6652fab0dcb490b4229cbf6a7a631
|
||||
if (System.console() == null && System.getProperty("jline.terminal") == null) {
|
||||
System.setProperty("jline.terminal", "jline.UnsupportedTerminal");
|
||||
Main.useJline = false;
|
||||
@@ -389,6 +391,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -388,6 +390,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
MinecraftServer.LOGGER.warn((String) null, ex);
|
||||
}
|
||||
}
|
||||
@ -292,7 +292,7 @@ index 72161fef4ff8a469e028d136f71dda86e6220d0a..a6d6652fab0dcb490b4229cbf6a7a631
|
||||
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
|
||||
this.paperConfigurations = services.paperConfigurations(); // Paper
|
||||
}
|
||||
@@ -1133,7 +1137,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1132,7 +1136,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
org.spigotmc.WatchdogThread.doStop(); // Spigot
|
||||
// CraftBukkit start - Restore terminal to original settings
|
||||
try {
|
||||
@ -301,7 +301,7 @@ index 72161fef4ff8a469e028d136f71dda86e6220d0a..a6d6652fab0dcb490b4229cbf6a7a631
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -1587,7 +1591,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1586,7 +1590,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
@Override
|
||||
public void sendSystemMessage(Component message) {
|
||||
@ -311,7 +311,7 @@ index 72161fef4ff8a469e028d136f71dda86e6220d0a..a6d6652fab0dcb490b4229cbf6a7a631
|
||||
|
||||
public KeyPair getKeyPair() {
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 81a0a897a1fd2a408bfe43f24ed5e5f4bbefe161..24f62f9c4d288297d7a324e806745cc1449d7b4c 100644
|
||||
index 131de2ca246cfbe4cb253e74cb05a73efbbcca73..72639f33b6503faede1ec0df48d7c6a88b7eb82f 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -98,6 +98,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
|
@ -181,7 +181,7 @@ index 0000000000000000000000000000000000000000..6b0bdc266109cdfb874f08bf74323603
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index a6d6652fab0dcb490b4229cbf6a7a63112cbfa26..010318abbb6fadbadade8926793786eced6775d3 100644
|
||||
index bb1280569181e8e3acb78ef622b4d2f905007222..9f59ef54ef6f6af8b0fef8567d8cfbefb64bc29f 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -3,6 +3,9 @@ package net.minecraft.server;
|
||||
@ -194,7 +194,7 @@ index a6d6652fab0dcb490b4229cbf6a7a63112cbfa26..010318abbb6fadbadade8926793786ec
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
@@ -1345,7 +1348,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1344,7 +1347,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (this.hidesOnlinePlayers()) {
|
||||
return new ServerStatus.Players(i, list.size(), List.of());
|
||||
} else {
|
||||
|
@ -9,10 +9,10 @@ thread dumps at an interval until the point of crash.
|
||||
This will help diagnose what was going on in that time before the crash.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 010318abbb6fadbadade8926793786eced6775d3..9cd0e389deda8d0bc7a551ff9e8b6bcd51184476 100644
|
||||
index 9f59ef54ef6f6af8b0fef8567d8cfbefb64bc29f..d05f776204a720084a583c6d6dfe47936761b6e3 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1048,6 +1048,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1047,6 +1047,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.status = this.buildServerStatus();
|
||||
|
||||
// Spigot start
|
||||
@ -21,7 +21,7 @@ index 010318abbb6fadbadade8926793786eced6775d3..9cd0e389deda8d0bc7a551ff9e8b6bcd
|
||||
long start = System.nanoTime(), curTime, tickSection = start; // Paper - Further improve server tick loop
|
||||
lastTick = start - TICK_TIME; // Paper
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 24f62f9c4d288297d7a324e806745cc1449d7b4c..29eadf85e11c2261218fa406b29455da50400a7a 100644
|
||||
index 72639f33b6503faede1ec0df48d7c6a88b7eb82f..7533dc44c782b4e31b3823458998bc72739e94b2 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -197,6 +197,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Use a Queue for Queueing Commands
|
||||
Lists are bad as Queues mmmkay.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 29eadf85e11c2261218fa406b29455da50400a7a..c2f5d3153591d48c6c2afdec049a7b390066bfdb 100644
|
||||
index 7533dc44c782b4e31b3823458998bc72739e94b2..ea0d1faa0e27cd7a1b793ad93ba2ef1e6bf71628 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -69,7 +69,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@ -17,8 +17,8 @@ index 29eadf85e11c2261218fa406b29455da50400a7a..c2f5d3153591d48c6c2afdec049a7b39
|
||||
+ private final java.util.Queue<ConsoleInput> serverCommandQueue = new java.util.concurrent.ConcurrentLinkedQueue<>(); // Paper - use a proper queuemmands
|
||||
@Nullable
|
||||
private QueryThreadGs4 queryThreadGs4;
|
||||
public final RconConsoleSource rconConsoleSource;
|
||||
@@ -440,13 +440,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
// public final RemoteControlCommandListener rconConsoleSource; // CraftBukkit - remove field
|
||||
@@ -439,13 +439,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
return;
|
||||
}
|
||||
// Paper end - rewrite chunk system
|
||||
|
@ -79,10 +79,10 @@ index 0f05d26248d8c999048a88796df227a6a1e3755f..7354711e194ab58b11b68f447c1fc795
|
||||
return executorService;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 9cd0e389deda8d0bc7a551ff9e8b6bcd51184476..3289e2ec79c760ba8c1c47ed1baaba136682d8e8 100644
|
||||
index d05f776204a720084a583c6d6dfe47936761b6e3..e5ab15722fe640d4766b9a24fb82b1d60f15a241 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -312,6 +312,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -311,6 +311,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
thread.setUncaughtExceptionHandler((thread1, throwable) -> {
|
||||
MinecraftServer.LOGGER.error("Uncaught exception in server thread", throwable);
|
||||
});
|
||||
|
@ -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 ed66f20b38fb6cea0dab020d8ffdde894da86113..41181620a9fb8f9e5a8d5211d88fcb0c3063f42c 100644
|
||||
index e5ab15722fe640d4766b9a24fb82b1d60f15a241..1a74b7c252d16e5ab2c303e6e96c62e78ef9311c 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1387,12 +1387,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1386,12 +1386,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.
|
||||
|
@ -53,10 +53,10 @@ index e3394864e29357fec036f9e616472aeab95d035e..b7f1569c662df13f278fc704cabec040
|
||||
event.getPlayer().getServer().getPluginManager().callEvent(event);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 41181620a9fb8f9e5a8d5211d88fcb0c3063f42c..ef74bacd74cfef198c404293f9a13073fe3d5c66 100644
|
||||
index 1a74b7c252d16e5ab2c303e6e96c62e78ef9311c..d84ed437e91a620c294533ddcb098cc11bc16c1f 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -896,6 +896,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -895,6 +895,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
MinecraftServer.LOGGER.info("Stopping server");
|
||||
|
@ -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 ef74bacd74cfef198c404293f9a13073fe3d5c66..95c2be1ee4bca53c9ea78e3a32aaf3a6395381a7 100644
|
||||
index d84ed437e91a620c294533ddcb098cc11bc16c1f..78465f82b2f3ae2a932b787a489f3d01cc51f5f9 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1305,6 +1305,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1304,6 +1304,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
});
|
||||
isOversleep = false;MinecraftTimings.serverOversleep.stopTiming();
|
||||
// Paper end
|
||||
@ -17,7 +17,7 @@ index ef74bacd74cfef198c404293f9a13073fe3d5c66..95c2be1ee4bca53c9ea78e3a32aaf3a6
|
||||
|
||||
++this.tickCount;
|
||||
this.tickChildren(shouldKeepTicking);
|
||||
@@ -1326,6 +1327,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1325,6 +1326,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.runAllTasks();
|
||||
}
|
||||
// Paper end
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Configurable Keep Spawn Loaded range per world
|
||||
This lets you disable it for some worlds and lower it for others.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 95c2be1ee4bca53c9ea78e3a32aaf3a6395381a7..cd57953e31c1f0f51553be113d84760f24b061b0 100644
|
||||
index 78465f82b2f3ae2a932b787a489f3d01cc51f5f9..21d7196cdc694a581c8a3232a39e7454c0b30f56 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -738,30 +738,33 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -737,30 +737,33 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
// CraftBukkit start
|
||||
public void prepareLevels(ChunkProgressListener worldloadlistener, ServerLevel worldserver) {
|
||||
@ -53,7 +53,7 @@ index 95c2be1ee4bca53c9ea78e3a32aaf3a6395381a7..cd57953e31c1f0f51553be113d84760f
|
||||
|
||||
if (true) {
|
||||
ServerLevel worldserver1 = worldserver;
|
||||
@@ -784,7 +787,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -783,7 +786,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// this.nextTickTime = SystemUtils.getMillis() + 10L;
|
||||
this.executeModerately();
|
||||
// CraftBukkit end
|
||||
|
@ -125,7 +125,7 @@ index d44d0074446c1c54e87dc8078dff7fef1d92f343..bbb8b1933ef33a3b91f69545f69dd3cf
|
||||
|
||||
public static void registerCommands(final MinecraftServer server) {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index cd57953e31c1f0f51553be113d84760f24b061b0..36112a1ab7306deb3cc38b103f22f7c1b8f89206 100644
|
||||
index 21d7196cdc694a581c8a3232a39e7454c0b30f56..498f06aa1d8b2c20f5bf31d6751f08cf1eb4240f 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -251,6 +251,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -140,7 +140,7 @@ index cd57953e31c1f0f51553be113d84760f24b061b0..36112a1ab7306deb3cc38b103f22f7c1
|
||||
@Nullable
|
||||
private KeyPair keyPair;
|
||||
@Nullable
|
||||
@@ -1341,6 +1346,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1340,6 +1345,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.averageTickTime = this.averageTickTime * 0.8F + (float) j / 1000000.0F * 0.19999999F;
|
||||
long k = Util.getNanos();
|
||||
|
||||
@ -152,7 +152,7 @@ index cd57953e31c1f0f51553be113d84760f24b061b0..36112a1ab7306deb3cc38b103f22f7c1
|
||||
this.frameTimer.logFrameDuration(k - i);
|
||||
this.profiler.pop();
|
||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||
@@ -2571,4 +2581,30 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2570,4 +2580,30 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public static record ServerResourcePackInfo(String url, String hash, boolean isRequired, @Nullable Component prompt) {
|
||||
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Remote Connections shouldn't hold up shutdown
|
||||
Bugs in the connection logic appears to leave stale connections even, preventing shutdown
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index c2f5d3153591d48c6c2afdec049a7b390066bfdb..aa1622fb3ea1f349b539e09c811de0f297a86076 100644
|
||||
index ea0d1faa0e27cd7a1b793ad93ba2ef1e6bf71628..4d7b0646bed201a47a3fee9a540c9a11e2844e09 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -391,11 +391,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -390,11 +390,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
}
|
||||
|
||||
if (this.rconThread != null) {
|
||||
|
@ -71,10 +71,10 @@ index 336795dff742b7c6957fbd3476aff31d25a5e659..30a58229aa6dac5039511d0c0df5f291
|
||||
cause = cause.getCause();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 36112a1ab7306deb3cc38b103f22f7c1b8f89206..e658f17f04f0e4e541353bf59411788f9da9a780 100644
|
||||
index 498f06aa1d8b2c20f5bf31d6751f08cf1eb4240f..047562e1df93347f629b529ca0647697e22ecf48 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -297,7 +297,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -296,7 +296,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
||||
public int autosavePeriod;
|
||||
public Commands vanillaCommandDispatcher;
|
||||
@ -83,7 +83,7 @@ index 36112a1ab7306deb3cc38b103f22f7c1b8f89206..e658f17f04f0e4e541353bf59411788f
|
||||
// CraftBukkit end
|
||||
// Spigot start
|
||||
public static final int TPS = 20;
|
||||
@@ -308,6 +308,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -307,6 +307,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations;
|
||||
public static long currentTickLong = 0L; // Paper
|
||||
|
||||
@ -93,7 +93,7 @@ index 36112a1ab7306deb3cc38b103f22f7c1b8f89206..e658f17f04f0e4e541353bf59411788f
|
||||
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
|
||||
AtomicReference<S> atomicreference = new AtomicReference();
|
||||
Thread thread = new io.papermc.paper.util.TickThread(() -> { // Paper - rewrite chunk system
|
||||
@@ -884,6 +887,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -883,6 +886,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
// CraftBukkit start
|
||||
private boolean hasStopped = false;
|
||||
@ -101,7 +101,7 @@ index 36112a1ab7306deb3cc38b103f22f7c1b8f89206..e658f17f04f0e4e541353bf59411788f
|
||||
private final Object stopLock = new Object();
|
||||
public final boolean hasStopped() {
|
||||
synchronized (this.stopLock) {
|
||||
@@ -898,6 +902,19 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -897,6 +901,19 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (this.hasStopped) return;
|
||||
this.hasStopped = true;
|
||||
}
|
||||
@ -121,7 +121,7 @@ index 36112a1ab7306deb3cc38b103f22f7c1b8f89206..e658f17f04f0e4e541353bf59411788f
|
||||
// CraftBukkit end
|
||||
if (this.metricsRecorder.isRecording()) {
|
||||
this.cancelRecordingMetrics();
|
||||
@@ -954,7 +971,19 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -953,7 +970,19 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.getProfileCache().save(false); // Paper
|
||||
}
|
||||
// Spigot end
|
||||
@ -141,7 +141,7 @@ index 36112a1ab7306deb3cc38b103f22f7c1b8f89206..e658f17f04f0e4e541353bf59411788f
|
||||
}
|
||||
|
||||
public String getLocalIp() {
|
||||
@@ -1049,6 +1078,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1048,6 +1077,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
protected void runServer() {
|
||||
try {
|
||||
@ -149,7 +149,7 @@ index 36112a1ab7306deb3cc38b103f22f7c1b8f89206..e658f17f04f0e4e541353bf59411788f
|
||||
if (!this.initServer()) {
|
||||
throw new IllegalStateException("Failed to initialize server");
|
||||
}
|
||||
@@ -1058,6 +1088,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1057,6 +1087,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.status = this.buildServerStatus();
|
||||
|
||||
// Spigot start
|
||||
@ -168,7 +168,7 @@ index 36112a1ab7306deb3cc38b103f22f7c1b8f89206..e658f17f04f0e4e541353bf59411788f
|
||||
org.spigotmc.WatchdogThread.hasStarted = true; // Paper
|
||||
Arrays.fill( recentTps, 20 );
|
||||
long start = System.nanoTime(), curTime, tickSection = start; // Paper - Further improve server tick loop
|
||||
@@ -1118,6 +1160,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1117,6 +1159,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
JvmProfiler.INSTANCE.onServerTick(this.averageTickTime);
|
||||
}
|
||||
} catch (Throwable throwable) {
|
||||
@ -181,7 +181,7 @@ index 36112a1ab7306deb3cc38b103f22f7c1b8f89206..e658f17f04f0e4e541353bf59411788f
|
||||
MinecraftServer.LOGGER.error("Encountered an unexpected exception", throwable);
|
||||
// Spigot Start
|
||||
if ( throwable.getCause() != null )
|
||||
@@ -1148,14 +1196,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1147,14 +1195,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.services.profileCache().clearExecutor();
|
||||
}
|
||||
|
||||
@ -199,7 +199,7 @@ index 36112a1ab7306deb3cc38b103f22f7c1b8f89206..e658f17f04f0e4e541353bf59411788f
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1224,6 +1272,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1223,6 +1271,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
@Override
|
||||
public TickTask wrapRunnable(Runnable runnable) {
|
||||
@ -212,7 +212,7 @@ index 36112a1ab7306deb3cc38b103f22f7c1b8f89206..e658f17f04f0e4e541353bf59411788f
|
||||
return new TickTask(this.tickCount, runnable);
|
||||
}
|
||||
|
||||
@@ -1459,6 +1513,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1458,6 +1512,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
try {
|
||||
crashreport = CrashReport.forThrowable(throwable, "Exception ticking world");
|
||||
} catch (Throwable t) {
|
||||
@ -220,7 +220,7 @@ index 36112a1ab7306deb3cc38b103f22f7c1b8f89206..e658f17f04f0e4e541353bf59411788f
|
||||
throw new RuntimeException("Error generating crash report", t);
|
||||
}
|
||||
// Spigot End
|
||||
@@ -1959,7 +2014,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1958,7 +2013,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
this.worldData.setDataConfiguration(worlddataconfiguration);
|
||||
this.resources.managers.updateRegistryTags(this.registryAccess());
|
||||
@ -238,7 +238,7 @@ index 36112a1ab7306deb3cc38b103f22f7c1b8f89206..e658f17f04f0e4e541353bf59411788f
|
||||
this.functionManager.replaceLibrary(this.resources.managers.getFunctionLibrary());
|
||||
this.structureTemplateManager.onResourceManagerReload(this.resources.resourceManager);
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index aa1622fb3ea1f349b539e09c811de0f297a86076..aaad6b0de19872c6e54591adf90c30d2c2ed5223 100644
|
||||
index 4d7b0646bed201a47a3fee9a540c9a11e2844e09..a0b85718f5c2334673290090f343ce218639bcbb 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -269,7 +269,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@ -250,7 +250,7 @@ index aa1622fb3ea1f349b539e09c811de0f297a86076..aaad6b0de19872c6e54591adf90c30d2
|
||||
if (dedicatedserverproperties.announcePlayerAchievements != null) {
|
||||
((GameRules.BooleanValue) this.getGameRules().getRule(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)).set(dedicatedserverproperties.announcePlayerAchievements, this);
|
||||
}
|
||||
@@ -398,7 +398,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -397,7 +397,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
// this.remoteStatusListener.stop(); // Paper - don't wait for remote connections
|
||||
}
|
||||
|
||||
@ -260,7 +260,7 @@ index aa1622fb3ea1f349b539e09c811de0f297a86076..aaad6b0de19872c6e54591adf90c30d2
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -763,7 +764,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -770,7 +771,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@Override
|
||||
public void stopServer() {
|
||||
super.stopServer();
|
||||
@ -319,7 +319,7 @@ index c3760f22fcc56ccb25e3315823054416c2172386..246606164117e8140ab0892ec1326503
|
||||
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/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 1dc2c4552df65c355d8711b2a492c307d29180e3..645cbf447fd1b77cbd1ae3e35ed47aebbd52e27e 100644
|
||||
index 77911e26af9ec468c8a0c1fe8161b79c67b2303c..be1fbe64a5145b25c111ba3b6bb35109e77deb9d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -178,6 +178,36 @@ public class Main {
|
||||
|
@ -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 e658f17f04f0e4e541353bf59411788f9da9a780..f4ad35b55cacd5c1c3e4d81d4a9cf9675349ce79 100644
|
||||
index 047562e1df93347f629b529ca0647697e22ecf48..8b1a92c1a0e9505ebc11de0e6b54b48343ef8e60 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -888,6 +888,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -887,6 +887,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 e658f17f04f0e4e541353bf59411788f9da9a780..f4ad35b55cacd5c1c3e4d81d4a9cf967
|
||||
private final Object stopLock = new Object();
|
||||
public final boolean hasStopped() {
|
||||
synchronized (this.stopLock) {
|
||||
@@ -902,6 +903,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -901,6 +902,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (this.hasStopped) return;
|
||||
this.hasStopped = true;
|
||||
}
|
||||
@ -48,7 +48,7 @@ index e658f17f04f0e4e541353bf59411788f9da9a780..f4ad35b55cacd5c1c3e4d81d4a9cf967
|
||||
// Paper start - kill main thread, and kill it hard
|
||||
shutdownThread = Thread.currentThread();
|
||||
org.spigotmc.WatchdogThread.doStop(); // Paper
|
||||
@@ -1004,6 +1006,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1003,6 +1005,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
public void safeShutdown(boolean waitForShutdown, boolean isRestarting) {
|
||||
this.isRestarting = isRestarting;
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Deobfuscate stacktraces in log messages, crash reports, and
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 527e39bcd6aea7560b5d8ef37377c2f37da5c1ca..e2e7fe74095b83f2ac12f8054dd91b38ffcc32e7 100644
|
||||
index 6807a91d4d55dc90e2820caa855a44844c87b7e2..453691f34c400b074699f0f444ac28482837a9f7 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -37,6 +37,7 @@ dependencies {
|
||||
@ -524,7 +524,7 @@ index 99d5fd192a4cf1ac2739520a111b8dd854ff2f57..dc3dea801a673462e767ad37268ec77a
|
||||
|
||||
protected void channelRead0(ChannelHandlerContext channelhandlercontext, Packet<?> packet) {
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index aaad6b0de19872c6e54591adf90c30d2c2ed5223..6a4c7783146ff6b6703e9ae814134a8d1086cf7f 100644
|
||||
index a0b85718f5c2334673290090f343ce218639bcbb..fff1f35b783bea3c2ea43c5d403ff57d96c2bf86 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -195,6 +195,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
|
@ -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 f4ad35b55cacd5c1c3e4d81d4a9cf9675349ce79..53876c0d957e2d151e93744eff60606096f02e66 100644
|
||||
index 8b1a92c1a0e9505ebc11de0e6b54b48343ef8e60..ccf238c12c416e2aa7ee83a14bbbb96f5b2f8b51 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -928,6 +928,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -927,6 +927,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// CraftBukkit start
|
||||
if (this.server != null) {
|
||||
this.server.disablePlugins();
|
||||
|
@ -25,10 +25,10 @@ index 324e6d1a4fadd3e557e4ba05f04e6a5891cc54df..4e56018b64d11f76c8da43fd8f85c6de
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java
|
||||
index a6612cc0ea87aeb8e87521ff7b5fe58c7b06b9ef..dfc15cfd897316f64a063b8ae93a0882ab5b3993 100644
|
||||
index ad731c5f76f19394866a121c64d4169ea8fb8cd7..55413cc3da415326b280ddbc0b4f4b201a301d5b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java
|
||||
@@ -45,4 +45,16 @@ public class CraftRemoteConsoleCommandSender extends ServerCommandSender impleme
|
||||
@@ -55,4 +55,16 @@ public class CraftRemoteConsoleCommandSender extends ServerCommandSender impleme
|
||||
public void setOp(boolean value) {
|
||||
throw new UnsupportedOperationException("Cannot change operator status of remote controller.");
|
||||
}
|
||||
|
@ -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 7668cceb6dcf0eafbd00abb24deaefe9729d261a..d1555152399221947283a68c2054cf4a93377666 100644
|
||||
index ccf238c12c416e2aa7ee83a14bbbb96f5b2f8b51..c09adcb869edf273c633ce996b048173ded89703 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -798,7 +798,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -797,7 +797,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (worldserver.getWorld().getKeepSpawnInMemory()) worldloadlistener.stop(); // Paper
|
||||
// CraftBukkit start
|
||||
// this.updateMobSpawningFlags();
|
||||
@ -20,7 +20,7 @@ index 7668cceb6dcf0eafbd00abb24deaefe9729d261a..d1555152399221947283a68c2054cf4a
|
||||
|
||||
this.forceTicks = false;
|
||||
// CraftBukkit end
|
||||
@@ -1726,11 +1726,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1725,11 +1725,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ index 7668cceb6dcf0eafbd00abb24deaefe9729d261a..d1555152399221947283a68c2054cf4a
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1744,7 +1747,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1743,7 +1746,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
while (iterator.hasNext()) {
|
||||
ServerLevel worldserver = (ServerLevel) iterator.next();
|
||||
|
||||
@ -63,10 +63,10 @@ index 89be3991ef4fb2deb7276c5409cb571a7fb1f821..9c272f7cf8cbd2bbe147e57f7fabe135
|
||||
return Component.translatable("commands.difficulty.success", difficulty.getDisplayName());
|
||||
}, true);
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 6a4c7783146ff6b6703e9ae814134a8d1086cf7f..1ffd3854239862414e6ceecf2764ba3d6bd7942a 100644
|
||||
index fff1f35b783bea3c2ea43c5d403ff57d96c2bf86..8f7916aa522fa2a49197d59e63d6e5c3a2d4bf42 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -326,7 +326,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -325,7 +325,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
|
||||
@Override
|
||||
public void forceDifficulty() {
|
||||
@ -89,7 +89,7 @@ index 15a70bad66eb2508f58ff184061c2d19e45297e1..f80645fe0e1f9ad2a70ea33c5dc6a8c0
|
||||
|
||||
playerlist.sendPlayerPermissionLevel(this);
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 457c2b1e3db83c17c5282ad64eaccf3e534eafdb..6f3cd16845d5ea265666f5535b7f893e0a9d0fcf 100644
|
||||
index 61053ccdcf5e588164f243faa9ef6beda5bf45fc..2f0fb75a35a1fa45614621da9e24cec6e842b693 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3382,7 +3382,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] incremental chunk and player saving
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 53c0246acda9fe1242710260e250429ae51eceb8..56e98ea2964c2779537ac607b7c4677bc695d92a 100644
|
||||
index c09adcb869edf273c633ce996b048173ded89703..d62c09f7328af63112d9e6f1a06844047dbf6570 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -871,7 +871,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -870,7 +870,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
try {
|
||||
this.isSaving = true;
|
||||
@ -17,7 +17,7 @@ index 53c0246acda9fe1242710260e250429ae51eceb8..56e98ea2964c2779537ac607b7c4677b
|
||||
flag3 = this.saveAllChunks(suppressLogs, flush, force);
|
||||
} finally {
|
||||
this.isSaving = false;
|
||||
@@ -1381,13 +1381,28 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1380,13 +1380,28 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.status = this.buildServerStatus();
|
||||
}
|
||||
|
||||
@ -115,7 +115,7 @@ index e96890be7f03b7cc846fe850d4169e09b5d40eab..02ba7e25c649832aba2e742cb76be9d2
|
||||
// Paper start - rewrite chunk system - add close param
|
||||
this.save(progressListener, flush, savingDisabled, false);
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 2040b2defecb484ee7b46a885e924483387ee8fe..c22acc5e6333f8cc9b734bff48bb9ff7a00bfd4d 100644
|
||||
index f80645fe0e1f9ad2a70ea33c5dc6a8c02ff262ec..e087b62f88157d57eb037feb0d39c076b286f755 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -189,6 +189,7 @@ import org.bukkit.inventory.MainHand;
|
||||
|
@ -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 f704725928b0ec05ffff554901e7558ef8f308d6..1a8bc8d508202012130441397fe1a404fb1357fd 100644
|
||||
index d62c09f7328af63112d9e6f1a06844047dbf6570..a8fea134ddd8bf19abea977871c77cd317090145 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2049,6 +2049,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2048,6 +2048,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.getPlayerList().reloadResources();
|
||||
this.functionManager.replaceLibrary(this.resources.managers.getFunctionLibrary());
|
||||
this.structureTemplateManager.onResourceManagerReload(this.resources.resourceManager);
|
||||
|
@ -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 1a8bc8d508202012130441397fe1a404fb1357fd..8ca3bb41307f1f7ba1b1340981cc37e331fa9388 100644
|
||||
index a8fea134ddd8bf19abea977871c77cd317090145..8c9ebc501282e929503c39607048e032f05fbb9c 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2132,13 +2132,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2131,13 +2131,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (this.isEnforceWhitelist()) {
|
||||
PlayerList playerlist = source.getServer().getPlayerList();
|
||||
UserWhiteList whitelist = playerlist.getWhiteList();
|
||||
|
@ -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 8ca3bb41307f1f7ba1b1340981cc37e331fa9388..676ec9a9b087f7f1e46a3dc3d967594c0cfbcd87 100644
|
||||
index 8c9ebc501282e929503c39607048e032f05fbb9c..892830b2d9a15a832040fbeac5fca3d011082c27 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2009,7 +2009,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2008,7 +2008,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
return this.functionManager;
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ index 8ca3bb41307f1f7ba1b1340981cc37e331fa9388..676ec9a9b087f7f1e46a3dc3d967594c
|
||||
RegistryAccess.Frozen iregistrycustom_dimension = this.registries.getAccessForLoading(RegistryLayer.RELOADABLE);
|
||||
CompletableFuture<Void> completablefuture = CompletableFuture.supplyAsync(() -> {
|
||||
Stream<String> stream = dataPacks.stream(); // CraftBukkit - decompile error
|
||||
@@ -2050,6 +2056,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2049,6 +2055,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.functionManager.replaceLibrary(this.resources.managers.getFunctionLibrary());
|
||||
this.structureTemplateManager.onResourceManagerReload(this.resources.resourceManager);
|
||||
org.bukkit.craftbukkit.block.data.CraftBlockData.reloadCache(); // Paper - cache block data strings, they can be defined by datapacks so refresh it here
|
||||
|
@ -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 676ec9a9b087f7f1e46a3dc3d967594c0cfbcd87..5a4437f4244ad7243e82a231b0206910384e5db8 100644
|
||||
index 892830b2d9a15a832040fbeac5fca3d011082c27..d974b6c0f034722a0d2f143843c5a7b280883d5f 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1504,6 +1504,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1503,6 +1503,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
|
||||
|
@ -21,7 +21,7 @@ index a20d47f54f12dfc0a5f76dd969238e34c958b618..935dac757280731bfeb0a8f033cbe315
|
||||
this.saveUserBanList();
|
||||
this.loadIpBanList();
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 1ffd3854239862414e6ceecf2764ba3d6bd7942a..030b6e33fe80f6c50c473dbaa8f9aa9d4384a6b2 100644
|
||||
index 8f7916aa522fa2a49197d59e63d6e5c3a2d4bf42..89b6cbc3721cdd8000ae34c33dec1d4458cf55d3 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -198,6 +198,12 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
|
@ -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 5a4437f4244ad7243e82a231b0206910384e5db8..974cb4108f11394d7b7dbb270cae93aefe4e5511 100644
|
||||
index d974b6c0f034722a0d2f143843c5a7b280883d5f..17e963f927c81dfb6bf10f621c76c6631fd2dd97 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2148,7 +2148,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2147,7 +2147,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)
|
||||
|
@ -208,7 +208,7 @@ index 0000000000000000000000000000000000000000..dd9d77d7c7f1a5a130a1f4c15e5b1e68
|
||||
+ public void setErrorIndex(final int errorIndex) {}
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 030b6e33fe80f6c50c473dbaa8f9aa9d4384a6b2..3f230a32346d6923a9fe4c2311142fbf4b088373 100644
|
||||
index 89b6cbc3721cdd8000ae34c33dec1d4458cf55d3..3acdac903ec7afb034f86d725ca0dc949babd1fc 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -173,7 +173,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
|
@ -42,7 +42,7 @@ index 0000000000000000000000000000000000000000..dd6012b6a097575b2d1471be5069ecce
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 3f230a32346d6923a9fe4c2311142fbf4b088373..75c0ea2a59963334555efa1af03693fdff0fac32 100644
|
||||
index 3acdac903ec7afb034f86d725ca0dc949babd1fc..60d5142f17c561fd7268999faaa084642abbb65c 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -209,6 +209,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
|
@ -275,10 +275,10 @@ index 98385550084c9f975e494668961bac6ccb0700ab..1147044f2c4c2e9510cb6e5c38b6abe8
|
||||
Main.LOGGER.info("Forcing world upgrade! {}", session.getLevelId()); // CraftBukkit
|
||||
WorldUpgrader worldupgrader = new WorldUpgrader(session, dataFixer, dimensionOptionsRegistry, eraseCache);
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 974cb4108f11394d7b7dbb270cae93aefe4e5511..8843939070d4155ef3457a90548cee1f19debb2f 100644
|
||||
index 17e963f927c81dfb6bf10f621c76c6631fd2dd97..3054716dda1fcfe6c457d81dd89c82bf6acc64a3 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -552,11 +552,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -551,11 +551,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
worlddata = new PrimaryLevelData(worldsettings, worldoptions, worlddimensions_b.specialWorldProperty(), lifecycle);
|
||||
}
|
||||
worlddata.checkName(name); // CraftBukkit - Migration did not rewrite the level.dat; This forces 1.8 to take the last loaded world as respawn (in this case the end)
|
||||
@ -291,7 +291,7 @@ index 974cb4108f11394d7b7dbb270cae93aefe4e5511..8843939070d4155ef3457a90548cee1f
|
||||
|
||||
PrimaryLevelData iworlddataserver = worlddata;
|
||||
boolean flag = worlddata.isDebugWorld();
|
||||
@@ -571,6 +567,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -570,6 +566,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
biomeProvider = gen.getDefaultBiomeProvider(worldInfo);
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@ Tested-by: Mariell Hoversholm <proximyst@proximyst.com>
|
||||
Reviewed-by: Mariell Hoversholm <proximyst@proximyst.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 75c0ea2a59963334555efa1af03693fdff0fac32..1fbe7a58707ddd40f80d71e3703ff3fefff672f4 100644
|
||||
index 60d5142f17c561fd7268999faaa084642abbb65c..e2c55689e881a14e457bc21ac42cf126f7af56f2 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -219,6 +219,20 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
|
@ -36,10 +36,10 @@ index b5f54ee82905e3e6ab5bfde35ab625f5feeb1393..c0a80824a0307ea673805015119cc834
|
||||
|
||||
public boolean shouldDisconnect() {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 8843939070d4155ef3457a90548cee1f19debb2f..e4cf95705ac73d7333628d2659caec444b750420 100644
|
||||
index 3054716dda1fcfe6c457d81dd89c82bf6acc64a3..64081583ee2a29b43d487b3730342dce7ac85e94 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2151,7 +2151,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2150,7 +2150,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)
|
||||
|
@ -1,24 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Mariell Hoversholm <proximyst@proximyst.com>
|
||||
Date: Mon, 2 Aug 2021 08:52:21 +0200
|
||||
Subject: [PATCH] Fix test not bootstrapping
|
||||
|
||||
Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
|
||||
|
||||
diff --git a/src/test/java/org/bukkit/enchantments/EnchantmentTargetTest.java b/src/test/java/org/bukkit/enchantments/EnchantmentTargetTest.java
|
||||
index 439bf35c251ab5dc0d27923e62789a496618de82..5d3b8ba99d0fe966b7329540d61825aa266c7e64 100644
|
||||
--- a/src/test/java/org/bukkit/enchantments/EnchantmentTargetTest.java
|
||||
+++ b/src/test/java/org/bukkit/enchantments/EnchantmentTargetTest.java
|
||||
@@ -5,10 +5,11 @@ import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.enchantment.EnchantmentCategory;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.craftbukkit.util.CraftMagicNumbers;
|
||||
+import org.bukkit.support.AbstractTestingBase;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
-public class EnchantmentTargetTest {
|
||||
+public class EnchantmentTargetTest extends AbstractTestingBase { // Paper
|
||||
|
||||
@Test
|
||||
public void test() {
|
@ -54,7 +54,7 @@ index 15bc39170f06bd4ea5da770bd0fe3d8d08366c48..cef1fa35e3ec613cdea32785fa7848bd
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
|
||||
index c7634407ccaf76513f19688c0f5e102bb2b5a997..35aeba4e8430e6419caa9db4a0b931a994228618 100644
|
||||
index a459a7889c7462b9c8e6474d987151f15720a98e..2c5658df753ebc08f8531d4bdf22ff8f6ca77e94 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
|
||||
@@ -709,8 +709,8 @@ public class Boat extends Entity implements VariantHolder<Boat.Type> {
|
@ -8,7 +8,7 @@ Makes less git noise, as it won't update the date every single time
|
||||
Use -DPaper.skipServerPropertiesComments=true flag to disable writing it
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/Settings.java b/src/main/java/net/minecraft/server/dedicated/Settings.java
|
||||
index 9dde5b89e6de9d470b0c0b08e3aa6c471cd075fe..f6e423a76d4c9cf639f1d44af80d33cf3072f6b5 100644
|
||||
index ca23639f15107ccd43b874ae38fa37279b827a8f..faca42b2b5b20559f98c300b7011b67165391a0d 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/Settings.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/Settings.java
|
||||
@@ -29,6 +29,7 @@ public abstract class Settings<T extends Settings<T>> {
|
||||
@ -19,7 +19,7 @@ index 9dde5b89e6de9d470b0c0b08e3aa6c471cd075fe..f6e423a76d4c9cf639f1d44af80d33cf
|
||||
// CraftBukkit start
|
||||
private OptionSet options = null;
|
||||
|
||||
@@ -118,7 +119,46 @@ public abstract class Settings<T extends Settings<T>> {
|
||||
@@ -123,7 +124,46 @@ public abstract class Settings<T extends Settings<T>> {
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
@ -257,7 +257,7 @@ index 0000000000000000000000000000000000000000..d3b39d88a72ca25057fd8574d32f28db
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
index a3461824fd2162d509facf6f64c5008e3f0fd42b..d4f99f4592a86e2d8344bc2c44711fef1543acdf 100644
|
||||
index e57bb23ec14263b7c9dd721fefbe912963b863d0..7bfc95b2a4fd94bcb0347fd7aff9fe0e9b54daf1 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
@@ -192,6 +192,16 @@ public final class NaturalSpawner {
|
@ -19,10 +19,10 @@ index 4d861f9a58f8ea238471af22f387854d855b1801..efbf77024d235d8af9f7efc938c17afd
|
||||
|
||||
private MinecraftTimings() {}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index e4cf95705ac73d7333628d2659caec444b750420..32fda33ff9684e08da6e7bee2eb0dc26ed701950 100644
|
||||
index 64081583ee2a29b43d487b3730342dce7ac85e94..b54a3dcbd94582158a7119b92b02be5a4e32877c 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1303,6 +1303,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1302,6 +1302,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
private boolean pollTaskInternal() {
|
||||
if (super.pollTask()) {
|
||||
@ -30,7 +30,7 @@ index e4cf95705ac73d7333628d2659caec444b750420..32fda33ff9684e08da6e7bee2eb0dc26
|
||||
return true;
|
||||
} else {
|
||||
if (this.haveTime()) {
|
||||
@@ -2706,4 +2707,74 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2705,4 +2706,74 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
}
|
||||
// Paper end
|
Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren