Cache Component MOTDs
This commit is contained in:
parent
1a8bea734a
commit
46a9d2a4ac
|
@ -1367,6 +1367,37 @@ index 762a9392ffac3042356709dddd15bb3516048bed..3544e2dc2522e9d6305d727d56e73490
|
|||
buf.writeComponent(this.header);
|
||||
buf.writeComponent(this.footer);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 1ad7797dbef61f8e8011ae6db3089939a279071c..327a8f3806d4b3a42f0a7691d578725bf47742fa 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -227,6 +227,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
private boolean allowFlight;
|
||||
@Nullable
|
||||
private String motd;
|
||||
+ @Nullable private net.kyori.adventure.text.Component cachedMotd; // Paper
|
||||
private int playerIdleTimeout;
|
||||
public final long[] tickTimes;
|
||||
@Nullable
|
||||
@@ -1590,8 +1591,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
return this.motd;
|
||||
}
|
||||
|
||||
+ public net.kyori.adventure.text.Component getComponentMotd() {
|
||||
+ net.kyori.adventure.text.Component component = cachedMotd;
|
||||
+ if (this.motd != null && this.cachedMotd == null) {
|
||||
+ component = cachedMotd = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(this.motd);
|
||||
+ }
|
||||
+
|
||||
+ return component != null ? component : net.kyori.adventure.text.Component.empty();
|
||||
+ }
|
||||
+
|
||||
public void setMotd(String motd) {
|
||||
this.motd = motd;
|
||||
+ this.cachedMotd = null; // Paper
|
||||
}
|
||||
|
||||
public boolean previewsChat() {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 56996af65ef7478adb90d3b2f4cd3351fc49200b..7002d5f5700570e32ebf0b63e340d87d58357162 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
|
@ -1442,7 +1473,7 @@ index 56996af65ef7478adb90d3b2f4cd3351fc49200b..7002d5f5700570e32ebf0b63e340d87d
|
|||
// CraftBukkit end
|
||||
this.chatVisibility = packet.chatVisibility();
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 519895351790f8a85d32a6dd87ea8693cae492b7..a22008c6534c78a751dcd69f217db305b13d2c56 100644
|
||||
index 3e1a2faf97eeb376daef139ac8eb51c0bf2246f6..2e690a50420386690fa78d107ad730221c7319cd 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -172,6 +172,8 @@ import org.apache.commons.lang3.StringUtils;
|
||||
|
@ -1839,7 +1870,7 @@ index 595b56b2ab9a813ba71399d306117294fa90dc65..3527d40102d512d0e276edc969ea3c18
|
|||
}
|
||||
collection = icons;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index a850bb8a4268c0210ee7af98f51131759ff95f30..d7a6371c3913a1021beffd8dc3189083f74a84d4 100644
|
||||
index a850bb8a4268c0210ee7af98f51131759ff95f30..837fb51698e6650c6df720f798b7196322b6e7bb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -590,8 +590,10 @@ public final class CraftServer implements Server {
|
||||
|
@ -1958,7 +1989,7 @@ index a850bb8a4268c0210ee7af98f51131759ff95f30..d7a6371c3913a1021beffd8dc3189083
|
|||
+ // Paper start
|
||||
+ @Override
|
||||
+ public net.kyori.adventure.text.Component motd() {
|
||||
+ return net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(console.getMotd());
|
||||
+ return console.getComponentMotd();
|
||||
+ }
|
||||
+ // Paper end
|
||||
@Override
|
||||
|
|
|
@ -729,7 +729,7 @@ index 13421daa96b4ba302581f36abcd730952713d8cd..049e64c355d5f064009b1107ad15d28c
|
|||
} catch (Exception exception) {
|
||||
if (listener.shouldPropagateHandlingExceptions()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 1ad7797dbef61f8e8011ae6db3089939a279071c..1190d62594c5b1be1c11d55e646ee0bac27307cb 100644
|
||||
index 327a8f3806d4b3a42f0a7691d578725bf47742fa..53b04533ea2a9783e281507e996804357946f7d5 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -175,7 +175,7 @@ import org.bukkit.craftbukkit.generator.CustomWorldChunkManager;
|
||||
|
@ -741,7 +741,7 @@ index 1ad7797dbef61f8e8011ae6db3089939a279071c..1190d62594c5b1be1c11d55e646ee0ba
|
|||
|
||||
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements CommandSource, AutoCloseable {
|
||||
|
||||
@@ -851,6 +851,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -852,6 +852,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
MinecraftServer.LOGGER.info("Stopping server");
|
||||
|
@ -749,7 +749,7 @@ index 1ad7797dbef61f8e8011ae6db3089939a279071c..1190d62594c5b1be1c11d55e646ee0ba
|
|||
// CraftBukkit start
|
||||
if (this.server != null) {
|
||||
this.server.disablePlugins();
|
||||
@@ -1094,9 +1095,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1095,9 +1096,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
private boolean haveTime() {
|
||||
// CraftBukkit start
|
||||
|
@ -771,7 +771,7 @@ index 1ad7797dbef61f8e8011ae6db3089939a279071c..1190d62594c5b1be1c11d55e646ee0ba
|
|||
private void executeModerately() {
|
||||
this.runAllTasks();
|
||||
java.util.concurrent.locks.LockSupport.parkNanos("executing tasks", 1000L);
|
||||
@@ -1104,9 +1117,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1105,9 +1118,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// CraftBukkit end
|
||||
|
||||
protected void waitUntilNextTick() {
|
||||
|
@ -783,7 +783,7 @@ index 1ad7797dbef61f8e8011ae6db3089939a279071c..1190d62594c5b1be1c11d55e646ee0ba
|
|||
});
|
||||
}
|
||||
|
||||
@@ -1192,9 +1205,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1193,9 +1206,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public void onServerExit() {}
|
||||
|
||||
public void tickServer(BooleanSupplier shouldKeepTicking) {
|
||||
|
@ -802,7 +802,7 @@ index 1ad7797dbef61f8e8011ae6db3089939a279071c..1190d62594c5b1be1c11d55e646ee0ba
|
|||
++this.tickCount;
|
||||
this.tickChildren(shouldKeepTicking);
|
||||
if (i - this.lastServerStatus >= 5000000000L) {
|
||||
@@ -1220,15 +1241,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1221,15 +1242,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
if (this.autosavePeriod > 0 && this.tickCount % this.autosavePeriod == 0) { // CraftBukkit
|
||||
|
@ -823,7 +823,7 @@ index 1ad7797dbef61f8e8011ae6db3089939a279071c..1190d62594c5b1be1c11d55e646ee0ba
|
|||
this.profiler.push("tallying");
|
||||
long l = this.tickTimes[this.tickCount % 100] = Util.getNanos() - i;
|
||||
|
||||
@@ -1238,30 +1262,29 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1239,30 +1263,29 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.frameTimer.logFrameDuration(i1 - i);
|
||||
this.profiler.pop();
|
||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||
|
@ -862,7 +862,7 @@ index 1ad7797dbef61f8e8011ae6db3089939a279071c..1190d62594c5b1be1c11d55e646ee0ba
|
|||
// 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) {
|
||||
@@ -1269,7 +1292,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1270,7 +1293,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
|
||||
}
|
||||
}
|
||||
|
@ -871,7 +871,7 @@ index 1ad7797dbef61f8e8011ae6db3089939a279071c..1190d62594c5b1be1c11d55e646ee0ba
|
|||
|
||||
while (iterator.hasNext()) {
|
||||
ServerLevel worldserver = (ServerLevel) iterator.next();
|
||||
@@ -1315,24 +1338,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1316,24 +1339,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
this.profiler.popPush("connection");
|
||||
|
@ -1262,7 +1262,7 @@ index 58da012345126bbfc9980538adf3f79bd87412bb..a14386502e9b3ccec23233db2ddfedee
|
|||
this.entityManager.saveAll();
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index a22008c6534c78a751dcd69f217db305b13d2c56..357ff7f3ade2d59a7a2b3d93d7d35534565b6add 100644
|
||||
index 2e690a50420386690fa78d107ad730221c7319cd..70db08a398fb2461e9580ad2f75276f1a000fa06 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -311,7 +311,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
@ -1634,7 +1634,7 @@ index 98ba88896c73651591b8ad8e070868fb443ae999..864e2e0355a5fb8c1d4a5b0896ba299f
|
|||
};
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 9c97599b2742ff3f7778114b231d6487077189da..99bd8a5b516de6d98803141a0df337e3d96d7501 100644
|
||||
index 80333fe069e417ef692cb7b80292ed42d6e820a1..7b645fd1bb170a09f56a827048f5d8816254df2f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2372,12 +2372,31 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -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 1190d62594c5b1be1c11d55e646ee0bac27307cb..c38cfd4781911db0fe191412f089c55cc4e40f2a 100644
|
||||
index 53b04533ea2a9783e281507e996804357946f7d5..722d9a37b2132a246dbb8e19d4e393be684e0f6f 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1415,7 +1415,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1416,7 +1416,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
@DontObfuscate
|
||||
public String getServerModName() {
|
||||
|
@ -19,7 +19,7 @@ index 1190d62594c5b1be1c11d55e646ee0bac27307cb..c38cfd4781911db0fe191412f089c55c
|
|||
|
||||
public SystemReport fillSystemReport(SystemReport details) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 7c0e64404f442721b9279e7a167e6a5e26a81829..69461a48a38624a9014ef56242cdba407270cee1 100644
|
||||
index a9d9bc91b150597275d9b15f21dc00b49c5e3b28..ae2912c8cb89208a7bbbcdb6e6f143ebc98e8180 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -244,7 +244,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
||||
|
|
|
@ -12,10 +12,10 @@ 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 c38cfd4781911db0fe191412f089c55cc4e40f2a..8cc5b6bbe2d8cbeb72e88b9e08e87fbbb98a6f8a 100644
|
||||
index 722d9a37b2132a246dbb8e19d4e393be684e0f6f..e4c7aa0b8c74b081dd77f81eb12693b8bcf457de 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -267,7 +267,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -268,7 +268,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public org.bukkit.command.ConsoleCommandSender console;
|
||||
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
|
||||
public ConsoleReader reader;
|
||||
|
@ -24,7 +24,7 @@ index c38cfd4781911db0fe191412f089c55cc4e40f2a..8cc5b6bbe2d8cbeb72e88b9e08e87fbb
|
|||
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
||||
public int autosavePeriod;
|
||||
public Commands vanillaCommandDispatcher;
|
||||
@@ -276,7 +276,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -277,7 +277,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 c38cfd4781911db0fe191412f089c55cc4e40f2a..8cc5b6bbe2d8cbeb72e88b9e08e87fbb
|
|||
public final double[] recentTps = new double[ 3 ];
|
||||
// Spigot end
|
||||
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations;
|
||||
@@ -961,6 +961,57 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -962,6 +962,57 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
{
|
||||
return ( avg * exp ) + ( tps * ( 1 - exp ) );
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ index c38cfd4781911db0fe191412f089c55cc4e40f2a..8cc5b6bbe2d8cbeb72e88b9e08e87fbb
|
|||
// Spigot End
|
||||
|
||||
protected void runServer() {
|
||||
@@ -977,26 +1028,33 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -978,26 +1029,33 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
// Spigot start
|
||||
Arrays.fill( recentTps, 20 );
|
||||
|
@ -133,7 +133,7 @@ index c38cfd4781911db0fe191412f089c55cc4e40f2a..8cc5b6bbe2d8cbeb72e88b9e08e87fbb
|
|||
tickSection = curTime;
|
||||
}
|
||||
// Spigot end
|
||||
@@ -1006,7 +1064,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1007,7 +1065,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.debugCommandProfiler = new MinecraftServer.TimeProfiler(Util.getNanos(), this.tickCount);
|
||||
}
|
||||
|
||||
|
@ -144,7 +144,7 @@ index c38cfd4781911db0fe191412f089c55cc4e40f2a..8cc5b6bbe2d8cbeb72e88b9e08e87fbb
|
|||
this.startMetricsRecordingTick();
|
||||
this.profiler.push("tick");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 69461a48a38624a9014ef56242cdba407270cee1..a830c5c8603eacfe52bdcb15cfa5f52cad1eba47 100644
|
||||
index ae2912c8cb89208a7bbbcdb6e6f143ebc98e8180..415393e965c7253412ec4d893c3e62ad14dd69f2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2402,6 +2402,17 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -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 8cc5b6bbe2d8cbeb72e88b9e08e87fbbb98a6f8a..21e09c039a4c3fa64f6456e5cc7d50463590f787 100644
|
||||
index e4c7aa0b8c74b081dd77f81eb12693b8bcf457de..cc6699b9806bfaeca7d6e3564974bdbd532e06bc 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1394,6 +1394,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1395,6 +1395,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 21e09c039a4c3fa64f6456e5cc7d50463590f787..cfbf7efb06f7ed6064930c4154c6e3e949dc0b25 100644
|
||||
index cc6699b9806bfaeca7d6e3564974bdbd532e06bc..170e3d9257f98af7ba1a95d0bf084b11258ea02b 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1355,6 +1355,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1356,6 +1356,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 cfbf7efb06f7ed6064930c4154c6e3e949dc0b25..032ba4071f7562cd0c0bf3f2de46130692544ef0 100644
|
||||
index 170e3d9257f98af7ba1a95d0bf084b11258ea02b..2b9199df0b969cce0de3a0dd47da7edccabb97f7 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -577,6 +577,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -578,6 +578,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 032ba4071f7562cd0c0bf3f2de46130692544ef0..d3da5327f7826d10428c9fa8b9848fdb06afd04f 100644
|
||||
index 2b9199df0b969cce0de3a0dd47da7edccabb97f7..b40c2ccdc87208b5fc1962ad06ce961e51186f3e 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -179,6 +179,7 @@ import co.aikar.timings.MinecraftTimings; // Paper
|
||||
|
@ -17,7 +17,7 @@ index 032ba4071f7562cd0c0bf3f2de46130692544ef0..d3da5327f7826d10428c9fa8b9848fdb
|
|||
public static final Logger LOGGER = LogUtils.getLogger();
|
||||
public static final String VANILLA_BRAND = "vanilla";
|
||||
private static final float AVERAGE_TICK_TIME_SMOOTHING = 0.8F;
|
||||
@@ -304,6 +305,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -305,6 +306,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
public MinecraftServer(OptionSet options, DataPackConfig datapackconfiguration, DynamicOps<Tag> registryreadops, 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 032ba4071f7562cd0c0bf3f2de46130692544ef0..d3da5327f7826d10428c9fa8b9848fdb
|
|||
this.metricsRecorder = InactiveMetricsRecorder.INSTANCE;
|
||||
this.profiler = this.metricsRecorder.getProfiler();
|
||||
this.onMetricsRecordingStopped = (methodprofilerresults) -> {
|
||||
@@ -2270,9 +2272,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2281,9 +2283,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 d3da5327f7826d10428c9fa8b9848fdb06afd04f..c656909a4a5fa990d4412bfa7cf3736cde46ca53 100644
|
||||
index b40c2ccdc87208b5fc1962ad06ce961e51186f3e..c7b740087003113a00c5eccc9b0405b62b9da2b7 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -942,7 +942,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -943,7 +943,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");
|
||||
|
|
|
@ -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 c656909a4a5fa990d4412bfa7cf3736cde46ca53..454c3a678886649c268992bc67c6cec83cb04b76 100644
|
||||
index c7b740087003113a00c5eccc9b0405b62b9da2b7..ff7cc68eeb1aa61c06d50ed47211009d51b2b234 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -219,6 +219,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
@ -41,7 +41,7 @@ index c656909a4a5fa990d4412bfa7cf3736cde46ca53..454c3a678886649c268992bc67c6cec8
|
|||
private boolean stopped;
|
||||
private int tickCount;
|
||||
protected final Proxy proxy;
|
||||
@@ -881,7 +882,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -882,7 +883,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 c656909a4a5fa990d4412bfa7cf3736cde46ca53..454c3a678886649c268992bc67c6cec8
|
|||
try { Thread.sleep(100); } catch (InterruptedException ex) {} // CraftBukkit - SPIGOT-625 - give server at least a chance to send packets
|
||||
}
|
||||
|
||||
@@ -961,6 +962,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -962,6 +963,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public void halt(boolean flag) {
|
||||
|
|
|
@ -112,7 +112,7 @@ index 0000000000000000000000000000000000000000..685deaa0e5d1ddc13e3a7c0471b1cfcf
|
|||
+
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 454c3a678886649c268992bc67c6cec83cb04b76..037749e1f6a6dcd53fc4455869f5b41417ae8e94 100644
|
||||
index ff7cc68eeb1aa61c06d50ed47211009d51b2b234..a4d14a12a5ede30f1e124bfaa5552e70f590dd09 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -157,7 +157,7 @@ import org.slf4j.Logger;
|
||||
|
@ -124,7 +124,7 @@ index 454c3a678886649c268992bc67c6cec83cb04b76..037749e1f6a6dcd53fc4455869f5b414
|
|||
import joptsimple.OptionSet;
|
||||
import net.minecraft.server.bossevents.CustomBossEvents;
|
||||
import net.minecraft.server.dedicated.DedicatedServer;
|
||||
@@ -268,7 +268,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -269,7 +269,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public OptionSet options;
|
||||
public org.bukkit.command.ConsoleCommandSender console;
|
||||
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
|
||||
|
@ -133,7 +133,7 @@ index 454c3a678886649c268992bc67c6cec83cb04b76..037749e1f6a6dcd53fc4455869f5b414
|
|||
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;
|
||||
@@ -352,7 +352,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -353,7 +353,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.datapackconfiguration = datapackconfiguration;
|
||||
this.registryreadops = registryreadops;
|
||||
this.vanillaCommandDispatcher = worldstem.dataPackResources().commands; // CraftBukkit
|
||||
|
@ -143,7 +143,7 @@ index 454c3a678886649c268992bc67c6cec83cb04b76..037749e1f6a6dcd53fc4455869f5b414
|
|||
if (System.console() == null && System.getProperty("jline.terminal") == null) {
|
||||
System.setProperty("jline.terminal", "jline.UnsupportedTerminal");
|
||||
Main.useJline = false;
|
||||
@@ -373,6 +375,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -374,6 +376,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
MinecraftServer.LOGGER.warn((String) null, ex);
|
||||
}
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ index 454c3a678886649c268992bc67c6cec83cb04b76..037749e1f6a6dcd53fc4455869f5b414
|
|||
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
|
||||
this.paperConfigurations = services.paperConfigurations(); // Paper
|
||||
}
|
||||
@@ -1139,7 +1143,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1140,7 +1144,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
org.spigotmc.WatchdogThread.doStop(); // Spigot
|
||||
// CraftBukkit start - Restore terminal to original settings
|
||||
try {
|
||||
|
@ -161,7 +161,7 @@ index 454c3a678886649c268992bc67c6cec83cb04b76..037749e1f6a6dcd53fc4455869f5b414
|
|||
} catch (Exception ignored) {
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -1553,7 +1557,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1554,7 +1558,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
@Override
|
||||
public void sendSystemMessage(Component message) {
|
||||
|
@ -236,7 +236,7 @@ index b28bb51e5476b250d9de91f2e380dd8ed2aa7041..9cb9e0a4d1467cb5c23dfd38e83d495a
|
|||
|
||||
this.bans = new UserBanList(PlayerList.USERBANLIST_FILE);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index aacddeb767770472990bfc2b5f9109d5605b3053..48cf396d30a4964632fff31969995d3c291bb52f 100644
|
||||
index be392b054d3fe86118265cbe65067e83b37f36e8..ad469e105871105a3918f9213bc9f27263955063 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -45,7 +45,6 @@ import java.util.logging.Level;
|
||||
|
|
|
@ -190,7 +190,7 @@ index 67455a5ba75c9b816213e44d6872c5ddf8e27e98..23efad80934930beadf15e65781551d4
|
|||
|
||||
public ClientboundStatusResponsePacket(ServerStatus metadata) {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 037749e1f6a6dcd53fc4455869f5b41417ae8e94..f532aba1f180f0c86b4360bb85993732207b2345 100644
|
||||
index a4d14a12a5ede30f1e124bfaa5552e70f590dd09..cc7820999e558e49ee78a07263836f5d48da4ae1 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2,6 +2,9 @@ package net.minecraft.server;
|
||||
|
@ -203,7 +203,7 @@ index 037749e1f6a6dcd53fc4455869f5b41417ae8e94..f532aba1f180f0c86b4360bb85993732
|
|||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
@@ -1308,7 +1311,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1309,7 +1312,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.lastServerStatus = i;
|
||||
this.status.setPlayers(new ServerStatus.Players(this.getMaxPlayers(), this.getPlayerCount()));
|
||||
if (!this.hidesOnlinePlayers()) {
|
||||
|
|
|
@ -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 f532aba1f180f0c86b4360bb85993732207b2345..e3f43c2b6ff47f6a8c158d176dfc2c5a3fa66a62 100644
|
||||
index cc7820999e558e49ee78a07263836f5d48da4ae1..6b655685f93bc2144fef68c9d1a06783524f9e20 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1057,6 +1057,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1058,6 +1058,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.updateStatusIcon(this.status);
|
||||
|
||||
// Spigot start
|
||||
|
@ -33,7 +33,7 @@ index b248c0f481436b1b101dc1f75eaaf8023f4ba0ea..02ea5304a3f99d69005ab1a7ea85e6a1
|
|||
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics();
|
||||
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // load version history now
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index a13949140f18cae6813ab2e19247969e93e64451..97f7d0f144e9b0bd40ed714ea04153bf538bf36e 100644
|
||||
index 1775174221c84b627ea778c0d0892ce46c1d56b6..21f0e1a23d6e9c6c76abfa9af555642fadeba69c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -909,6 +909,7 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -2278,10 +2278,10 @@ index 97b29bcb20e199c2d02457f8025e67e2d4a925fc..8fda43173012ed3134ed1f114143ceaa
|
|||
DedicatedServer dedicatedserver1 = new DedicatedServer(optionset, config.get(), ops.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 e3f43c2b6ff47f6a8c158d176dfc2c5a3fa66a62..7bec6d7b376e382c6266456314eda3ea1cc885ec 100644
|
||||
index 6b655685f93bc2144fef68c9d1a06783524f9e20..d4c5e0f6a31ff0e26fbf1dfc0496bba774811197 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -953,7 +953,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -954,7 +954,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.getProfileCache().save(false); // Paper
|
||||
}
|
||||
// Spigot end
|
||||
|
@ -2820,7 +2820,7 @@ index 0d536d72ac918fbd403397ff369d10143ee9c204..be677d437d17b74c6188ce1bd5fc6fdc
|
|||
private final String name;
|
||||
private final Comparator<T> comparator;
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 14b102e8341d4cb10935e9d247d7451661a02017..a4bdfaaef7f4d340e7e818e7f5ed92f195d91a58 100644
|
||||
index 5df920842608f7d4dd4bb24872de1adb3548f20c..b22762ed6731350a1803d80cb1a684a26ca0acac 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -750,6 +750,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
|
|
@ -58,10 +58,10 @@ index 33ec7786cdf8c32e905d192fc8364418e47404d5..67567eb58beddc06eae4d8e7af3b3c09
|
|||
return executorService;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 7bec6d7b376e382c6266456314eda3ea1cc885ec..3bd5f3249290a3e844b7e88625c2585df398af71 100644
|
||||
index d4c5e0f6a31ff0e26fbf1dfc0496bba774811197..338c723c64950aa03e9aab4d9592798ac87beddd 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -303,6 +303,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -304,6 +304,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
S s0 = serverFactory.apply(thread); // CraftBukkit - decompile error
|
||||
|
||||
atomicreference.set(s0);
|
||||
|
|
|
@ -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 3bd5f3249290a3e844b7e88625c2585df398af71..c5cb46beeea6cc5c230af390de69c3213c871ef9 100644
|
||||
index 338c723c64950aa03e9aab4d9592798ac87beddd..729339b2e090419869d53a5df69547eb84e4d4bc 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1377,12 +1377,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1378,12 +1378,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.
|
||||
|
|
|
@ -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 c5cb46beeea6cc5c230af390de69c3213c871ef9..7d1ca1dbd0c1f882b4c59fb6c56e9ba86d81ae42 100644
|
||||
index 729339b2e090419869d53a5df69547eb84e4d4bc..d9216fb4d67cd26758548e4f00967a9fe8602061 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1306,6 +1306,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1307,6 +1307,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
});
|
||||
isOversleep = false;MinecraftTimings.serverOversleep.stopTiming();
|
||||
// Paper end
|
||||
|
@ -17,7 +17,7 @@ index c5cb46beeea6cc5c230af390de69c3213c871ef9..7d1ca1dbd0c1f882b4c59fb6c56e9ba8
|
|||
|
||||
++this.tickCount;
|
||||
this.tickChildren(shouldKeepTicking);
|
||||
@@ -1344,6 +1345,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1345,6 +1346,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.runAllTasks();
|
||||
}
|
||||
// Paper end
|
||||
|
|
|
@ -16,10 +16,10 @@ handling that should have been handled synchronously will be handled
|
|||
synchronously when the server gets shut down.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 7d1ca1dbd0c1f882b4c59fb6c56e9ba86d81ae42..97e964030a5cc449543252933f8a7b4800833e69 100644
|
||||
index d9216fb4d67cd26758548e4f00967a9fe8602061..86a87ebf18b7f4dd08d85b6bbbc6962d1176a933 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2299,7 +2299,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2310,7 +2310,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// CraftBukkit start
|
||||
@Override
|
||||
public boolean isSameThread() {
|
||||
|
@ -29,7 +29,7 @@ index 7d1ca1dbd0c1f882b4c59fb6c56e9ba86d81ae42..97e964030a5cc449543252933f8a7b48
|
|||
|
||||
public boolean isDebugging() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 8b4cb0e38136427cf897316b74f075d671dfa144..cdc209d56b80fa6dd94b2e1d45918baf96aad153 100644
|
||||
index 6031bc3ada3fd7f2389f00b6d9e37db13e242282..eeff73b8b0a8b866ddb139ce6da074bd67463eb4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2073,7 +2073,7 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -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 97e964030a5cc449543252933f8a7b4800833e69..40aa6abf0d3a814de194d754d5b136f3ef67d378 100644
|
||||
index 86a87ebf18b7f4dd08d85b6bbbc6962d1176a933..c7d06aa55f5cc569890c50acc6c4e6fd9d44fbec 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -726,31 +726,34 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -727,31 +727,34 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
// CraftBukkit start
|
||||
public void prepareLevels(ChunkProgressListener worldloadlistener, ServerLevel worldserver) {
|
||||
|
@ -54,7 +54,7 @@ index 97e964030a5cc449543252933f8a7b4800833e69..40aa6abf0d3a814de194d754d5b136f3
|
|||
|
||||
if (true) {
|
||||
ServerLevel worldserver1 = worldserver;
|
||||
@@ -773,7 +776,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -774,7 +777,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// this.nextTickTime = SystemUtils.getMillis() + 10L;
|
||||
this.executeModerately();
|
||||
// CraftBukkit end
|
||||
|
|
|
@ -13,10 +13,10 @@ Subject: [PATCH] Optimize Hoppers
|
|||
* Remove Streams from Item Suck In and restore restore 1.12 AABB checks which is simpler and no voxel allocations (was doing TWO Item Suck ins)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 40aa6abf0d3a814de194d754d5b136f3ef67d378..4a9addec6c1f08718902da7d3f3628a0900e4c1d 100644
|
||||
index c7d06aa55f5cc569890c50acc6c4e6fd9d44fbec..a4bfec79fa93b45084adbf502d5900bc420300ab 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1409,6 +1409,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1410,6 +1410,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
|
||||
|
|
|
@ -14,10 +14,10 @@ light engine on shutdown...
|
|||
The queue size only puts a cap on max loss, doesn't solve that problem.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 4a9addec6c1f08718902da7d3f3628a0900e4c1d..f7427ea6bf11ef837dd38d25cd3abed57de5e8de 100644
|
||||
index a4bfec79fa93b45084adbf502d5900bc420300ab..51b33848d9a3af3a9b9dfe482f9f8d9150c57b82 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -777,7 +777,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -778,7 +778,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.executeModerately();
|
||||
// CraftBukkit end
|
||||
if (worldserver.getWorld().getKeepSpawnInMemory()) worldloadlistener.stop(); // Paper
|
||||
|
|
|
@ -125,11 +125,11 @@ index 6a00f3d38da8107825ab1d405f337fd077b09f72..d31b5ed47cffc61c90c926a0cd2005b7
|
|||
|
||||
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 f7427ea6bf11ef837dd38d25cd3abed57de5e8de..ce7b96819bf8d7e992c2aafd3013e8a9478e500d 100644
|
||||
index 51b33848d9a3af3a9b9dfe482f9f8d9150c57b82..003d49ad608815171a0d183305509ec3590aedd4 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -234,6 +234,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
private String motd;
|
||||
@@ -235,6 +235,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@Nullable private net.kyori.adventure.text.Component cachedMotd; // Paper
|
||||
private int playerIdleTimeout;
|
||||
public final long[] tickTimes;
|
||||
+ // Paper start
|
||||
|
@ -140,7 +140,7 @@ index f7427ea6bf11ef837dd38d25cd3abed57de5e8de..ce7b96819bf8d7e992c2aafd3013e8a9
|
|||
@Nullable
|
||||
private KeyPair keyPair;
|
||||
@Nullable
|
||||
@@ -1359,6 +1364,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1360,6 +1365,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.averageTickTime = this.averageTickTime * 0.8F + (float) l / 1000000.0F * 0.19999999F;
|
||||
long i1 = Util.getNanos();
|
||||
|
||||
|
@ -153,7 +153,7 @@ index f7427ea6bf11ef837dd38d25cd3abed57de5e8de..ce7b96819bf8d7e992c2aafd3013e8a9
|
|||
this.frameTimer.logFrameDuration(i1 - i);
|
||||
this.profiler.pop();
|
||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||
@@ -2494,4 +2505,30 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2505,4 +2516,30 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public static record ServerResourcePackInfo(String url, String hash, boolean isRequired, @Nullable Component prompt) {
|
||||
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ index f7427ea6bf11ef837dd38d25cd3abed57de5e8de..ce7b96819bf8d7e992c2aafd3013e8a9
|
|||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 8c6b829db9b48d7d355b61eab2c6dd9705f2a7da..22d95ec01e748d649e86bdbad57a8882e987157d 100644
|
||||
index 08dad640ae4315d0746587d91deb4709231c2bcc..1043271c20d092e3133855335eaf75d9d533d984 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2478,6 +2478,16 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -71,10 +71,10 @@ index 8cc4cb2163a93b9491550fe6d0f5d980fb216920..4dd14d73a37b32288a64fbd67ee22c43
|
|||
cause = cause.getCause();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index ce7b96819bf8d7e992c2aafd3013e8a9478e500d..53320d5d9cadb8702f82d94bada32db4c1b32f26 100644
|
||||
index 003d49ad608815171a0d183305509ec3590aedd4..fe3faf1e8a102cd63c1976cf63403bbd1e8e2a90 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -281,7 +281,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -282,7 +282,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 ce7b96819bf8d7e992c2aafd3013e8a9478e500d..53320d5d9cadb8702f82d94bada32db4
|
|||
// CraftBukkit end
|
||||
// Spigot start
|
||||
public static final int TPS = 20;
|
||||
@@ -292,6 +292,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -293,6 +293,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 ce7b96819bf8d7e992c2aafd3013e8a9478e500d..53320d5d9cadb8702f82d94bada32db4
|
|||
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
|
||||
AtomicReference<S> atomicreference = new AtomicReference();
|
||||
Thread thread = new Thread(() -> {
|
||||
@@ -864,6 +867,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -865,6 +868,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
// CraftBukkit start
|
||||
private boolean hasStopped = false;
|
||||
|
@ -101,7 +101,7 @@ index ce7b96819bf8d7e992c2aafd3013e8a9478e500d..53320d5d9cadb8702f82d94bada32db4
|
|||
private final Object stopLock = new Object();
|
||||
public final boolean hasStopped() {
|
||||
synchronized (this.stopLock) {
|
||||
@@ -878,6 +882,19 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -879,6 +883,19 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (this.hasStopped) return;
|
||||
this.hasStopped = true;
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ index ce7b96819bf8d7e992c2aafd3013e8a9478e500d..53320d5d9cadb8702f82d94bada32db4
|
|||
// CraftBukkit end
|
||||
if (this.metricsRecorder.isRecording()) {
|
||||
this.cancelRecordingMetrics();
|
||||
@@ -962,7 +979,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -963,7 +980,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.getProfileCache().save(false); // Paper
|
||||
}
|
||||
// Spigot end
|
||||
|
@ -140,7 +140,7 @@ index ce7b96819bf8d7e992c2aafd3013e8a9478e500d..53320d5d9cadb8702f82d94bada32db4
|
|||
}
|
||||
|
||||
public String getLocalIp() {
|
||||
@@ -1055,6 +1083,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1056,6 +1084,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
protected void runServer() {
|
||||
try {
|
||||
|
@ -148,7 +148,7 @@ index ce7b96819bf8d7e992c2aafd3013e8a9478e500d..53320d5d9cadb8702f82d94bada32db4
|
|||
if (!this.initServer()) {
|
||||
throw new IllegalStateException("Failed to initialize server");
|
||||
}
|
||||
@@ -1066,6 +1095,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1067,6 +1096,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.updateStatusIcon(this.status);
|
||||
|
||||
// Spigot start
|
||||
|
@ -167,7 +167,7 @@ index ce7b96819bf8d7e992c2aafd3013e8a9478e500d..53320d5d9cadb8702f82d94bada32db4
|
|||
org.spigotmc.WatchdogThread.hasStarted = true; // Paper
|
||||
Arrays.fill( recentTps, 20 );
|
||||
long start = System.nanoTime(), curTime, tickSection = start; // Paper - Further improve server tick loop
|
||||
@@ -1120,6 +1161,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1121,6 +1162,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
JvmProfiler.INSTANCE.onServerTick(this.averageTickTime);
|
||||
}
|
||||
} catch (Throwable throwable) {
|
||||
|
@ -180,7 +180,7 @@ index ce7b96819bf8d7e992c2aafd3013e8a9478e500d..53320d5d9cadb8702f82d94bada32db4
|
|||
MinecraftServer.LOGGER.error("Encountered an unexpected exception", throwable);
|
||||
// Spigot Start
|
||||
if ( throwable.getCause() != null )
|
||||
@@ -1153,14 +1200,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1154,14 +1201,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.services.profileCache().clearExecutor();
|
||||
}
|
||||
|
||||
|
@ -198,7 +198,7 @@ index ce7b96819bf8d7e992c2aafd3013e8a9478e500d..53320d5d9cadb8702f82d94bada32db4
|
|||
}
|
||||
|
||||
}
|
||||
@@ -1224,6 +1271,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1225,6 +1272,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
@Override
|
||||
public TickTask wrapRunnable(Runnable runnable) {
|
||||
|
@ -211,7 +211,7 @@ index ce7b96819bf8d7e992c2aafd3013e8a9478e500d..53320d5d9cadb8702f82d94bada32db4
|
|||
return new TickTask(this.tickCount, runnable);
|
||||
}
|
||||
|
||||
@@ -1450,6 +1503,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1451,6 +1504,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
try {
|
||||
crashreport = CrashReport.forThrowable(throwable, "Exception ticking world");
|
||||
} catch (Throwable t) {
|
||||
|
@ -219,7 +219,7 @@ index ce7b96819bf8d7e992c2aafd3013e8a9478e500d..53320d5d9cadb8702f82d94bada32db4
|
|||
throw new RuntimeException("Error generating crash report", t);
|
||||
}
|
||||
// Spigot End
|
||||
@@ -1915,7 +1969,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1926,7 +1980,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.packRepository.setSelected(dataPacks);
|
||||
this.worldData.setDataPackConfig(MinecraftServer.getSelectedPacks(this.packRepository));
|
||||
this.resources.managers.updateRegistryTags(this.registryAccess());
|
||||
|
@ -330,7 +330,7 @@ index 5f65aa89dfb21fced457a3a9fef6ba05385b6b76..291bcca206722c86bca6d13058d18c41
|
|||
final String msg = String.format("BlockEntity threw exception at %s:%s,%s,%s", LevelChunk.this.getLevel().getWorld().getName(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ());
|
||||
net.minecraft.server.MinecraftServer.LOGGER.error(msg, throwable);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 365b2983fde7f635f40aff796e4342ee76ae46bd..1186e259b7e1bb5feb1d6ecefd6ab1cb3d467654 100644
|
||||
index 4b3a431701fa1e1e1595301291baccd5bafa52f6..b5ed78fa95349974c71ac7113e5f6533bec9385e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2073,7 +2073,7 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -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 53320d5d9cadb8702f82d94bada32db4c1b32f26..407cfb88d3a6c9c699ca42df2642d9f6fad87cbd 100644
|
||||
index fe3faf1e8a102cd63c1976cf63403bbd1e8e2a90..3de332f5b08a6f7651437f8f5579632de6d3ef77 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -868,6 +868,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -869,6 +869,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 53320d5d9cadb8702f82d94bada32db4c1b32f26..407cfb88d3a6c9c699ca42df2642d9f6
|
|||
private final Object stopLock = new Object();
|
||||
public final boolean hasStopped() {
|
||||
synchronized (this.stopLock) {
|
||||
@@ -882,6 +883,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -883,6 +884,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (this.hasStopped) return;
|
||||
this.hasStopped = true;
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ index 53320d5d9cadb8702f82d94bada32db4c1b32f26..407cfb88d3a6c9c699ca42df2642d9f6
|
|||
// Paper start - kill main thread, and kill it hard
|
||||
shutdownThread = Thread.currentThread();
|
||||
org.spigotmc.WatchdogThread.doStop(); // Paper
|
||||
@@ -1011,6 +1013,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1012,6 +1014,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
public void safeShutdown(boolean flag, boolean isRestarting) {
|
||||
this.isRestarting = isRestarting;
|
||||
|
@ -74,7 +74,7 @@ index ec2825b6d276b6200c4bec5580d012f1eaed722e..e51c03e05c4407ad3a51e573a5e79b00
|
|||
this.connection.send(new ClientboundDisconnectPacket(ichatmutablecomponent));
|
||||
this.connection.disconnect(ichatmutablecomponent);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index fd9f329c4e32027cec28eb9e66ec5c39997916e9..4568e9641490addccd530cfc962758c82cd29a34 100644
|
||||
index d45d1ec667fba102a20f62df1b207a95b06318b7..96e4ba547472cbb29009574458865090d63464e3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1000,6 +1000,7 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -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 407cfb88d3a6c9c699ca42df2642d9f6fad87cbd..df40ab29f928fa31ccedb9afb64da7e193a8d1f7 100644
|
||||
index 3de332f5b08a6f7651437f8f5579632de6d3ef77..1774d6011ea165a36576f283de6531eed873ee4c 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -907,6 +907,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -908,6 +908,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// CraftBukkit start
|
||||
if (this.server != null) {
|
||||
this.server.disablePlugins();
|
||||
|
@ -22,7 +22,7 @@ index 407cfb88d3a6c9c699ca42df2642d9f6fad87cbd..df40ab29f928fa31ccedb9afb64da7e1
|
|||
// CraftBukkit end
|
||||
if (this.getConnection() != null) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 7859cda59999ab1b7b22af6cd682c1afe8a7029f..586415d732bf9a1bb8ec2227b447f64912d3b4e4 100644
|
||||
index 9933bd2998e2b3723ee87e4f6710f74758bd8107..e8f45ff744c9d297ea803392c988a86a8cbbe5fe 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1009,6 +1009,35 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -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 df40ab29f928fa31ccedb9afb64da7e193a8d1f7..049ec7c3be31f957e0a662a16939d5ef1868a4e3 100644
|
||||
index 1774d6011ea165a36576f283de6531eed873ee4c..3496da11b02d823f6445b6b50d44ee2d2d7435af 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -788,7 +788,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -789,7 +789,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
chunkproviderserver.getLightEngine().setTaskPerBatch(worldserver.paperConfig().misc.lightQueueSize); // Paper - increase light queue size
|
||||
// CraftBukkit start
|
||||
// this.updateMobSpawningFlags();
|
||||
|
@ -20,7 +20,7 @@ index df40ab29f928fa31ccedb9afb64da7e193a8d1f7..049ec7c3be31f957e0a662a16939d5ef
|
|||
|
||||
this.forceTicks = false;
|
||||
// CraftBukkit end
|
||||
@@ -1692,11 +1692,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1693,11 +1693,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ index df40ab29f928fa31ccedb9afb64da7e193a8d1f7..049ec7c3be31f957e0a662a16939d5ef
|
|||
}
|
||||
}
|
||||
|
||||
@@ -1710,7 +1713,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1711,7 +1714,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
while (iterator.hasNext()) {
|
||||
ServerLevel worldserver = (ServerLevel) iterator.next();
|
||||
|
||||
|
@ -89,7 +89,7 @@ index 9075ff5455422feacb6edb6f4fe424a2becf94ed..ea1f0477f416f9e852ea92083781d7eb
|
|||
|
||||
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 30d0c22d4576f0aef49bb9fb08ff3c9a8edf8d5a..41250053943118526ee36e296b19c1a68c434aa5 100644
|
||||
index ffe92ac27172e9f00b7941a574d98475b4daff94..50226c6672ffb933fe7e22bf43641983eb6caa54 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3258,7 +3258,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
@ -102,7 +102,7 @@ index 30d0c22d4576f0aef49bb9fb08ff3c9a8edf8d5a..41250053943118526ee36e296b19c1a6
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 586415d732bf9a1bb8ec2227b447f64912d3b4e4..2a135947a7d5b934454dc86e4bfdfd1145f6f3aa 100644
|
||||
index e8f45ff744c9d297ea803392c988a86a8cbbe5fe..b4cc5f89b6694f1f3fc38d822a0f503c170d45c4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -949,8 +949,8 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -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 049ec7c3be31f957e0a662a16939d5ef1868a4e3..9ce0c366b81ee8468cfcca1bd9fb8ed49ffea0ba 100644
|
||||
index 3496da11b02d823f6445b6b50d44ee2d2d7435af..2257a93b9f28a3b30f03ecb08e21346e0deeb8bf 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -851,7 +851,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -852,7 +852,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
try {
|
||||
this.isSaving = true;
|
||||
|
@ -17,7 +17,7 @@ index 049ec7c3be31f957e0a662a16939d5ef1868a4e3..9ce0c366b81ee8468cfcca1bd9fb8ed4
|
|||
flag3 = this.saveAllChunks(suppressLogs, flush, force);
|
||||
} finally {
|
||||
this.isSaving = false;
|
||||
@@ -1398,13 +1398,28 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1399,13 +1399,28 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 9ce0c366b81ee8468cfcca1bd9fb8ed49ffea0ba..343eb9e6417f94bec66b4d9ef583e04d603755cd 100644
|
||||
index 2257a93b9f28a3b30f03ecb08e21346e0deeb8bf..ac65ff966b5ecd0960340c5a4063843e7c5582f3 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2004,6 +2004,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2015,6 +2015,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 343eb9e6417f94bec66b4d9ef583e04d603755cd..31c37ba3593d70f2f71ed5e0679c6188e2179f47 100644
|
||||
index ac65ff966b5ecd0960340c5a4063843e7c5582f3..115e598dcb075a8019b588b878e9d22994f0ce9f 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2070,13 +2070,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2081,13 +2081,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 31c37ba3593d70f2f71ed5e0679c6188e2179f47..5dd7b6669a9afbc7f2d78a7eded7fbf91eadc2b9 100644
|
||||
index 115e598dcb075a8019b588b878e9d22994f0ce9f..7b6828a1d93715d39107964ae2a809d6508414ed 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1966,7 +1966,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1977,7 +1977,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
return this.functionManager;
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ index 31c37ba3593d70f2f71ed5e0679c6188e2179f47..5dd7b6669a9afbc7f2d78a7eded7fbf9
|
|||
RegistryAccess.Frozen iregistrycustom_dimension = this.registryAccess();
|
||||
CompletableFuture<Void> completablefuture = CompletableFuture.supplyAsync(() -> {
|
||||
Stream<String> stream = dataPacks.stream(); // CraftBukkit - decompile error
|
||||
@@ -1992,6 +1998,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2003,6 +2009,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.packRepository.setSelected(dataPacks);
|
||||
this.worldData.setDataPackConfig(MinecraftServer.getSelectedPacks(this.packRepository));
|
||||
this.resources.managers.updateRegistryTags(this.registryAccess());
|
||||
|
|
|
@ -193,10 +193,10 @@ index 0000000000000000000000000000000000000000..6f39e343147803e15e7681c993b8797a
|
|||
+public record RegistryKey<API extends Keyed, MINECRAFT>(Class<API> apiClass, ResourceKey<? extends Registry<MINECRAFT>> resourceKey) {
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 5dd7b6669a9afbc7f2d78a7eded7fbf91eadc2b9..3d8917c3baa0c308fe85cafcd332bfbe9bffede9 100644
|
||||
index 7b6828a1d93715d39107964ae2a809d6508414ed..70464c6d858132dd21e0ec70154e66c1285a4940 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1998,6 +1998,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2009,6 +2009,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.packRepository.setSelected(dataPacks);
|
||||
this.worldData.setDataPackConfig(MinecraftServer.getSelectedPacks(this.packRepository));
|
||||
this.resources.managers.updateRegistryTags(this.registryAccess());
|
||||
|
|
|
@ -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 3d8917c3baa0c308fe85cafcd332bfbe9bffede9..20d9fc16c4fffd6eaf4d8048dc93068a9e5d3b7c 100644
|
||||
index 70464c6d858132dd21e0ec70154e66c1285a4940..28fd97f854b6d86b738b3f3acdcc186d87d54136 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1493,6 +1493,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1494,6 +1494,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
|
||||
|
|
|
@ -282,10 +282,10 @@ index 0000000000000000000000000000000000000000..b4d0b7ecd56ab952319946854168c129
|
|||
+
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 20d9fc16c4fffd6eaf4d8048dc93068a9e5d3b7c..67c2ad20d0c1d63dcd43d9570fbcb5b9a30f4ee1 100644
|
||||
index 28fd97f854b6d86b738b3f3acdcc186d87d54136..666a97330ff03802f42b7d0d80ec083c134a4714 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1670,7 +1670,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1671,7 +1671,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
@Override
|
||||
public void sendSystemMessage(Component message) {
|
||||
|
|
|
@ -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 67c2ad20d0c1d63dcd43d9570fbcb5b9a30f4ee1..f73f16ffc65467db8fa370beddffb7cae054a13c 100644
|
||||
index 666a97330ff03802f42b7d0d80ec083c134a4714..7ddb096b0532e50f19d6d81095b1a708ba92b336 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2087,7 +2087,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2098,7 +2098,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)
|
||||
|
|
|
@ -272,10 +272,10 @@ index ce4aed84d751a48dcd2a8409190db4a22d78f77b..0a843e0afbcb1af8e2641515eb244b79
|
|||
Main.LOGGER.info("Forcing world upgrade! {}", session.getLevelId()); // CraftBukkit
|
||||
WorldUpgrader worldupgrader = new WorldUpgrader(session, dataFixer, generatorOptions, eraseCache);
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index f73f16ffc65467db8fa370beddffb7cae054a13c..4ad7c5377c67fd156353166145b1edd39e41cd02 100644
|
||||
index 7ddb096b0532e50f19d6d81095b1a708ba92b336..c4f76705c0aae300abf8e4c7b06b6db791f14071 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -542,11 +542,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -543,11 +543,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
worlddata = new PrimaryLevelData(worldsettings, generatorsettings, Lifecycle.stable());
|
||||
}
|
||||
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)
|
||||
|
@ -288,7 +288,7 @@ index f73f16ffc65467db8fa370beddffb7cae054a13c..4ad7c5377c67fd156353166145b1edd3
|
|||
|
||||
PrimaryLevelData iworlddataserver = worlddata;
|
||||
WorldGenSettings generatorsettings = worlddata.worldGenSettings();
|
||||
@@ -561,6 +557,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -562,6 +558,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
biomeProvider = gen.getDefaultBiomeProvider(worldInfo);
|
||||
}
|
||||
|
||||
|
@ -356,7 +356,7 @@ index a96a6af2bcec3134b7caa32299bd07af50e83b89..0d96d1c0b66c57c680759f3567ef1b0c
|
|||
return this.regionCache.getAndMoveToFirst(ChunkPos.asLong(chunkcoordintpair.getRegionX(), chunkcoordintpair.getRegionZ()));
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 887bf340b56177099bc5c55ac185fb66d8a080f7..cb2a03fa0fab132db498be708cb2870a6a8549ef 100644
|
||||
index 5196eef152a64269f460b3631aba455b0b434246..e8f327693e8b488790bf58d4927497402211bf1d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1202,12 +1202,7 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerKickEvent causes
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 4ad7c5377c67fd156353166145b1edd39e41cd02..d7a20955b145a23917364726045ce7a5c53c867b 100644
|
||||
index c4f76705c0aae300abf8e4c7b06b6db791f14071..c4a2fd7a2104ad94c4835981b08ebb4ce2529629 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2090,7 +2090,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2101,7 +2101,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)
|
||||
|
@ -57,7 +57,7 @@ index 65637a33ba171a4b598f70cd943d24b0ee44a69f..57a9146bf2dee7a60aab16716e25348f
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index f3a8b36956dbb8b9396bac4fc17aae7a3cb1d594..c8e99e115c0c40834cc73c8373bb757ea7e1e88f 100644
|
||||
index de2d10a57b8146bd8d039577b8d48889a2c96d93..00f78ce251301217317698a65939065403b6580a 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -344,7 +344,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
|
|
@ -19,10 +19,10 @@ index 23e564b05ba438924180c91f9b19a60731eedd1b..5ec241d49ff5e3a161a39006f05823a5
|
|||
|
||||
private MinecraftTimings() {}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index d7a20955b145a23917364726045ce7a5c53c867b..07d717295beb6fff7d8b3387b895e046bd7482c2 100644
|
||||
index c4a2fd7a2104ad94c4835981b08ebb4ce2529629..ec269017109b062db6f73702f36319829c8feaf6 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1302,6 +1302,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1303,6 +1303,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
private boolean pollTaskInternal() {
|
||||
if (super.pollTask()) {
|
||||
|
@ -30,7 +30,7 @@ index d7a20955b145a23917364726045ce7a5c53c867b..07d717295beb6fff7d8b3387b895e046
|
|||
return true;
|
||||
} else {
|
||||
if (this.haveTime()) {
|
||||
@@ -2630,4 +2631,74 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2641,4 +2642,74 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
}
|
||||
// Paper end
|
||||
|
|
|
@ -24,10 +24,10 @@ index 8da1226a6c293abb038d10c7921a77ed71ad06cc..f958f0ae738a6fb26400e17e54c8d69e
|
|||
} else {
|
||||
Holder<E> holder = registry.getOrCreateHolderOrThrow(entryKey);
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 07d717295beb6fff7d8b3387b895e046bd7482c2..e977a523759f360854fa0a3ab8bbb956f0c0fdc2 100644
|
||||
index ec269017109b062db6f73702f36319829c8feaf6..64a4a56d4bb929fddfa415ffea4118cc9c94a4dc 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -550,7 +550,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -551,7 +551,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
long i = generatorsettings.seed();
|
||||
long j = BiomeManager.obfuscateSeed(i);
|
||||
List<CustomSpawner> list = ImmutableList.of(new PhantomSpawner(), new PatrolSpawner(), new CatSpawner(), new VillageSiege(), new WanderingTraderSpawner(iworlddataserver));
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose vanilla BiomeProvider from WorldInfo
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index e977a523759f360854fa0a3ab8bbb956f0c0fdc2..a0f9842bce847d8ff9dfc68801804365ac12e265 100644
|
||||
index 64a4a56d4bb929fddfa415ffea4118cc9c94a4dc..f4b15a660a2ebc13c11649c1555ab0d4068f2cb0 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -559,7 +559,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -560,7 +560,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
// Paper end
|
||||
|
||||
|
@ -18,7 +18,7 @@ index e977a523759f360854fa0a3ab8bbb956f0c0fdc2..a0f9842bce847d8ff9dfc68801804365
|
|||
biomeProvider = gen.getDefaultBiomeProvider(worldInfo);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index df17cd9332d9f9e86480714d161be246fb16af56..455e48b74f2e2426b811c421611b1b44daa7c49e 100644
|
||||
index 2a48cb31263426abd7577bbddd1c0504ac42f7e0..3c4fdd1a6e3bf04c523aca2b18632f6439189caa 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1210,7 +1210,7 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -9,10 +9,10 @@ This might result in chunks loading far slower in the nether,
|
|||
for example.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index a0f9842bce847d8ff9dfc68801804365ac12e265..c0139fe1e4edf6e8bc2d0a4988da1567e7967fca 100644
|
||||
index f4b15a660a2ebc13c11649c1555ab0d4068f2cb0..93d5ce396c40648f392961ef94ce1f0eb3939cd5 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1312,6 +1312,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1313,6 +1313,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.executeMidTickTasks(); // Paper - execute chunk tasks mid tick
|
||||
return true;
|
||||
} else {
|
||||
|
@ -20,7 +20,7 @@ index a0f9842bce847d8ff9dfc68801804365ac12e265..c0139fe1e4edf6e8bc2d0a4988da1567
|
|||
if (this.haveTime()) {
|
||||
Iterator iterator = this.getAllLevels().iterator();
|
||||
|
||||
@@ -1319,12 +1320,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1320,12 +1321,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
ServerLevel worldserver = (ServerLevel) iterator.next();
|
||||
|
||||
if (worldserver.getChunkSource().pollTask()) {
|
||||
|
|
|
@ -10,10 +10,10 @@ just looking at the LevelStem key, look at the DimensionType key which
|
|||
is one level below that. Defaults to off to keep vanilla behavior.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index c0139fe1e4edf6e8bc2d0a4988da1567e7967fca..4c04c4b65039219be62e8a742fdf6789efa80e87 100644
|
||||
index 93d5ce396c40648f392961ef94ce1f0eb3939cd5..5d6acecd07497535ed83d20a4f6dd61e167e5be8 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -586,7 +586,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -587,7 +587,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.commandStorage = new CommandStorage(worldpersistentdata);
|
||||
} else {
|
||||
ChunkProgressListener worldloadlistener = this.progressListenerFactory.create(11);
|
||||
|
|
|
@ -7,10 +7,10 @@ Some parts of legacy conversion will need the overworld
|
|||
to get the legacy structure data storage
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 4c04c4b65039219be62e8a742fdf6789efa80e87..7bcfb1420e67f941df4dd39a3b94c02f03ee27fa 100644
|
||||
index 5d6acecd07497535ed83d20a4f6dd61e167e5be8..02a80ba50f2f7454751f2338f8a500bce88f543c 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -598,9 +598,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -599,9 +599,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
worlddata.setModdedInfo(this.getServerModName(), this.getModdedStatus().shouldReportAsModified());
|
||||
|
@ -23,7 +23,7 @@ index 4c04c4b65039219be62e8a742fdf6789efa80e87..7bcfb1420e67f941df4dd39a3b94c02f
|
|||
|
||||
if (worlddata.getCustomBossEvents() != null) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 5cca8ffd11e5d9ab899c7dd75487a41b9f0bb3b8..5f0ee7f4e65408c5679e36985ebd23656cf91700 100644
|
||||
index 941e2b22807373f739925b0d9a3eec28300ac7ff..8d1992ba6446c2c5a3b4e2410603d98110207d5f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1239,10 +1239,11 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -24,10 +24,10 @@ index 0000000000000000000000000000000000000000..6b0bed550763f34e18c9e92f9a47ec0c
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 7bcfb1420e67f941df4dd39a3b94c02f03ee27fa..ecaa4d9ff28551b7039f3489f1884d3b664c8ce6 100644
|
||||
index 02a80ba50f2f7454751f2338f8a500bce88f543c..330b965bcf4740743d131d28b0ff72ba257b2bce 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2021,6 +2021,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2032,6 +2032,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.worldData.setDataPackConfig(MinecraftServer.getSelectedPacks(this.packRepository));
|
||||
this.resources.managers.updateRegistryTags(this.registryAccess());
|
||||
io.papermc.paper.registry.PaperRegistry.clearCaches(); // Paper
|
||||
|
@ -164,7 +164,7 @@ index 3d688e334c7287f41460bd866bfd1155e8bb55d2..55006724ccec9f3de828ec18693728e9
|
|||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 5f0ee7f4e65408c5679e36985ebd23656cf91700..749a551149bad76dd1e037100eb3ebee519793c1 100644
|
||||
index 8d1992ba6446c2c5a3b4e2410603d98110207d5f..91ba3684c73bb127d67c6385bf55e71d96f69075 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -283,6 +283,7 @@ public final class CraftServer implements Server {
|
||||
|
|
|
@ -12,10 +12,10 @@ Subject: [PATCH] Fix save problems on shutdown
|
|||
processed so that the main process queue can be drained
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index ecaa4d9ff28551b7039f3489f1884d3b664c8ce6..a1b3da5cafe2ddae53f088bb18bacc3ecc7e085a 100644
|
||||
index 330b965bcf4740743d131d28b0ff72ba257b2bce..104428d032721fc488c2931c06e802e9b00e47bd 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -953,6 +953,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -954,6 +954,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ index ecaa4d9ff28551b7039f3489f1884d3b664c8ce6..a1b3da5cafe2ddae53f088bb18bacc3e
|
|||
while (this.levels.values().stream().anyMatch((worldserver1) -> {
|
||||
return worldserver1.getChunkSource().chunkMap.hasWork();
|
||||
})) {
|
||||
@@ -965,9 +972,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -966,9 +973,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
worldserver.getChunkSource().tick(() -> {
|
||||
return true;
|
||||
}, false);
|
||||
|
@ -42,7 +42,7 @@ index ecaa4d9ff28551b7039f3489f1884d3b664c8ce6..a1b3da5cafe2ddae53f088bb18bacc3e
|
|||
}
|
||||
|
||||
this.saveAllChunks(false, true, false);
|
||||
@@ -1264,6 +1273,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1265,6 +1274,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
private boolean haveTime() {
|
||||
|
|
|
@ -7,10 +7,10 @@ There are no plans to support creating worlds while worlds are
|
|||
being ticked themselvess.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index a1b3da5cafe2ddae53f088bb18bacc3ecc7e085a..a934226dc9a273fac03c21227f7ef3d50ea080c4 100644
|
||||
index 104428d032721fc488c2931c06e802e9b00e47bd..35a5cc8ed861401d3dd28b08ebc5d40aad82b0df 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -294,6 +294,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -295,6 +295,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
public volatile Thread shutdownThread; // Paper
|
||||
public volatile boolean abnormalExit = false; // Paper
|
||||
|
@ -18,7 +18,7 @@ index a1b3da5cafe2ddae53f088bb18bacc3ecc7e085a..a934226dc9a273fac03c21227f7ef3d5
|
|||
|
||||
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
|
||||
AtomicReference<S> atomicreference = new AtomicReference();
|
||||
@@ -1525,6 +1526,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1526,6 +1527,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// Paper end
|
||||
MinecraftTimings.timeUpdateTimer.stopTiming(); // Spigot // Paper
|
||||
|
||||
|
@ -26,7 +26,7 @@ index a1b3da5cafe2ddae53f088bb18bacc3ecc7e085a..a934226dc9a273fac03c21227f7ef3d5
|
|||
while (iterator.hasNext()) {
|
||||
ServerLevel worldserver = (ServerLevel) iterator.next();
|
||||
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper
|
||||
@@ -1572,6 +1574,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1573,6 +1575,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.profiler.pop();
|
||||
worldserver.explosionDensityCache.clear(); // Paper - Optimize explosions
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ index a1b3da5cafe2ddae53f088bb18bacc3ecc7e085a..a934226dc9a273fac03c21227f7ef3d5
|
|||
this.profiler.popPush("connection");
|
||||
MinecraftTimings.connectionTimer.startTiming(); // Spigot
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 76a2ebaf74b79a63ec83e8adc2a696428cd6427a..75645f3aa877d87d595fb4406e5606af54fb1e5a 100644
|
||||
index bf19acd9587cd9c3da50aba5ede60708652f0d33..e38a56460ff6c6b04ded3a544a27161ba5ab44d8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1137,6 +1137,7 @@ public final class CraftServer implements Server {
|
||||
|
|
Loading…
Reference in New Issue