aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--build-data/dev-imports.txt1
-rw-r--r--patches/server/0005-MC-Dev-fixes.patch25
-rw-r--r--patches/server/0008-Adventure.patch4
-rw-r--r--patches/server/0009-Paper-command.patch (renamed from patches/unapplied/server/0009-Paper-command.patch)0
-rw-r--r--patches/server/0010-Not-implemeneted.patch (renamed from patches/unapplied/server/0010-Not-implemeneted.patch)0
-rw-r--r--patches/server/0011-Paper-Metrics.patch (renamed from patches/unapplied/server/0011-Paper-Metrics.patch)0
-rw-r--r--patches/server/0012-Timings-v2.patch (renamed from patches/unapplied/server/0012-Timings-v2.patch)247
-rw-r--r--patches/server/0013-Add-command-line-option-to-load-extra-plugin-jars-no.patch (renamed from patches/unapplied/server/0013-Add-command-line-option-to-load-extra-plugin-jars-no.patch)8
-rw-r--r--patches/server/0014-Configurable-cactus-bamboo-and-reed-growth-heights.patch (renamed from patches/unapplied/server/0014-Configurable-cactus-bamboo-and-reed-growth-heights.patch)18
-rw-r--r--patches/server/0015-Configurable-baby-zombie-movement-speed.patch (renamed from patches/unapplied/server/0015-Configurable-baby-zombie-movement-speed.patch)2
-rw-r--r--patches/server/0016-Configurable-fishing-time-ranges.patch (renamed from patches/unapplied/server/0016-Configurable-fishing-time-ranges.patch)2
-rw-r--r--patches/server/0017-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch (renamed from patches/unapplied/server/0017-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch)10
-rw-r--r--patches/server/0018-Add-configurable-despawn-distances-for-living-entiti.patch (renamed from patches/unapplied/server/0018-Add-configurable-despawn-distances-for-living-entiti.patch)4
-rw-r--r--patches/server/0019-Allow-for-toggling-of-spawn-chunks.patch (renamed from patches/unapplied/server/0019-Allow-for-toggling-of-spawn-chunks.patch)4
-rw-r--r--patches/server/0020-Drop-falling-block-and-tnt-entities-at-the-specified.patch (renamed from patches/unapplied/server/0020-Drop-falling-block-and-tnt-entities-at-the-specified.patch)4
-rw-r--r--patches/server/0021-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch (renamed from patches/unapplied/server/0021-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch)25
-rw-r--r--patches/server/0022-Implement-Paper-VersionChecker.patch (renamed from patches/unapplied/server/0022-Implement-Paper-VersionChecker.patch)2
-rw-r--r--patches/server/0023-Add-version-history-to-version-command.patch (renamed from patches/unapplied/server/0023-Add-version-history-to-version-command.patch)4
-rw-r--r--patches/server/0024-Player-affects-spawning-API.patch (renamed from patches/unapplied/server/0024-Player-affects-spawning-API.patch)18
-rw-r--r--patches/server/0025-Further-improve-server-tick-loop.patch (renamed from patches/unapplied/server/0025-Further-improve-server-tick-loop.patch)72
-rw-r--r--patches/server/0026-Only-refresh-abilities-if-needed.patch (renamed from patches/unapplied/server/0026-Only-refresh-abilities-if-needed.patch)4
-rw-r--r--patches/server/0027-Entity-Origin-API.patch (renamed from patches/unapplied/server/0027-Entity-Origin-API.patch)18
-rw-r--r--patches/server/0028-Prevent-tile-entity-and-entity-crashes.patch (renamed from patches/unapplied/server/0028-Prevent-tile-entity-and-entity-crashes.patch)8
-rw-r--r--patches/server/0029-Configurable-top-of-nether-void-damage.patch (renamed from patches/unapplied/server/0029-Configurable-top-of-nether-void-damage.patch)4
-rw-r--r--patches/server/0030-Check-online-mode-before-converting-and-renaming-pla.patch (renamed from patches/unapplied/server/0030-Check-online-mode-before-converting-and-renaming-pla.patch)0
-rw-r--r--patches/server/0031-Always-tick-falling-blocks.patch (renamed from patches/unapplied/server/0031-Always-tick-falling-blocks.patch)0
-rw-r--r--patches/server/0032-Configurable-end-credits.patch (renamed from patches/unapplied/server/0032-Configurable-end-credits.patch)4
-rw-r--r--patches/server/0033-Fix-lag-from-explosions-processing-dead-entities.patch (renamed from patches/unapplied/server/0033-Fix-lag-from-explosions-processing-dead-entities.patch)4
-rw-r--r--patches/server/0034-Optimize-explosions.patch (renamed from patches/unapplied/server/0034-Optimize-explosions.patch)14
-rw-r--r--patches/server/0035-Disable-explosion-knockback.patch (renamed from patches/unapplied/server/0035-Disable-explosion-knockback.patch)12
-rw-r--r--patches/server/0036-Disable-thunder.patch (renamed from patches/unapplied/server/0036-Disable-thunder.patch)4
-rw-r--r--patches/server/0037-Disable-ice-and-snow.patch (renamed from patches/unapplied/server/0037-Disable-ice-and-snow.patch)4
-rw-r--r--patches/server/0038-Configurable-mob-spawner-tick-rate.patch (renamed from patches/unapplied/server/0038-Configurable-mob-spawner-tick-rate.patch)8
-rw-r--r--patches/server/0039-Implement-PlayerLocaleChangeEvent.patch (renamed from patches/unapplied/server/0039-Implement-PlayerLocaleChangeEvent.patch)10
-rw-r--r--patches/server/0040-Per-Player-View-Distance-API-placeholders.patch (renamed from patches/unapplied/server/0040-Per-Player-View-Distance-API-placeholders.patch)12
-rw-r--r--patches/server/0041-Add-BeaconEffectEvent.patch (renamed from patches/unapplied/server/0041-Add-BeaconEffectEvent.patch)8
-rw-r--r--patches/server/0042-Configurable-container-update-tick-rate.patch (renamed from patches/unapplied/server/0042-Configurable-container-update-tick-rate.patch)6
-rw-r--r--patches/server/0043-Use-UserCache-for-player-heads.patch (renamed from patches/unapplied/server/0043-Use-UserCache-for-player-heads.patch)0
-rw-r--r--patches/server/0044-Disable-spigot-tick-limiters.patch (renamed from patches/unapplied/server/0044-Disable-spigot-tick-limiters.patch)4
-rw-r--r--patches/server/0045-Add-PlayerInitialSpawnEvent.patch (renamed from patches/unapplied/server/0045-Add-PlayerInitialSpawnEvent.patch)6
-rw-r--r--patches/server/0046-Configurable-Disabling-Cat-Chest-Detection.patch (renamed from patches/unapplied/server/0046-Configurable-Disabling-Cat-Chest-Detection.patch)4
-rw-r--r--patches/server/0047-Ensure-commands-are-not-ran-async.patch (renamed from patches/unapplied/server/0047-Ensure-commands-are-not-ran-async.patch)8
-rw-r--r--patches/server/0048-All-chunks-are-slime-spawn-chunks-toggle.patch (renamed from patches/unapplied/server/0048-All-chunks-are-slime-spawn-chunks-toggle.patch)8
-rw-r--r--patches/server/0049-Expose-server-CommandMap.patch (renamed from patches/unapplied/server/0049-Expose-server-CommandMap.patch)4
-rw-r--r--patches/server/0050-Be-a-bit-more-informative-in-maxHealth-exception.patch (renamed from patches/unapplied/server/0050-Be-a-bit-more-informative-in-maxHealth-exception.patch)0
-rw-r--r--patches/server/0051-Ensure-inv-drag-is-in-bounds.patch (renamed from patches/unapplied/server/0051-Ensure-inv-drag-is-in-bounds.patch)4
-rw-r--r--patches/server/0052-Player-Tab-List-and-Title-APIs.patch (renamed from patches/unapplied/server/0052-Player-Tab-List-and-Title-APIs.patch)8
-rw-r--r--patches/server/0053-Add-configurable-portal-search-radius.patch (renamed from patches/unapplied/server/0053-Add-configurable-portal-search-radius.patch)6
-rw-r--r--patches/server/0054-Add-velocity-warnings.patch (renamed from patches/unapplied/server/0054-Add-velocity-warnings.patch)8
-rw-r--r--patches/server/0055-Configurable-inter-world-teleportation-safety.patch (renamed from patches/unapplied/server/0055-Configurable-inter-world-teleportation-safety.patch)4
-rw-r--r--patches/server/0056-Add-exception-reporting-event.patch (renamed from patches/unapplied/server/0056-Add-exception-reporting-event.patch)24
-rw-r--r--patches/server/0057-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch28
-rw-r--r--patches/server/0058-Disable-Scoreboards-for-non-players-by-default.patch (renamed from patches/unapplied/server/0058-Disable-Scoreboards-for-non-players-by-default.patch)8
-rw-r--r--patches/server/0059-Add-methods-for-working-with-arrows-stuck-in-living-.patch (renamed from patches/unapplied/server/0059-Add-methods-for-working-with-arrows-stuck-in-living-.patch)0
-rw-r--r--patches/server/0060-Chunk-Save-Reattempt.patch (renamed from patches/unapplied/server/0060-Chunk-Save-Reattempt.patch)0
-rw-r--r--patches/unapplied/server/0057-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch27
56 files changed, 324 insertions, 397 deletions
diff --git a/build-data/dev-imports.txt b/build-data/dev-imports.txt
index dfa2024f41..286aeeaaa9 100644
--- a/build-data/dev-imports.txt
+++ b/build-data/dev-imports.txt
@@ -9,4 +9,3 @@
# minecraft net.minecraft.world.level.entity.LevelEntityGetterAdapter
# minecraft net/minecraft/world/level/entity/LevelEntityGetter.java
-minecraft net.minecraft.network.protocol.game.ClientboundPlayerChatPacket
diff --git a/patches/server/0005-MC-Dev-fixes.patch b/patches/server/0005-MC-Dev-fixes.patch
index 6e707d7f08..57ebf7d8be 100644
--- a/patches/server/0005-MC-Dev-fixes.patch
+++ b/patches/server/0005-MC-Dev-fixes.patch
@@ -39,31 +39,6 @@ index eabf34265470e68b56c0d8787a7acffcf9b49e83..c94084aee70d269a71a5423c13a5eba2
}
}
};
-diff --git a/src/main/java/net/minecraft/nbt/ListTag.java b/src/main/java/net/minecraft/nbt/ListTag.java
-index f346306d61854bdc6b395f5d8f799909537a1b50..69423244a1b6658e2c6ad4a7c5329e140b7155a8 100644
---- a/src/main/java/net/minecraft/nbt/ListTag.java
-+++ b/src/main/java/net/minecraft/nbt/ListTag.java
-@@ -2,9 +2,12 @@ package net.minecraft.nbt;
-
- import com.google.common.collect.Iterables;
- import com.google.common.collect.Lists;
-+import it.unimi.dsi.fastutil.bytes.ByteOpenHashSet;
-+import it.unimi.dsi.fastutil.bytes.ByteSet;
- import java.io.DataInput;
- import java.io.DataOutput;
- import java.io.IOException;
-+import java.util.Arrays;
- import java.util.List;
- import java.util.Objects;
-
-@@ -102,6 +105,7 @@ public class ListTag extends CollectionTag<Tag> {
- return "TAG_List";
- }
- };
-+ private static final ByteSet INLINE_ELEMENT_TYPES = new ByteOpenHashSet(Arrays.asList((byte) 1, (byte) 2, (byte) 3, (byte) 4, (byte) 5, (byte) 6)); // Paper - decompiler fix // todo: what is this
- private final List<Tag> list;
- private byte type;
-
diff --git a/src/main/java/net/minecraft/nbt/NbtUtils.java b/src/main/java/net/minecraft/nbt/NbtUtils.java
index 423c750d4a5d719f7bc593aff5b1298e5c3c417b..2df77845b78b9d5fae0a36103d42c8202ee2af9e 100644
--- a/src/main/java/net/minecraft/nbt/NbtUtils.java
diff --git a/patches/server/0008-Adventure.patch b/patches/server/0008-Adventure.patch
index 318003319d..d01c3bcf7e 100644
--- a/patches/server/0008-Adventure.patch
+++ b/patches/server/0008-Adventure.patch
@@ -1425,7 +1425,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 2cbe0230173ad391fe70b0a31d8999927461b5e6..bf00219f3795c0e303960dae3123d1cc6f5b7837 100644
+index 2cbe0230173ad391fe70b0a31d8999927461b5e6..f5f2a60b0c20d64a7523a4339b14f40e15c62633 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;
@@ -1490,7 +1490,7 @@ index 2cbe0230173ad391fe70b0a31d8999927461b5e6..bf00219f3795c0e303960dae3123d1cc
+ // Paper start - Adventure
+ net.kyori.adventure.text.Component quitMessage = this.server.getPlayerList().remove(this.player);
+ if ((quitMessage != null) && !quitMessage.equals(net.kyori.adventure.text.Component.empty())) {
-+ this.server.getPlayerList().broadcastMessage(PaperAdventure.asVanilla(quitMessage), ChatType.SYSTEM, Util.NIL_UUID);
++ this.server.getPlayerList().broadcastSystemMessage(PaperAdventure.asVanilla(quitMessage), ChatType.SYSTEM);
+ // Paper end
}
// CraftBukkit end
diff --git a/patches/unapplied/server/0009-Paper-command.patch b/patches/server/0009-Paper-command.patch
index 4d90a3e7c9..4d90a3e7c9 100644
--- a/patches/unapplied/server/0009-Paper-command.patch
+++ b/patches/server/0009-Paper-command.patch
diff --git a/patches/unapplied/server/0010-Not-implemeneted.patch b/patches/server/0010-Not-implemeneted.patch
index 8820930234..8820930234 100644
--- a/patches/unapplied/server/0010-Not-implemeneted.patch
+++ b/patches/server/0010-Not-implemeneted.patch
diff --git a/patches/unapplied/server/0011-Paper-Metrics.patch b/patches/server/0011-Paper-Metrics.patch
index 9d3f659bbc..9d3f659bbc 100644
--- a/patches/unapplied/server/0011-Paper-Metrics.patch
+++ b/patches/server/0011-Paper-Metrics.patch
diff --git a/patches/unapplied/server/0012-Timings-v2.patch b/patches/server/0012-Timings-v2.patch
index f5ca2ae821..a7af01d745 100644
--- a/patches/unapplied/server/0012-Timings-v2.patch
+++ b/patches/server/0012-Timings-v2.patch
@@ -767,10 +767,10 @@ 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 dd8d14a1b128f801a4e1c811de5990d2602feeb2..f1c94ec44233ce0007a43922d1ca7ba5e71d68bd 100644
+index c763b4d9cc16f8c3ced91ce8656bd238205dedc0..9be29fbb97aced80da8adb693521a8bd870870c5 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -180,7 +180,7 @@ import org.bukkit.craftbukkit.generator.CustomWorldChunkManager;
+@@ -175,7 +175,7 @@ import org.bukkit.craftbukkit.generator.CustomWorldChunkManager;
import org.bukkit.event.server.ServerLoadEvent;
// CraftBukkit end
@@ -779,15 +779,15 @@ index dd8d14a1b128f801a4e1c811de5990d2602feeb2..f1c94ec44233ce0007a43922d1ca7ba5
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements CommandSource, AutoCloseable {
-@@ -893,6 +893,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -850,6 +850,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
- // CraftBukkit end
+
MinecraftServer.LOGGER.info("Stopping server");
+ MinecraftTimings.stopServer(); // Paper
// CraftBukkit start
if (this.server != null) {
this.server.disablePlugins();
-@@ -1135,9 +1136,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1093,9 +1094,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
private boolean haveTime() {
// CraftBukkit start
@@ -809,7 +809,7 @@ index dd8d14a1b128f801a4e1c811de5990d2602feeb2..f1c94ec44233ce0007a43922d1ca7ba5
private void executeModerately() {
this.runAllTasks();
java.util.concurrent.locks.LockSupport.parkNanos("executing tasks", 1000L);
-@@ -1145,9 +1158,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1103,9 +1116,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit end
protected void waitUntilNextTick() {
@@ -821,7 +821,7 @@ index dd8d14a1b128f801a4e1c811de5990d2602feeb2..f1c94ec44233ce0007a43922d1ca7ba5
});
}
-@@ -1233,9 +1246,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1191,9 +1204,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public void onServerExit() {}
public void tickServer(BooleanSupplier shouldKeepTicking) {
@@ -840,7 +840,7 @@ index dd8d14a1b128f801a4e1c811de5990d2602feeb2..f1c94ec44233ce0007a43922d1ca7ba5
++this.tickCount;
this.tickChildren(shouldKeepTicking);
if (i - this.lastServerStatus >= 5000000000L) {
-@@ -1261,15 +1282,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1219,15 +1240,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
if (this.autosavePeriod > 0 && this.tickCount % this.autosavePeriod == 0) { // CraftBukkit
@@ -861,7 +861,7 @@ index dd8d14a1b128f801a4e1c811de5990d2602feeb2..f1c94ec44233ce0007a43922d1ca7ba5
this.profiler.push("tallying");
long l = this.tickTimes[this.tickCount % 100] = Util.getNanos() - i;
-@@ -1279,30 +1303,29 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1237,30 +1261,29 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.frameTimer.logFrameDuration(i1 - i);
this.profiler.pop();
org.spigotmc.WatchdogThread.tick(); // Spigot
@@ -900,7 +900,7 @@ index dd8d14a1b128f801a4e1c811de5990d2602feeb2..f1c94ec44233ce0007a43922d1ca7ba5
// 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) {
-@@ -1310,7 +1333,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1268,7 +1291,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
}
}
@@ -909,7 +909,7 @@ index dd8d14a1b128f801a4e1c811de5990d2602feeb2..f1c94ec44233ce0007a43922d1ca7ba5
while (iterator.hasNext()) {
ServerLevel worldserver = (ServerLevel) iterator.next();
-@@ -1356,24 +1379,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1314,24 +1337,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
this.profiler.popPush("connection");
@@ -941,10 +941,10 @@ index dd8d14a1b128f801a4e1c811de5990d2602feeb2..f1c94ec44233ce0007a43922d1ca7ba5
this.profiler.pop();
}
diff --git a/src/main/java/net/minecraft/server/ServerFunctionManager.java b/src/main/java/net/minecraft/server/ServerFunctionManager.java
-index 2bf81de15b0a34ba85c46ffac8290a3b47576406..48205eb72c63fc22042ba4eef8bd1cf85ef61f8a 100644
+index b7a06306614087dfab4d4dcf83797b5a92c376c5..00a50196f6a4768d84acfbbeec79a0753308f091 100644
--- a/src/main/java/net/minecraft/server/ServerFunctionManager.java
+++ b/src/main/java/net/minecraft/server/ServerFunctionManager.java
-@@ -90,7 +90,7 @@ public class ServerFunctionManager {
+@@ -88,7 +88,7 @@ public class ServerFunctionManager {
} else {
int i;
@@ -954,10 +954,10 @@ index 2bf81de15b0a34ba85c46ffac8290a3b47576406..48205eb72c63fc22042ba4eef8bd1cf8
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 ebd94265f56ecc946ff1834ec0d45673e010453e..1c0fefd539ef82d2d1b33a4974d67dc35ded0e1f 100644
+index a8d69168fd7aefb2ef1639ab7d57e627f0a2cd68..6a0985781a5189d80e998c3991f691c8d8debfb4 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-@@ -66,8 +66,9 @@ import org.apache.logging.log4j.Level;
+@@ -63,8 +63,9 @@ import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.io.IoBuilder;
import org.bukkit.command.CommandSender;
@@ -968,7 +968,7 @@ index ebd94265f56ecc946ff1834ec0d45673e010453e..1c0fefd539ef82d2d1b33a4974d67dc3
import org.bukkit.event.server.RemoteServerCommandEvent;
// CraftBukkit end
-@@ -448,7 +449,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -413,7 +414,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
}
public void handleConsoleInputs() {
@@ -977,7 +977,7 @@ index ebd94265f56ecc946ff1834ec0d45673e010453e..1c0fefd539ef82d2d1b33a4974d67dc3
while (!this.consoleInput.isEmpty()) {
ConsoleInput servercommand = (ConsoleInput) this.consoleInput.remove(0);
-@@ -463,7 +464,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -428,7 +429,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
// CraftBukkit end
}
@@ -986,7 +986,7 @@ index ebd94265f56ecc946ff1834ec0d45673e010453e..1c0fefd539ef82d2d1b33a4974d67dc3
}
@Override
-@@ -699,6 +700,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -679,6 +680,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@Override
public String runCommand(String command) {
@@ -994,7 +994,7 @@ index ebd94265f56ecc946ff1834ec0d45673e010453e..1c0fefd539ef82d2d1b33a4974d67dc3
this.rconConsoleSource.prepareForCommand();
this.executeBlocking(() -> {
// CraftBukkit start - fire RemoteServerCommandEvent
-@@ -707,10 +709,39 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -687,10 +689,39 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
if (event.isCancelled()) {
return;
}
@@ -1035,7 +1035,7 @@ index ebd94265f56ecc946ff1834ec0d45673e010453e..1c0fefd539ef82d2d1b33a4974d67dc3
}
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index d9202f7a5b17d8a5c063c8aba4ce22a53d8f59af..f9e9e00855627b78e8ff018bf6d52c9787fcffeb 100644
+index ef23f9f81a909348ee4ae3d7eb51dbcc430530ca..e9a2a71b1f2bf6c701d4eba8dc31a10015cf7904 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -1,8 +1,10 @@
@@ -1049,34 +1049,7 @@ index d9202f7a5b17d8a5c063c8aba4ce22a53d8f59af..f9e9e00855627b78e8ff018bf6d52c97
import com.google.common.collect.Lists;
import com.google.common.collect.Queues;
import com.google.common.collect.Sets;
-@@ -681,11 +683,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
-
- private CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>> scheduleChunkLoad(ChunkPos pos) {
- return CompletableFuture.supplyAsync(() -> {
-- try {
-+ try (Timing ignored = this.level.timings.chunkLoad.startTimingIfSync()) { // Paper
- this.level.getProfiler().incrementCounter("chunkLoad");
-- CompoundTag nbttagcompound = this.readChunk(pos);
-+ CompoundTag nbttagcompound; // Paper
-+ try (Timing ignored2 = this.level.timings.chunkIO.startTimingIfSync()) { // Paper start - timings
-+ nbttagcompound = this.readChunk(pos);
-+ } // Paper end
-
-- if (nbttagcompound != null) {
-+ if (nbttagcompound != null) {try (Timing ignored2 = this.level.timings.chunkLoadLevelTimer.startTimingIfSync()) { // Paper start - timings
- boolean flag = nbttagcompound.contains("Status", 8);
-
- if (flag) {
-@@ -696,7 +701,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
- }
-
- ChunkMap.LOGGER.error("Chunk file at {} is missing level data, skipping", pos);
-- }
-+ }} // Paper
- } catch (ReportedException reportedexception) {
- Throwable throwable = reportedexception.getCause();
-
-@@ -813,6 +818,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -847,6 +849,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
ChunkStatus chunkstatus = ChunkHolder.getStatus(chunkHolder.getTicketLevel());
return !chunkstatus.isOrAfter(ChunkStatus.FULL) ? ChunkHolder.UNLOADED_CHUNK : either.mapLeft((ichunkaccess) -> {
@@ -1084,7 +1057,7 @@ index d9202f7a5b17d8a5c063c8aba4ce22a53d8f59af..f9e9e00855627b78e8ff018bf6d52c97
ChunkPos chunkcoordintpair = chunkHolder.getPos();
ProtoChunk protochunk = (ProtoChunk) ichunkaccess;
LevelChunk chunk;
-@@ -837,6 +843,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -871,6 +874,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
return chunk;
@@ -1092,7 +1065,7 @@ index d9202f7a5b17d8a5c063c8aba4ce22a53d8f59af..f9e9e00855627b78e8ff018bf6d52c97
});
}, (runnable) -> {
ProcessorHandle mailbox = this.mainThreadMailbox;
-@@ -1384,6 +1391,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1423,6 +1427,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
List<ServerPlayer> list = Lists.newArrayList();
List<ServerPlayer> list1 = this.level.players();
ObjectIterator objectiterator = this.entityMap.values().iterator();
@@ -1100,7 +1073,7 @@ index d9202f7a5b17d8a5c063c8aba4ce22a53d8f59af..f9e9e00855627b78e8ff018bf6d52c97
ChunkMap.TrackedEntity playerchunkmap_entitytracker;
-@@ -1408,14 +1416,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1447,14 +1452,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
playerchunkmap_entitytracker.serverEntity.sendChanges();
}
}
@@ -1119,10 +1092,10 @@ index d9202f7a5b17d8a5c063c8aba4ce22a53d8f59af..f9e9e00855627b78e8ff018bf6d52c97
}
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
-index e4d0035bbf17008642cdcc0e1dca5bae832bbbaa..d198303d4d0cff34156c00176ec2f3f2ad42ada4 100644
+index b0c46312dfb00c13421bb643dbf246610aff897b..63e11397d6efb293b140c4c4bca91e49464e8ea6 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
-@@ -516,13 +516,15 @@ public class ServerChunkCache extends ChunkSource {
+@@ -517,13 +517,15 @@ public class ServerChunkCache extends ChunkSource {
}
gameprofilerfiller.incrementCounter("getChunkCacheMiss");
@@ -1140,7 +1113,7 @@ index e4d0035bbf17008642cdcc0e1dca5bae832bbbaa..d198303d4d0cff34156c00176ec2f3f2
ichunkaccess = (ChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> {
return ichunkaccess1;
}, (playerchunk_failure) -> {
-@@ -720,7 +722,9 @@ public class ServerChunkCache extends ChunkSource {
+@@ -721,7 +723,9 @@ public class ServerChunkCache extends ChunkSource {
public void save(boolean flush) {
this.runDistanceManagerUpdates();
@@ -1150,7 +1123,7 @@ index e4d0035bbf17008642cdcc0e1dca5bae832bbbaa..d198303d4d0cff34156c00176ec2f3f2
}
@Override
-@@ -759,7 +763,9 @@ public class ServerChunkCache extends ChunkSource {
+@@ -760,7 +764,9 @@ public class ServerChunkCache extends ChunkSource {
this.level.timings.doChunkMap.stopTiming(); // Spigot
this.level.getProfiler().popPush("chunks");
if (tickChunks) {
@@ -1160,7 +1133,7 @@ index e4d0035bbf17008642cdcc0e1dca5bae832bbbaa..d198303d4d0cff34156c00176ec2f3f2
}
this.level.timings.doChunkUnload.startTiming(); // Spigot
-@@ -788,13 +794,16 @@ public class ServerChunkCache extends ChunkSource {
+@@ -789,13 +795,16 @@ public class ServerChunkCache extends ChunkSource {
boolean flag1 = level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && worlddata.getGameTime() % level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) == 0L; // CraftBukkit
gameprofilerfiller.push("naturalSpawnCount");
@@ -1177,7 +1150,7 @@ index e4d0035bbf17008642cdcc0e1dca5bae832bbbaa..d198303d4d0cff34156c00176ec2f3f2
while (iterator.hasNext()) {
ChunkHolder playerchunk = (ChunkHolder) iterator.next();
-@@ -823,27 +832,27 @@ public class ServerChunkCache extends ChunkSource {
+@@ -824,27 +833,27 @@ public class ServerChunkCache extends ChunkSource {
}
if (this.level.shouldTickBlocksAt(chunkcoordintpair.toLong())) {
@@ -1211,7 +1184,7 @@ index e4d0035bbf17008642cdcc0e1dca5bae832bbbaa..d198303d4d0cff34156c00176ec2f3f2
}
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index de0f49f3e9134c068aa479067ee2986c981167b8..0750cf27c1b2cac723d68d0e6c2204cbb5795571 100644
+index 501fd02fedf1a47da28d07fd04b63f89368723ce..53280aeb1ec8088dfb34068e16fd2743c0cf86cb 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1,6 +1,8 @@
@@ -1223,15 +1196,15 @@ index de0f49f3e9134c068aa479067ee2986c981167b8..0750cf27c1b2cac723d68d0e6c2204cb
import com.google.common.collect.Lists;
import com.mojang.datafixers.DataFixer;
import com.mojang.datafixers.util.Pair;
-@@ -152,7 +154,6 @@ import net.minecraft.world.ticks.LevelTicks;
- import org.slf4j.Logger;
+@@ -155,7 +157,6 @@ import org.slf4j.Logger;
import org.bukkit.Bukkit;
+ import org.bukkit.Location;
import org.bukkit.WeatherType;
-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
import org.bukkit.craftbukkit.event.CraftEventFactory;
- import org.bukkit.craftbukkit.util.WorldUUID;
- import org.bukkit.event.entity.CreatureSpawnEvent;
-@@ -427,7 +428,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
+ import org.bukkit.craftbukkit.generator.CustomWorldChunkManager;
+ import org.bukkit.craftbukkit.util.CraftNamespacedKey;
+@@ -443,7 +444,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
this.updateSkyBrightness();
this.tickTime();
gameprofilerfiller.popPush("tickPending");
@@ -1240,7 +1213,7 @@ index de0f49f3e9134c068aa479067ee2986c981167b8..0750cf27c1b2cac723d68d0e6c2204cb
if (!this.isDebug()) {
j = this.getGameTime();
gameprofilerfiller.push("blockTicks");
-@@ -436,12 +437,16 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -452,12 +453,16 @@ public class ServerLevel extends Level implements WorldGenLevel {
this.fluidTicks.tick(j, 65536, this::tickFluid);
gameprofilerfiller.pop();
}
@@ -1258,7 +1231,7 @@ index de0f49f3e9134c068aa479067ee2986c981167b8..0750cf27c1b2cac723d68d0e6c2204cb
gameprofilerfiller.popPush("blockEvents");
timings.doSounds.startTiming(); // Spigot
this.runBlockEvents();
-@@ -606,6 +611,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -624,6 +629,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
gameprofilerfiller.popPush("tickBlocks");
@@ -1266,7 +1239,7 @@ index de0f49f3e9134c068aa479067ee2986c981167b8..0750cf27c1b2cac723d68d0e6c2204cb
if (randomTickSpeed > 0) {
LevelChunkSection[] achunksection = chunk.getSections();
int l = achunksection.length;
-@@ -638,6 +644,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -656,6 +662,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
}
@@ -1274,7 +1247,7 @@ index de0f49f3e9134c068aa479067ee2986c981167b8..0750cf27c1b2cac723d68d0e6c2204cb
gameprofilerfiller.pop();
}
-@@ -872,14 +879,22 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -890,14 +897,22 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
public void tickNonPassenger(Entity entity) {
@@ -1298,7 +1271,7 @@ index de0f49f3e9134c068aa479067ee2986c981167b8..0750cf27c1b2cac723d68d0e6c2204cb
entity.setOldPosAndRot();
ProfilerFiller gameprofilerfiller = this.getProfiler();
-@@ -898,7 +913,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -916,7 +931,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
this.tickPassenger(entity, entity1);
}
@@ -1307,16 +1280,16 @@ index de0f49f3e9134c068aa479067ee2986c981167b8..0750cf27c1b2cac723d68d0e6c2204cb
}
-@@ -940,6 +955,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -958,6 +973,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
if (!savingDisabled) {
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit
+ try (co.aikar.timings.Timing ignored = timings.worldSave.startTiming()) { // Paper
if (progressListener != null) {
- progressListener.progressStartNoAbort(new TranslatableComponent("menu.savingLevel"));
+ progressListener.progressStartNoAbort(Component.translatable("menu.savingLevel"));
}
-@@ -949,7 +965,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
- progressListener.progressStage(new TranslatableComponent("menu.savingChunks"));
+@@ -967,7 +983,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
+ progressListener.progressStage(Component.translatable("menu.savingChunks"));
}
+ timings.worldSaveChunks.startTiming(); // Paper
@@ -1327,62 +1300,54 @@ index de0f49f3e9134c068aa479067ee2986c981167b8..0750cf27c1b2cac723d68d0e6c2204cb
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 9dd29a669a10735819d3be03e4693850de58bb28..96c59b0e5ac3d36c8ecd513b64723e7dbe5d9b3a 100644
+index f5f2a60b0c20d64a7523a4339b14f40e15c62633..a75353e96d0e0a017e4a5dc84c04a5c594535439 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -210,6 +210,7 @@ import org.bukkit.inventory.CraftingInventory;
- import org.bukkit.inventory.EquipmentSlot;
- import org.bukkit.inventory.InventoryView;
- import org.bukkit.inventory.SmithingInventory;
-+import co.aikar.timings.MinecraftTimings; // Paper
- // CraftBukkit end
-
- public class ServerGamePacketListenerImpl implements ServerPlayerConnection, ServerGamePacketListener {
-@@ -288,7 +289,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
+@@ -310,7 +310,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
// CraftBukkit end
public void tick() {
- org.bukkit.craftbukkit.SpigotTimings.playerConnectionTimer.startTiming(); // Spigot
- this.resetPosition();
- this.player.xo = this.player.getX();
- this.player.yo = this.player.getY();
-@@ -364,7 +364,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
+ if (this.ackBlockChangesUpTo > -1) {
+ this.send(new ClientboundBlockChangedAckPacket(this.ackBlockChangesUpTo));
+ this.ackBlockChangesUpTo = -1;
+@@ -391,7 +390,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
this.player.resetLastActionTime(); // CraftBukkit - SPIGOT-854
- this.disconnect(new TranslatableComponent("multiplayer.disconnect.idling"));
+ this.disconnect(Component.translatable("multiplayer.disconnect.idling"));
}
- org.bukkit.craftbukkit.SpigotTimings.playerConnectionTimer.stopTiming(); // Spigot
+ this.chatPreviewThrottler.tick();
+ }
+@@ -2021,7 +2019,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
}
-@@ -1946,7 +1945,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
- // CraftBukkit end
-
- private void handleCommand(String input) {
+ private void handleCommand(String s) {
- org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.startTiming(); // Spigot
-+ MinecraftTimings.playerCommandTimer.startTiming(); // Paper
- // CraftBukkit start - whole method
++ co.aikar.timings.MinecraftTimings.playerCommandTimer.startTiming(); // Paper
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
- this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + input);
-@@ -1957,7 +1956,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
+ this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
+
+@@ -2031,7 +2029,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
this.cserver.getPluginManager().callEvent(event);
if (event.isCancelled()) {
- org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.stopTiming(); // Spigot
-+ MinecraftTimings.playerCommandTimer.stopTiming(); // Paper
++ co.aikar.timings.MinecraftTimings.playerCommandTimer.stopTiming(); // Paper
return;
}
-@@ -1970,7 +1969,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
+@@ -2044,7 +2042,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
java.util.logging.Logger.getLogger(ServerGamePacketListenerImpl.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
return;
} finally {
- org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.stopTiming(); // Spigot
-+ MinecraftTimings.playerCommandTimer.stopTiming(); // Paper
++ co.aikar.timings.MinecraftTimings.playerCommandTimer.stopTiming(); // Paper
}
- // this.server.getCommands().performCommand(this.player.createCommandSourceStack(), s);
- // CraftBukkit end
+ }
+ // CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index fbe28ea0fd3bf85b564cf6156e1a2a7efa75822d..5d7298a045ea827a5530faee62061d0f4ea34e2b 100644
+index 821b9c0ba003163195a461dd0bce1fa9ffd0a146..870fb4ffb01ba291d9d3aabfd722e669a477e209 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1,5 +1,6 @@
@@ -1392,7 +1357,7 @@ index fbe28ea0fd3bf85b564cf6156e1a2a7efa75822d..5d7298a045ea827a5530faee62061d0f
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
-@@ -1013,10 +1014,11 @@ public abstract class PlayerList {
+@@ -1017,10 +1018,11 @@ public abstract class PlayerList {
}
public void saveAll() {
@@ -1406,10 +1371,10 @@ index fbe28ea0fd3bf85b564cf6156e1a2a7efa75822d..5d7298a045ea827a5530faee62061d0f
public UserWhiteList getWhiteList() {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index e99f7f5eae48e635f167744394ce559ea06971ea..63cbe322c272761e769abaa1e707e50c0acbfd8d 100644
+index 277a9fc7b61361f472eae171a3546c85da4f30b4..76dc492e9c2239a09de9ead5de50abb86a97f452 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -128,7 +128,6 @@ import org.bukkit.craftbukkit.event.CraftPortalEvent;
+@@ -131,7 +131,6 @@ import org.bukkit.craftbukkit.event.CraftPortalEvent;
import org.bukkit.entity.Hanging;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Vehicle;
@@ -1417,7 +1382,7 @@ index e99f7f5eae48e635f167744394ce559ea06971ea..63cbe322c272761e769abaa1e707e50c
import org.bukkit.event.entity.EntityCombustByEntityEvent;
import org.bukkit.event.hanging.HangingBreakByEntityEvent;
import org.bukkit.event.vehicle.VehicleBlockCollisionEvent;
-@@ -295,7 +294,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
+@@ -298,7 +297,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
public boolean lastDamageCancelled; // SPIGOT-5339, SPIGOT-6252, SPIGOT-6777: Keep track if the event was canceled
public boolean persistentInvisibility = false;
public BlockPos lastLavaContact;
@@ -1425,7 +1390,7 @@ index e99f7f5eae48e635f167744394ce559ea06971ea..63cbe322c272761e769abaa1e707e50c
// Spigot start
public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
public final boolean defaultActivationState;
-@@ -744,7 +742,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
+@@ -748,7 +746,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
public void move(MoverType movementType, Vec3 movement) {
@@ -1433,7 +1398,7 @@ index e99f7f5eae48e635f167744394ce559ea06971ea..63cbe322c272761e769abaa1e707e50c
if (this.noPhysics) {
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
} else {
-@@ -906,7 +903,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
+@@ -912,7 +909,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
this.level.getProfiler().pop();
}
}
@@ -1442,10 +1407,10 @@ index e99f7f5eae48e635f167744394ce559ea06971ea..63cbe322c272761e769abaa1e707e50c
protected boolean isHorizontalCollisionMinor(Vec3 adjustedMovement) {
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
-index d790c37753f019b682fe00bea392359ba18bf204..8699a3bd63e2df83615ae39a6873d9874f0fb8da 100644
+index d14757d30040c3c9030309a8bb4a37e0c9a4d8db..0c7c8b8671738d9ec408f5dc7f2950a9991858b8 100644
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
-@@ -296,7 +296,14 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
+@@ -305,7 +305,14 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
return Registry.ENTITY_TYPE.getOptional(ResourceLocation.tryParse(id));
}
@@ -1460,7 +1425,7 @@ index d790c37753f019b682fe00bea392359ba18bf204..8699a3bd63e2df83615ae39a6873d987
this.builtInRegistryHolder = Registry.ENTITY_TYPE.createIntrusiveHolder(this);
this.factory = factory;
this.category = spawnGroup;
-@@ -308,6 +315,14 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
+@@ -317,6 +324,14 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
this.dimensions = dimensions;
this.clientTrackingRange = maxTrackDistance;
this.updateInterval = trackTickInterval;
@@ -1475,7 +1440,7 @@ index d790c37753f019b682fe00bea392359ba18bf204..8699a3bd63e2df83615ae39a6873d987
}
@Nullable
-@@ -568,6 +583,12 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
+@@ -567,6 +582,12 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
return this.updateInterval;
}
@@ -1488,7 +1453,7 @@ index d790c37753f019b682fe00bea392359ba18bf204..8699a3bd63e2df83615ae39a6873d987
public boolean trackDeltas() {
return this != EntityType.PLAYER && this != EntityType.LLAMA_SPIT && this != EntityType.WITHER && this != EntityType.BAT && this != EntityType.ITEM_FRAME && this != EntityType.GLOW_ITEM_FRAME && this != EntityType.LEASH_KNOT && this != EntityType.PAINTING && this != EntityType.END_CRYSTAL && this != EntityType.EVOKER_FANGS;
}
-@@ -666,7 +687,7 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
+@@ -665,7 +686,7 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
Util.fetchChoiceType(References.ENTITY_TREE, id);
}
@@ -1498,10 +1463,10 @@ index d790c37753f019b682fe00bea392359ba18bf204..8699a3bd63e2df83615ae39a6873d987
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index c2b768c949cbf8d5e1db5a99812eb31c47194e0e..c8e59de21c1fc217068f40fc5c4c87cbfa58d329 100644
+index ba7037a44b2fba6aafcbc4081c5c481a2cdcfd3b..c7017b86a3268aef0baff2ae0a56155aafc6a067 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -139,7 +139,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
+@@ -140,7 +140,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
import org.bukkit.event.player.PlayerItemConsumeEvent;
// CraftBukkit end
@@ -1510,7 +1475,7 @@ index c2b768c949cbf8d5e1db5a99812eb31c47194e0e..c8e59de21c1fc217068f40fc5c4c87cb
public abstract class LivingEntity extends Entity {
-@@ -2762,7 +2762,6 @@ public abstract class LivingEntity extends Entity {
+@@ -2795,7 +2795,6 @@ public abstract class LivingEntity extends Entity {
@Override
public void tick() {
@@ -1518,7 +1483,7 @@ index c2b768c949cbf8d5e1db5a99812eb31c47194e0e..c8e59de21c1fc217068f40fc5c4c87cb
super.tick();
this.updatingUsingItem();
this.updateSwimAmount();
-@@ -2803,9 +2802,7 @@ public abstract class LivingEntity extends Entity {
+@@ -2836,9 +2835,7 @@ public abstract class LivingEntity extends Entity {
}
}
@@ -1528,7 +1493,7 @@ index c2b768c949cbf8d5e1db5a99812eb31c47194e0e..c8e59de21c1fc217068f40fc5c4c87cb
double d0 = this.getX() - this.xo;
double d1 = this.getZ() - this.zo;
float f = (float) (d0 * d0 + d1 * d1);
-@@ -2885,8 +2882,6 @@ public abstract class LivingEntity extends Entity {
+@@ -2918,8 +2915,6 @@ public abstract class LivingEntity extends Entity {
if (this.isSleeping()) {
this.setXRot(0.0F);
}
@@ -1537,7 +1502,7 @@ index c2b768c949cbf8d5e1db5a99812eb31c47194e0e..c8e59de21c1fc217068f40fc5c4c87cb
}
public void detectEquipmentUpdates() {
-@@ -3068,7 +3063,6 @@ public abstract class LivingEntity extends Entity {
+@@ -3101,7 +3096,6 @@ public abstract class LivingEntity extends Entity {
this.setDeltaMovement(d4, d5, d6);
this.level.getProfiler().push("ai");
@@ -1545,7 +1510,7 @@ index c2b768c949cbf8d5e1db5a99812eb31c47194e0e..c8e59de21c1fc217068f40fc5c4c87cb
if (this.isImmobile()) {
this.jumping = false;
this.xxa = 0.0F;
-@@ -3078,7 +3072,6 @@ public abstract class LivingEntity extends Entity {
+@@ -3111,7 +3105,6 @@ public abstract class LivingEntity extends Entity {
this.serverAiStep();
this.level.getProfiler().pop();
}
@@ -1553,7 +1518,7 @@ index c2b768c949cbf8d5e1db5a99812eb31c47194e0e..c8e59de21c1fc217068f40fc5c4c87cb
this.level.getProfiler().pop();
this.level.getProfiler().push("jump");
-@@ -3113,9 +3106,9 @@ public abstract class LivingEntity extends Entity {
+@@ -3146,9 +3139,9 @@ public abstract class LivingEntity extends Entity {
this.updateFallFlying();
AABB axisalignedbb = this.getBoundingBox();
@@ -1565,7 +1530,7 @@ index c2b768c949cbf8d5e1db5a99812eb31c47194e0e..c8e59de21c1fc217068f40fc5c4c87cb
this.level.getProfiler().pop();
this.level.getProfiler().push("freezing");
boolean flag1 = this.getType().is(EntityTypeTags.FREEZE_HURTS_EXTRA_TYPES);
-@@ -3144,9 +3137,7 @@ public abstract class LivingEntity extends Entity {
+@@ -3177,9 +3170,7 @@ public abstract class LivingEntity extends Entity {
this.checkAutoSpinAttack(axisalignedbb, this.getBoundingBox());
}
@@ -1576,10 +1541,10 @@ index c2b768c949cbf8d5e1db5a99812eb31c47194e0e..c8e59de21c1fc217068f40fc5c4c87cb
if (!this.level.isClientSide && this.isSensitiveToWater() && this.isInWaterRainOrBubble()) {
this.hurt(DamageSource.DROWN, 1.0F);
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 47f625a30f3f2aa95d94f571abf5af95eee68912..d097223e30de74d5347792fb6d0eecb254099f73 100644
+index 914e42e983d56d9c85b1583f57afab699054f4d6..861ebb82ab009588809fe2c8a4f05fbdcfe6f750 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -81,7 +81,6 @@ import org.bukkit.Bukkit;
+@@ -83,7 +83,6 @@ import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.CraftWorld;
@@ -1587,7 +1552,7 @@ index 47f625a30f3f2aa95d94f571abf5af95eee68912..d097223e30de74d5347792fb6d0eecb2
import org.bukkit.craftbukkit.block.CapturedBlockState;
import org.bukkit.craftbukkit.block.CraftBlockState;
import org.bukkit.craftbukkit.block.data.CraftBlockData;
-@@ -147,7 +146,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -153,7 +152,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public final com.destroystokyo.paper.PaperWorldConfig paperConfig; // Paper
@@ -1596,7 +1561,7 @@ index 47f625a30f3f2aa95d94f571abf5af95eee68912..d097223e30de74d5347792fb6d0eecb2
public static BlockPos lastPhysicsProblem; // Spigot
private org.spigotmc.TickLimiter entityLimiter;
private org.spigotmc.TickLimiter tileLimiter;
-@@ -238,7 +237,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -249,7 +248,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public void onBorderSetDamageSafeZOne(WorldBorder border, double safeZoneRadius) {}
});
// CraftBukkit end
@@ -1605,7 +1570,7 @@ index 47f625a30f3f2aa95d94f571abf5af95eee68912..d097223e30de74d5347792fb6d0eecb2
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
}
-@@ -727,15 +726,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -685,15 +684,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
timings.tileEntityTick.stopTiming(); // Spigot
this.tickingBlockEntities = false;
@@ -1623,10 +1588,10 @@ index 47f625a30f3f2aa95d94f571abf5af95eee68912..d097223e30de74d5347792fb6d0eecb2
CrashReport crashreport = CrashReport.forThrowable(throwable, "Ticking entity");
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Entity being ticked");
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
-index e72f44910f7390da9e2d78c5bb8f14d5abf9562b..54125cf5957f8165551e077c47d02b7daa578efb 100644
+index 950c468cad2937cd9a077a8f7a3d227662576a9a..60c5d4c97a340120f49f51b3d1dc7e6f2a19a936 100644
--- a/src/main/java/net/minecraft/world/level/block/Block.java
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
-@@ -89,6 +89,15 @@ public class Block extends BlockBehaviour implements ItemLike {
+@@ -91,6 +91,15 @@ public class Block extends BlockBehaviour implements ItemLike {
public static final int UPDATE_LIMIT = 512;
protected final StateDefinition<Block, BlockState> stateDefinition;
private BlockState defaultBlockState;
@@ -1661,10 +1626,10 @@ index dec38e58e30c84887e9d29436c0f76c70c0a627d..be08224c8107aab3e9a3645a20977dd1
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
public CraftPersistentDataContainer persistentDataContainer;
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
-index 73a99db6c31dec822514392a6102b7f8cc3b2738..5496c9ae4af9658164098356532da47351808b51 100644
+index ab986a3d1dc2f605b5b84d2b62cd97007e3a2c22..58a245b2ca6e65d491694142ad04d38236b46434 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
-@@ -661,6 +661,7 @@ public class LevelChunk extends ChunkAccess {
+@@ -681,6 +681,7 @@ public class LevelChunk extends ChunkAccess {
server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkLoadEvent(this.bukkitChunk, this.needsDecoration));
if (this.needsDecoration) {
@@ -1672,7 +1637,7 @@ index 73a99db6c31dec822514392a6102b7f8cc3b2738..5496c9ae4af9658164098356532da473
this.needsDecoration = false;
java.util.Random random = new java.util.Random();
random.setSeed(this.level.getSeed());
-@@ -680,6 +681,7 @@ public class LevelChunk extends ChunkAccess {
+@@ -700,6 +701,7 @@ public class LevelChunk extends ChunkAccess {
}
}
server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkPopulateEvent(this.bukkitChunk));
@@ -1681,10 +1646,10 @@ index 73a99db6c31dec822514392a6102b7f8cc3b2738..5496c9ae4af9658164098356532da473
}
}
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
-index 95abf42577725383a2b49242c28b81beef487ee5..4e5cfc508e356691a9a249013553f97e77c213b0 100644
+index 98ba88896c73651591b8ad8e070868fb443ae999..864e2e0355a5fb8c1d4a5b0896ba299faf9ea534 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
-@@ -490,13 +490,10 @@ public class ChunkSerializer {
+@@ -507,13 +507,10 @@ public class ChunkSerializer {
ListTag nbttaglist1 = ChunkSerializer.getListOfCompoundsOrNull(nbt, "block_entities");
return nbttaglist == null && nbttaglist1 == null ? null : (chunk) -> {
@@ -1698,7 +1663,7 @@ index 95abf42577725383a2b49242c28b81beef487ee5..4e5cfc508e356691a9a249013553f97e
if (nbttaglist1 != null) {
for (int i = 0; i < nbttaglist1.size(); ++i) {
CompoundTag nbttagcompound1 = nbttaglist1.getCompound(i);
-@@ -514,7 +511,6 @@ public class ChunkSerializer {
+@@ -531,7 +528,6 @@ public class ChunkSerializer {
}
}
}
@@ -1707,10 +1672,10 @@ index 95abf42577725383a2b49242c28b81beef487ee5..4e5cfc508e356691a9a249013553f97e
};
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 81e78644417764cee33f81cdb116a91fb1d8ccf3..a40995140db011271bd092b0b7415d1eee0e8b18 100644
+index 5408ba255ee04b75e2f4977fc7aa73866945037c..b3061e6f6c2d645520cecc6cfd8f2a079a8f7f96 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2361,12 +2361,31 @@ public final class CraftServer implements Server {
+@@ -2344,12 +2344,31 @@ public final class CraftServer implements Server {
private final org.bukkit.Server.Spigot spigot = new org.bukkit.Server.Spigot()
{
@@ -1912,12 +1877,12 @@ index b0ffa23faf62629043dfd613315eaf9c5fcc2cfe..00000000000000000000000000000000
- }
-}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index cd288194bee65fbf3b7fe8a5d36e09acb1931e57..b3769c6d96d33d870c38349f1a6255dbf840089a 100644
+index d8d634ea96a03a643f6743da8af23480824ced98..485411ddc5ccbe17bc0ecd7caa9a8d5a15f042a7 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-@@ -2282,6 +2282,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
- packet.components = components;
- CraftPlayer.this.getHandle().connection.send(packet);
+@@ -2273,6 +2273,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+
+ CraftPlayer.this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundSystemChatPacket(components, i));
}
+
+ // Paper start
@@ -2108,7 +2073,7 @@ index e52ef47b783785dc214746b678e7b549aea9a274..3d90b3426873a3528af14f7f1ab0adae
this.value = value;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index ec5946ce9061573ec7d2a2ec52b71e0228ae0b25..6c5dfff9616cf6bbfc09471a3a81059acb4ffcbb 100644
+index 43e31362a980a4f300864321224bdf3ca92110ff..482be6fc06d034fe41ac3aab9201295f529c574f 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -217,6 +217,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
diff --git a/patches/unapplied/server/0013-Add-command-line-option-to-load-extra-plugin-jars-no.patch b/patches/server/0013-Add-command-line-option-to-load-extra-plugin-jars-no.patch
index 5b51677c1e..44a2100b07 100644
--- a/patches/unapplied/server/0013-Add-command-line-option-to-load-extra-plugin-jars-no.patch
+++ b/patches/server/0013-Add-command-line-option-to-load-extra-plugin-jars-no.patch
@@ -7,10 +7,10 @@ Subject: [PATCH] Add command line option to load extra plugin jars not in the
ex: java -jar paperclip.jar nogui -add-plugin=/path/to/plugin.jar -add-plugin=/path/to/another/plugin_jar.jar
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index a40995140db011271bd092b0b7415d1eee0e8b18..a9f3bddd33cf7f7773c262f1b818eed9895987ef 100644
+index b3061e6f6c2d645520cecc6cfd8f2a079a8f7f96..4764f4da6dd6a0a8d197d9ddb0a641316a2d5f2d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -399,10 +399,15 @@ public final class CraftServer implements Server {
+@@ -394,10 +394,15 @@ public final class CraftServer implements Server {
public void loadPlugins() {
this.pluginManager.registerInterface(JavaPluginLoader.class);
@@ -29,7 +29,7 @@ index a40995140db011271bd092b0b7415d1eee0e8b18..a9f3bddd33cf7f7773c262f1b818eed9
for (Plugin plugin : plugins) {
try {
String message = String.format("Loading %s", plugin.getDescription().getFullName());
-@@ -417,6 +422,35 @@ public final class CraftServer implements Server {
+@@ -412,6 +417,35 @@ public final class CraftServer implements Server {
}
}
@@ -66,7 +66,7 @@ index a40995140db011271bd092b0b7415d1eee0e8b18..a9f3bddd33cf7f7773c262f1b818eed9
if (type == PluginLoadOrder.STARTUP) {
this.helpMap.clear();
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
-index aff3116c77277dcb4d3825d33f40a0b17258a0ba..ae4dc96da9e50ce8645e1b5da13e29085e916e98 100644
+index 0d427758182ebe01d612d5140e4a0d519a96d8c0..193a97a99b8ffe54e456276445e931b2ca1d53db 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -142,6 +142,12 @@ public class Main {
diff --git a/patches/unapplied/server/0014-Configurable-cactus-bamboo-and-reed-growth-heights.patch b/patches/server/0014-Configurable-cactus-bamboo-and-reed-growth-heights.patch
index bf6fc2d7ed..c0caf34180 100644
--- a/patches/unapplied/server/0014-Configurable-cactus-bamboo-and-reed-growth-heights.patch
+++ b/patches/server/0014-Configurable-cactus-bamboo-and-reed-growth-heights.patch
@@ -28,10 +28,10 @@ index 0853ff7641103447f458b2dc08076c27e3937074..3f7ec17466e4fae7139672854e2c8223
+ }
}
diff --git a/src/main/java/net/minecraft/world/level/block/BambooBlock.java b/src/main/java/net/minecraft/world/level/block/BambooBlock.java
-index f088f866b8f28d2627e4a60527a1f8dfa243bb47..482d6cd1065df5b0703301d403efb42ca4d5363b 100644
+index 4d9c6b462101dd533b0d08c40e0257e39ccbead3..081c6732e78bf732d6f2328249dc4fe8b04397b8 100644
--- a/src/main/java/net/minecraft/world/level/block/BambooBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/BambooBlock.java
-@@ -135,7 +135,7 @@ public class BambooBlock extends Block implements BonemealableBlock {
+@@ -130,7 +130,7 @@ public class BambooBlock extends Block implements BonemealableBlock {
if (random.nextInt(Math.max(1, (int) (100.0F / world.spigotConfig.bambooModifier) * 3)) == 0 && world.isEmptyBlock(pos.above()) && world.getRawBrightness(pos.above(), 0) >= 9) { // Spigot
int i = this.getHeightBelowUpToMax(world, pos) + 1;
@@ -40,7 +40,7 @@ index f088f866b8f28d2627e4a60527a1f8dfa243bb47..482d6cd1065df5b0703301d403efb42c
this.growBamboo(state, world, pos, random, i);
}
}
-@@ -166,7 +166,7 @@ public class BambooBlock extends Block implements BonemealableBlock {
+@@ -161,7 +161,7 @@ public class BambooBlock extends Block implements BonemealableBlock {
int i = this.getHeightAboveUpToMax(world, pos);
int j = this.getHeightBelowUpToMax(world, pos);
@@ -49,7 +49,7 @@ index f088f866b8f28d2627e4a60527a1f8dfa243bb47..482d6cd1065df5b0703301d403efb42c
}
@Override
-@@ -185,7 +185,7 @@ public class BambooBlock extends Block implements BonemealableBlock {
+@@ -180,7 +180,7 @@ public class BambooBlock extends Block implements BonemealableBlock {
BlockPos blockposition1 = pos.above(i);
BlockState iblockdata1 = world.getBlockState(blockposition1);
@@ -58,7 +58,7 @@ index f088f866b8f28d2627e4a60527a1f8dfa243bb47..482d6cd1065df5b0703301d403efb42c
return;
}
-@@ -226,7 +226,7 @@ public class BambooBlock extends Block implements BonemealableBlock {
+@@ -221,7 +221,7 @@ public class BambooBlock extends Block implements BonemealableBlock {
}
int j = (Integer) state.getValue(BambooBlock.AGE) != 1 && !iblockdata2.is(Blocks.BAMBOO) ? 0 : 1;
@@ -67,7 +67,7 @@ index f088f866b8f28d2627e4a60527a1f8dfa243bb47..482d6cd1065df5b0703301d403efb42c
// CraftBukkit start
if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(world, pos, pos.above(), (BlockState) ((BlockState) ((BlockState) this.defaultBlockState().setValue(BambooBlock.AGE, j)).setValue(BambooBlock.LEAVES, blockpropertybamboosize)).setValue(BambooBlock.STAGE, k), 3)) {
-@@ -241,7 +241,7 @@ public class BambooBlock extends Block implements BonemealableBlock {
+@@ -236,7 +236,7 @@ public class BambooBlock extends Block implements BonemealableBlock {
protected int getHeightAboveUpToMax(BlockGetter world, BlockPos pos) {
int i;
@@ -76,7 +76,7 @@ index f088f866b8f28d2627e4a60527a1f8dfa243bb47..482d6cd1065df5b0703301d403efb42c
;
}
-@@ -251,7 +251,7 @@ public class BambooBlock extends Block implements BonemealableBlock {
+@@ -246,7 +246,7 @@ public class BambooBlock extends Block implements BonemealableBlock {
protected int getHeightBelowUpToMax(BlockGetter world, BlockPos pos) {
int i;
@@ -86,7 +86,7 @@ index f088f866b8f28d2627e4a60527a1f8dfa243bb47..482d6cd1065df5b0703301d403efb42c
}
diff --git a/src/main/java/net/minecraft/world/level/block/CactusBlock.java b/src/main/java/net/minecraft/world/level/block/CactusBlock.java
-index b6b769fb354187cb31f878b87cce63049c0c7cf8..f1bbfc85582d29a50a82f9207509985dcb76b693 100644
+index 3b4be44e4204435a360bc224a9b2651952dedf02..0d255201ebce3bb495a4e086da5e4d9195cbc091 100644
--- a/src/main/java/net/minecraft/world/level/block/CactusBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/CactusBlock.java
@@ -55,7 +55,7 @@ public class CactusBlock extends Block {
@@ -99,7 +99,7 @@ index b6b769fb354187cb31f878b87cce63049c0c7cf8..f1bbfc85582d29a50a82f9207509985d
if (j >= (byte) range(3, ((100.0F / world.spigotConfig.cactusModifier) * 15) + 0.5F, 15)) { // Spigot
diff --git a/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java b/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java
-index d40492e9729f165ed944ab2c9fa81cde042ce49c..66c06e0f7c8d223a2b00bab57a15e3a705fe176a 100644
+index e5956a2a68f168a4c08c6c409ae7b288eb792660..3c893c7b1cdb56e527553f07c2bd8ba4b6707b77 100644
--- a/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java
@@ -52,7 +52,7 @@ public class SugarCaneBlock extends Block {
diff --git a/patches/unapplied/server/0015-Configurable-baby-zombie-movement-speed.patch b/patches/server/0015-Configurable-baby-zombie-movement-speed.patch
index ddd91d8735..574818bc6f 100644
--- a/patches/unapplied/server/0015-Configurable-baby-zombie-movement-speed.patch
+++ b/patches/server/0015-Configurable-baby-zombie-movement-speed.patch
@@ -25,7 +25,7 @@ index 3f7ec17466e4fae7139672854e2c8223ada16b76..4d787f0596be1a44724ade309cc00e11
+ }
}
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
-index 627aeb45342c2804f911572056a63aa1cb0110e7..953f138b6cd48cc94bc23a4321a9684b4214637e 100644
+index ee91459775aada8cc2e5c4403436b11c15e8e674..cf80a2592e923967fa440f8c383a9dc977177638 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
@@ -76,7 +76,7 @@ import org.bukkit.event.entity.EntityTransformEvent;
diff --git a/patches/unapplied/server/0016-Configurable-fishing-time-ranges.patch b/patches/server/0016-Configurable-fishing-time-ranges.patch
index 6a61c46653..1c7ac7762b 100644
--- a/patches/unapplied/server/0016-Configurable-fishing-time-ranges.patch
+++ b/patches/server/0016-Configurable-fishing-time-ranges.patch
@@ -22,7 +22,7 @@ index 4d787f0596be1a44724ade309cc00e115778a797..4b9122a3e094aa9e0a789f35fb6b0f9a
+ }
}
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
-index 1fe9c591fdb1b8c3d457964a6877a91b56470016..34ee9c22ed5bca2406588a4b6a045bbc51c64920 100644
+index 792d85ea46d392a27ac89c42e037dc90d33fad7f..91fde59289100133a4f473bee176ff1b6805faae 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
@@ -85,6 +85,10 @@ public class FishingHook extends Projectile {
diff --git a/patches/unapplied/server/0017-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch b/patches/server/0017-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch
index 2d884dbbd2..6c43ebf7bc 100644
--- a/patches/unapplied/server/0017-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch
+++ b/patches/server/0017-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch
@@ -19,10 +19,10 @@ index 4b9122a3e094aa9e0a789f35fb6b0f9a7a53f772..d2ac0123812224181afae8fca96058dd
+ }
}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 63cbe322c272761e769abaa1e707e50c0acbfd8d..d778209604c71a0728748dac91a5cb993f4357b7 100644
+index 76dc492e9c2239a09de9ead5de50abb86a97f452..4b55e1a3b373f141f60f4ba392abeda37d2364e0 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -1278,6 +1278,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
+@@ -1296,6 +1296,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
return this.isInWater() || this.isInRain();
}
@@ -31,10 +31,10 @@ index 63cbe322c272761e769abaa1e707e50c0acbfd8d..d778209604c71a0728748dac91a5cb99
return this.isInWater() || this.isInRain() || this.isInBubbleColumn();
}
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
-index 625641be06b7afafec59ce19ecd39c54bf840351..28d0be9c3391a636fdc04c2e081ed462ed512c5d 100644
+index decf753d088983ef6bbf32a32a6ee8d3cca3ee69..4f58fae1b3738e7e0507a46df275a258c94fcec4 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
-@@ -105,6 +105,7 @@ public abstract class Mob extends LivingEntity {
+@@ -110,6 +110,7 @@ public abstract class Mob extends LivingEntity {
private final BodyRotationControl bodyRotationControl;
protected PathNavigation navigation;
public GoalSelector goalSelector;
@@ -42,7 +42,7 @@ index 625641be06b7afafec59ce19ecd39c54bf840351..28d0be9c3391a636fdc04c2e081ed462
public GoalSelector targetSelector;
@Nullable
private LivingEntity target;
-@@ -801,7 +802,17 @@ public abstract class Mob extends LivingEntity {
+@@ -812,7 +813,17 @@ public abstract class Mob extends LivingEntity {
@Override
protected final void serverAiStep() {
++this.noActionTime;
diff --git a/patches/unapplied/server/0018-Add-configurable-despawn-distances-for-living-entiti.patch b/patches/server/0018-Add-configurable-despawn-distances-for-living-entiti.patch
index e65088b2f3..0be452f163 100644
--- a/patches/unapplied/server/0018-Add-configurable-despawn-distances-for-living-entiti.patch
+++ b/patches/server/0018-Add-configurable-despawn-distances-for-living-entiti.patch
@@ -65,10 +65,10 @@ index d2ac0123812224181afae8fca96058ddc8cdff1e..3afadc8d916714398974d77aa0f10937
+ }
}
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
-index 28d0be9c3391a636fdc04c2e081ed462ed512c5d..57a856cc52db63861d38e1b94c899b47b7572139 100644
+index 4f58fae1b3738e7e0507a46df275a258c94fcec4..88b021b7d1b71bd3fa64b54ca0fd52fef93ea9f0 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
-@@ -777,14 +777,14 @@ public abstract class Mob extends LivingEntity {
+@@ -788,14 +788,14 @@ public abstract class Mob extends LivingEntity {
if (entityhuman != null) {
double d0 = entityhuman.distanceToSqr((Entity) this);
diff --git a/patches/unapplied/server/0019-Allow-for-toggling-of-spawn-chunks.patch b/patches/server/0019-Allow-for-toggling-of-spawn-chunks.patch
index e687801372..4f5b39ed6e 100644
--- a/patches/unapplied/server/0019-Allow-for-toggling-of-spawn-chunks.patch
+++ b/patches/server/0019-Allow-for-toggling-of-spawn-chunks.patch
@@ -20,10 +20,10 @@ index 3afadc8d916714398974d77aa0f1093729e008ca..f32726275d18772904883b618be66893
+ }
}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index d097223e30de74d5347792fb6d0eecb254099f73..1cb128fb60636016db826ab3120d586346d88cec 100644
+index 861ebb82ab009588809fe2c8a4f05fbdcfe6f750..efdab784bdec183425a6bc7f376f528c38a94752 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -238,6 +238,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -249,6 +249,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
});
// CraftBukkit end
timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings
diff --git a/patches/unapplied/server/0020-Drop-falling-block-and-tnt-entities-at-the-specified.patch b/patches/server/0020-Drop-falling-block-and-tnt-entities-at-the-specified.patch
index 6620f71fc8..a9e9ba68d4 100644
--- a/patches/unapplied/server/0020-Drop-falling-block-and-tnt-entities-at-the-specified.patch
+++ b/patches/server/0020-Drop-falling-block-and-tnt-entities-at-the-specified.patch
@@ -64,10 +64,10 @@ index e24b46820394c5f220d5bf7c4e763ef95ff9e9ab..bbe15c66917781a8b6950307449f0243
if (this.onGround) {
this.setDeltaMovement(this.getDeltaMovement().multiply(0.7D, -0.5D, 0.7D));
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java b/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java
-index 3e64b1743042a293e2be9e1c16daa979b601e1ed..e430d9214d5abb367fa503e65af463f0e926563e 100644
+index c10c28eb441e65c6285c25b5d4760c876909c724..469dbae2e04a9ded9e46a576b2e1b020801c1395 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java
-@@ -45,6 +45,12 @@ public class MinecartTNT extends AbstractMinecart {
+@@ -46,6 +46,12 @@ public class MinecartTNT extends AbstractMinecart {
public void tick() {
super.tick();
if (this.fuse > 0) {
diff --git a/patches/unapplied/server/0021-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/patches/server/0021-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch
index 85459fbbb3..a803a20447 100644
--- a/patches/unapplied/server/0021-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch
+++ b/patches/server/0021-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch
@@ -5,24 +5,11 @@ Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
stats
-diff --git a/src/main/java/net/minecraft/server/Eula.java b/src/main/java/net/minecraft/server/Eula.java
-index f092497b6defd28c94393e483a9288d121158a1e..df44790b1c342d0a6ff794bea86319fa7498cbae 100644
---- a/src/main/java/net/minecraft/server/Eula.java
-+++ b/src/main/java/net/minecraft/server/Eula.java
-@@ -64,7 +64,7 @@ public class Eula {
- try {
- Properties properties = new Properties();
- properties.setProperty("eula", "false");
-- properties.store(outputStream, "By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula).");
-+ properties.store(outputStream, "By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula).\nYou also agree that tacos are tasty, and the best food in the world."); // Paper - fix lag;
- } catch (Throwable var5) {
- if (outputStream != null) {
- try {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index f1c94ec44233ce0007a43922d1ca7ba5e71d68bd..eef07309b24e88820d35517dd868fff25f777262 100644
+index 9be29fbb97aced80da8adb693521a8bd870870c5..bd549661ccfb29b9a4f9d69956c549ba3e888e31 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1456,7 +1456,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1414,7 +1414,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@DontObfuscate
public String getServerModName() {
@@ -32,10 +19,10 @@ index f1c94ec44233ce0007a43922d1ca7ba5e71d68bd..eef07309b24e88820d35517dd868fff2
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 a9f3bddd33cf7f7773c262f1b818eed9895987ef..e828759ffc9838451f01cb9312cf2c4cffb5528e 100644
+index 4764f4da6dd6a0a8d197d9ddb0a641316a2d5f2d..93947c982c40be873bd1f3273ca69dbdf6820aeb 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -246,7 +246,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
+@@ -241,7 +241,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
import net.md_5.bungee.api.chat.BaseComponent; // Spigot
public final class CraftServer implements Server {
@@ -45,11 +32,11 @@ index a9f3bddd33cf7f7773c262f1b818eed9895987ef..e828759ffc9838451f01cb9312cf2c4c
private final String bukkitVersion = Versioning.getBukkitVersion();
private final Logger logger = Logger.getLogger("Minecraft");
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
-index ae4dc96da9e50ce8645e1b5da13e29085e916e98..a0ac6ba17a46bac4c5363a32e078ab89b260bac8 100644
+index 193a97a99b8ffe54e456276445e931b2ca1d53db..f017abbf3418c6000648950dc05b177f9d41f97b 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -216,12 +216,25 @@ public class Main {
- deadline.add(Calendar.DAY_OF_YEAR, -21);
+ deadline.add(Calendar.DAY_OF_YEAR, -3);
if (buildDate.before(deadline.getTime())) {
System.err.println("*** Error, this build is outdated ***");
- System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***");
diff --git a/patches/unapplied/server/0022-Implement-Paper-VersionChecker.patch b/patches/server/0022-Implement-Paper-VersionChecker.patch
index 564e31bb38..c7b7d7bd2c 100644
--- a/patches/unapplied/server/0022-Implement-Paper-VersionChecker.patch
+++ b/patches/server/0022-Implement-Paper-VersionChecker.patch
@@ -140,7 +140,7 @@ index 0000000000000000000000000000000000000000..351159bbdb0c8045f4983f54dee34430
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 6c5dfff9616cf6bbfc09471a3a81059acb4ffcbb..a47f81c690b9d2a63c21f126ca2727a1d23e626c 100644
+index 482be6fc06d034fe41ac3aab9201295f529c574f..0c040073b004fdbb2daa8e9d2aebdfffad405397 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -421,6 +421,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
diff --git a/patches/unapplied/server/0023-Add-version-history-to-version-command.patch b/patches/server/0023-Add-version-history-to-version-command.patch
index 55eed6ba0b..dadaafa857 100644
--- a/patches/unapplied/server/0023-Add-version-history-to-version-command.patch
+++ b/patches/server/0023-Add-version-history-to-version-command.patch
@@ -201,10 +201,10 @@ 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 1c0fefd539ef82d2d1b33a4974d67dc35ded0e1f..20ff08f1a802d16d2306b570e9fb529946d90f6b 100644
+index 6a0985781a5189d80e998c3991f691c8d8debfb4..9e7fb3e2d423ba1db22819aa8b666ca886d98cf6 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-@@ -204,6 +204,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -197,6 +197,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
return false;
}
com.destroystokyo.paper.PaperConfig.registerCommands();
diff --git a/patches/unapplied/server/0024-Player-affects-spawning-API.patch b/patches/server/0024-Player-affects-spawning-API.patch
index 1dd22a2c37..f6d181c28b 100644
--- a/patches/unapplied/server/0024-Player-affects-spawning-API.patch
+++ b/patches/server/0024-Player-affects-spawning-API.patch
@@ -21,10 +21,10 @@ index 5c3b11f738c1ea19981cc878aa6c2323497391a0..b91a61be7c4829fce0ff8da290eab580
public static Predicate<Entity> withinDistance(double x, double y, double z, double max) {
double d4 = max * max;
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
-index 57a856cc52db63861d38e1b94c899b47b7572139..3d54fa71b2d3532e93fe3636a86150e10fcba31a 100644
+index 88b021b7d1b71bd3fa64b54ca0fd52fef93ea9f0..7827e40e824de85ae1f6ea6fc82455b2cea532cb 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
-@@ -773,7 +773,7 @@ public abstract class Mob extends LivingEntity {
+@@ -784,7 +784,7 @@ public abstract class Mob extends LivingEntity {
if (this.level.getDifficulty() == Difficulty.PEACEFUL && this.shouldDespawnInPeaceful()) {
this.discard();
} else if (!this.isPersistenceRequired() && !this.requiresCustomPersistence()) {
@@ -34,7 +34,7 @@ index 57a856cc52db63861d38e1b94c899b47b7572139..3d54fa71b2d3532e93fe3636a86150e1
if (entityhuman != null) {
double d0 = entityhuman.distanceToSqr((Entity) this);
diff --git a/src/main/java/net/minecraft/world/entity/monster/Silverfish.java b/src/main/java/net/minecraft/world/entity/monster/Silverfish.java
-index 6eaedfabf70b604705ad9a772a2e602c8590b500..97c2c1647fa12650e5963c7c1c746fec2429e3d7 100644
+index 87f66fd33e404367d924137b2d8aac3b06937f43..2dcda3b03796655da443e1b3dd68c6f6bca20d21 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Silverfish.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Silverfish.java
@@ -127,7 +127,7 @@ public class Silverfish extends Monster {
@@ -47,11 +47,11 @@ index 6eaedfabf70b604705ad9a772a2e602c8590b500..97c2c1647fa12650e5963c7c1c746fec
return false;
}
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index 1d4d3d6fc8affde249fb7cda8a3a488b6689130a..067513b240db88b818bd26d74c31fb5f8ee80f5d 100644
+index ec0c4767218f197306b179ed0a9c16a15551fa52..24456bbf2cd9f1878cf545e8d164ff524c321a4c 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -175,6 +175,9 @@ public abstract class Player extends LivingEntity {
- private final ItemCooldowns cooldowns;
+@@ -183,6 +183,9 @@ public abstract class Player extends LivingEntity {
+ private Optional<GlobalPos> lastDeathLocation;
@Nullable
public FishingHook fishing;
+ // Paper start
@@ -61,7 +61,7 @@ index 1d4d3d6fc8affde249fb7cda8a3a488b6689130a..067513b240db88b818bd26d74c31fb5f
// CraftBukkit start
public boolean fauxSleeping;
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
-index 212b23a380a4bcdb1d2995ca2ccfc8a1709691bd..31bfc0c491c9a4cc6782b6c284121f96972517ea 100644
+index ab22310d5ab4ad7014b88080cbd44a2881002b55..c5b9b19763fd944b4f31c6d3c9b71d372f8403cf 100644
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
@@ -51,7 +51,7 @@ public abstract class BaseSpawner {
@@ -117,10 +117,10 @@ index 7c5918f84d2b8f9c778258b7e7d745105effb082..cfb286020b8ee87bad7edbda4cd0b999
for(Player player : this.players()) {
if (EntitySelector.NO_SPECTATORS.test(player) && EntitySelector.LIVING_ENTITY_STILL_ALIVE.test(player)) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index b3769c6d96d33d870c38349f1a6255dbf840089a..0e153d6e1df199a7b2af73c44e7fe784c7d1947c 100644
+index 485411ddc5ccbe17bc0ecd7caa9a8d5a15f042a7..93cf8f31d0cfc8d98519eab0c953271c4a10b548 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-@@ -1961,8 +1961,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+@@ -1959,8 +1959,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public String getLocale() {
return this.getHandle().locale;
diff --git a/patches/unapplied/server/0025-Further-improve-server-tick-loop.patch b/patches/server/0025-Further-improve-server-tick-loop.patch
index 050eaa62f3..96f3215136 100644
--- a/patches/unapplied/server/0025-Further-improve-server-tick-loop.patch
+++ b/patches/server/0025-Further-improve-server-tick-loop.patch
@@ -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 eef07309b24e88820d35517dd868fff25f777262..e26818bd6fb2216ab9b363affe99e4b6c83cca6a 100644
+index bd549661ccfb29b9a4f9d69956c549ba3e888e31..032e6819da27c8616b9b3b6c09bd559e69c35100 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -282,7 +282,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -267,7 +267,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 eef07309b24e88820d35517dd868fff25f777262..e26818bd6fb2216ab9b363affe99e4b6
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
public int autosavePeriod;
public Commands vanillaCommandDispatcher;
-@@ -291,7 +291,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -276,7 +276,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 eef07309b24e88820d35517dd868fff25f777262..e26818bd6fb2216ab9b363affe99e4b6
public final double[] recentTps = new double[ 3 ];
// Spigot end
public static long currentTickLong = 0L; // Paper
-@@ -1003,6 +1003,57 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -960,6 +960,57 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
{
return ( avg * exp ) + ( tps * ( 1 - exp ) );
}
@@ -91,35 +91,35 @@ index eef07309b24e88820d35517dd868fff25f777262..e26818bd6fb2216ab9b363affe99e4b6
// Spigot End
protected void runServer() {
-@@ -1015,26 +1066,33 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -976,26 +1027,33 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
- // Spigot start
- Arrays.fill( recentTps, 20 );
-- long curTime, tickSection = Util.getMillis(), tickCount = 1;
+ // Spigot start
+ Arrays.fill( recentTps, 20 );
+- long curTime, tickSection = Util.getMillis(), tickCount = 1;
+ long start = System.nanoTime(), curTime, tickSection = start; // Paper - Further improve server tick loop
+ lastTick = start - TICK_TIME; // Paper
- while (this.running) {
-- long i = (curTime = Util.getMillis()) - this.nextTickTime;
+ while (this.running) {
+- long i = (curTime = Util.getMillis()) - this.nextTickTime;
+ long i = ((curTime = System.nanoTime()) / (1000L * 1000L)) - this.nextTickTime; // Paper
- if (i > 5000L && this.nextTickTime - this.lastOverloadWarning >= 30000L) { // CraftBukkit
- long j = i / 50L;
+ if (i > 5000L && this.nextTickTime - this.lastOverloadWarning >= 30000L) { // CraftBukkit
+ long j = i / 50L;
- if (this.server.getWarnOnOverload()) // CraftBukkit
-- MinecraftServer.LOGGER.warn("Can't keep up! Is the server overloaded? Running {}ms or {} ticks behind", i, j);
+ if (this.server.getWarnOnOverload()) // CraftBukkit
+- MinecraftServer.LOGGER.warn("Can't keep up! Is the server overloaded? Running {}ms or {} ticks behind", i, j);
+ MinecraftServer.LOGGER.warn("Can't keep up! Is the server overloaded? Running {}ms or {} ticks behind", i, j);
- this.nextTickTime += j * 50L;
- this.lastOverloadWarning = this.nextTickTime;
- }
+ this.nextTickTime += j * 50L;
+ this.lastOverloadWarning = this.nextTickTime;
+ }
- ++MinecraftServer.currentTickLong; // Paper
-- if ( tickCount++ % MinecraftServer.SAMPLE_INTERVAL == 0 )
+ ++MinecraftServer.currentTickLong; // Paper
+- if ( tickCount++ % MinecraftServer.SAMPLE_INTERVAL == 0 )
+ if ( ++MinecraftServer.currentTick % MinecraftServer.SAMPLE_INTERVAL == 0 )
- {
-- double currentTps = 1E3 / ( curTime - tickSection ) * MinecraftServer.SAMPLE_INTERVAL;
-- this.recentTps[0] = MinecraftServer.calcTps( this.recentTps[0], 0.92, currentTps ); // 1/exp(5sec/1min)
-- this.recentTps[1] = MinecraftServer.calcTps( this.recentTps[1], 0.9835, currentTps ); // 1/exp(5sec/5min)
-- this.recentTps[2] = MinecraftServer.calcTps( this.recentTps[2], 0.9945, currentTps ); // 1/exp(5sec/15min)
+ {
+- double currentTps = 1E3 / ( curTime - tickSection ) * MinecraftServer.SAMPLE_INTERVAL;
+- this.recentTps[0] = MinecraftServer.calcTps( this.recentTps[0], 0.92, currentTps ); // 1/exp(5sec/1min)
+- this.recentTps[1] = MinecraftServer.calcTps( this.recentTps[1], 0.9835, currentTps ); // 1/exp(5sec/5min)
+- this.recentTps[2] = MinecraftServer.calcTps( this.recentTps[2], 0.9945, currentTps ); // 1/exp(5sec/15min)
+ final long diff = curTime - tickSection;
+ java.math.BigDecimal currentTps = TPS_BASE.divide(new java.math.BigDecimal(diff), 30, java.math.RoundingMode.HALF_UP);
+ tps1.add(currentTps, diff);
@@ -130,24 +130,24 @@ index eef07309b24e88820d35517dd868fff25f777262..e26818bd6fb2216ab9b363affe99e4b6
+ this.recentTps[1] = tps5.getAverage();
+ this.recentTps[2] = tps15.getAverage();
+ // Paper end
- tickSection = curTime;
- }
- // Spigot end
-@@ -1044,7 +1102,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
- this.debugCommandProfiler = new MinecraftServer.TimeProfiler(Util.getNanos(), this.tickCount);
- }
+ tickSection = curTime;
+ }
+ // Spigot end
+@@ -1005,7 +1063,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+ this.debugCommandProfiler = new MinecraftServer.TimeProfiler(Util.getNanos(), this.tickCount);
+ }
-- MinecraftServer.currentTick = (int) (System.currentTimeMillis() / 50); // CraftBukkit
+- MinecraftServer.currentTick = (int) (System.currentTimeMillis() / 50); // CraftBukkit
+ //MinecraftServer.currentTick = (int) (System.currentTimeMillis() / 50); // CraftBukkit // Paper - don't overwrite current tick time
+ lastTick = curTime;
- this.nextTickTime += 50L;
- this.startMetricsRecordingTick();
- this.profiler.push("tick");
+ this.nextTickTime += 50L;
+ 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 e828759ffc9838451f01cb9312cf2c4cffb5528e..46f895acd74de17784d0c5efc66caf10a8be8686 100644
+index 93947c982c40be873bd1f3273ca69dbdf6820aeb..a7dcdb5cce888f8580b54f7de263110e69285311 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2391,6 +2391,17 @@ public final class CraftServer implements Server {
+@@ -2374,6 +2374,17 @@ public final class CraftServer implements Server {
return CraftMagicNumbers.INSTANCE;
}
diff --git a/patches/unapplied/server/0026-Only-refresh-abilities-if-needed.patch b/patches/server/0026-Only-refresh-abilities-if-needed.patch
index ec23ed75e9..66ff8de838 100644
--- a/patches/unapplied/server/0026-Only-refresh-abilities-if-needed.patch
+++ b/patches/server/0026-Only-refresh-abilities-if-needed.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Only refresh abilities if needed
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index 0e153d6e1df199a7b2af73c44e7fe784c7d1947c..6c866e9fc091b8f2b982d5554f381bfed7d669a9 100644
+index 93cf8f31d0cfc8d98519eab0c953271c4a10b548..2f47906dffa9c11777cab6dfcc3b2eb65ab6f06a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-@@ -1630,12 +1630,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+@@ -1628,12 +1628,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void setFlying(boolean value) {
diff --git a/patches/unapplied/server/0027-Entity-Origin-API.patch b/patches/server/0027-Entity-Origin-API.patch
index 4353084dbe..55dcabdf29 100644
--- a/patches/unapplied/server/0027-Entity-Origin-API.patch
+++ b/patches/server/0027-Entity-Origin-API.patch
@@ -5,12 +5,12 @@ Subject: [PATCH] Entity Origin API
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 0750cf27c1b2cac723d68d0e6c2204cbb5795571..0eb0229125fd027025b6b44dfceddf626fc05399 100644
+index 53280aeb1ec8088dfb34068e16fd2743c0cf86cb..53213d0c2d1b402f28a2da315d18c46deba509bf 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -2027,6 +2027,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
- }
+@@ -2105,6 +2105,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
+ entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
entity.valid = true; // CraftBukkit
+ // Paper start - Set origin location when the entity is being added to the world
+ if (entity.getOriginVector() == null) {
@@ -25,10 +25,10 @@ index 0750cf27c1b2cac723d68d0e6c2204cbb5795571..0eb0229125fd027025b6b44dfceddf62
public void onTrackingEnd(Entity entity) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index d778209604c71a0728748dac91a5cb993f4357b7..ae6c1abe1443f3758fce35a20387f0ed93748af5 100644
+index 4b55e1a3b373f141f60f4ba392abeda37d2364e0..9c967df2e9cb7102ec2d6e4f02971f3342295b5a 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -300,7 +300,27 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
+@@ -303,7 +303,27 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
public long activatedTick = Integer.MIN_VALUE;
public void inactiveTick() { }
// Spigot end
@@ -56,7 +56,7 @@ index d778209604c71a0728748dac91a5cb993f4357b7..ae6c1abe1443f3758fce35a20387f0ed
public float getBukkitYaw() {
return this.yRot;
}
-@@ -1822,6 +1842,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
+@@ -1852,6 +1872,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
this.bukkitEntity.storeBukkitValues(nbt);
}
// CraftBukkit end
@@ -72,7 +72,7 @@ index d778209604c71a0728748dac91a5cb993f4357b7..ae6c1abe1443f3758fce35a20387f0ed
return nbt;
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
-@@ -1946,6 +1975,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
+@@ -1976,6 +2005,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
// CraftBukkit end
@@ -132,10 +132,10 @@ index bbe15c66917781a8b6950307449f0243ffc3c8c7..dfcca1fac06de7a4be9be3c238a738a0
@Nullable
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index 4b7ed15279bbdd116d993f190094f80c888aed69..fdbcf4989f72e1604a2841f565adfeebf8d45622 100644
+index b403022201b34118adddf817b19a8bbdb6229df4..35e6cdd6930209d5c0f1c23c4e6838a5c0d81aa3 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -1154,4 +1154,21 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -1166,4 +1166,21 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return this.spigot;
}
// Spigot end
diff --git a/patches/unapplied/server/0028-Prevent-tile-entity-and-entity-crashes.patch b/patches/server/0028-Prevent-tile-entity-and-entity-crashes.patch
index ee6101afaf..4f9e1e709d 100644
--- a/patches/unapplied/server/0028-Prevent-tile-entity-and-entity-crashes.patch
+++ b/patches/server/0028-Prevent-tile-entity-and-entity-crashes.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Prevent tile entity and entity crashes
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 1cb128fb60636016db826ab3120d586346d88cec..8653fa072825c024e0fb620bdada4adc936b0490 100644
+index efdab784bdec183425a6bc7f376f528c38a94752..0a0625eabfb0574a2a0ce866690ae98b0a260378 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -736,11 +736,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -694,11 +694,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
try {
tickConsumer.accept(entity);
} catch (Throwable throwable) {
@@ -44,10 +44,10 @@ index be08224c8107aab3e9a3645a20977dd14bfff782..c518704386f14cd033307dd976455c35
}
}
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
-index 5496c9ae4af9658164098356532da47351808b51..ed6203119fe2e4ee47a2d51c84df5b7c236f32da 100644
+index 58a245b2ca6e65d491694142ad04d38236b46434..a438025a2102fa911a6941cd9723c84743113dc7 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
-@@ -1024,11 +1024,11 @@ public class LevelChunk extends ChunkAccess {
+@@ -1049,11 +1049,11 @@ public class LevelChunk extends ChunkAccess {
gameprofilerfiller.pop();
} catch (Throwable throwable) {
diff --git a/patches/unapplied/server/0029-Configurable-top-of-nether-void-damage.patch b/patches/server/0029-Configurable-top-of-nether-void-damage.patch
index cf5920b5f4..b7377cd724 100644
--- a/patches/unapplied/server/0029-Configurable-top-of-nether-void-damage.patch
+++ b/patches/server/0029-Configurable-top-of-nether-void-damage.patch
@@ -29,10 +29,10 @@ index b41f6074e0d88b6becb5b931fc4ee94a1f9f2f0b..10c08ed945f950b9c2a5e308f8caa119
+ }
}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index ae6c1abe1443f3758fce35a20387f0ed93748af5..2f35ce076a468ac260e28ba90ac55f7717ee1b13 100644
+index 9c967df2e9cb7102ec2d6e4f02971f3342295b5a..51475d726004b857e0fbaffa9df2c777c2942071 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -648,7 +648,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
+@@ -652,7 +652,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
public void checkOutOfWorld() {
diff --git a/patches/unapplied/server/0030-Check-online-mode-before-converting-and-renaming-pla.patch b/patches/server/0030-Check-online-mode-before-converting-and-renaming-pla.patch
index 64f713e616..64f713e616 100644
--- a/patches/unapplied/server/0030-Check-online-mode-before-converting-and-renaming-pla.patch
+++ b/patches/server/0030-Check-online-mode-before-converting-and-renaming-pla.patch
diff --git a/patches/unapplied/server/0031-Always-tick-falling-blocks.patch b/patches/server/0031-Always-tick-falling-blocks.patch
index c52ac50408..c52ac50408 100644
--- a/patches/unapplied/server/0031-Always-tick-falling-blocks.patch
+++ b/patches/server/0031-Always-tick-falling-blocks.patch
diff --git a/patches/unapplied/server/0032-Configurable-end-credits.patch b/patches/server/0032-Configurable-end-credits.patch
index 53716858cb..5380b3788b 100644
--- a/patches/unapplied/server/0032-Configurable-end-credits.patch
+++ b/patches/server/0032-Configurable-end-credits.patch
@@ -20,10 +20,10 @@ index 10c08ed945f950b9c2a5e308f8caa11955cb0088..067234ed44cae4454acc76b9ebe83ee1
+ }
}
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-index d4d444b5864073fe86bfc7b5a68344b5aae8c05f..726c5f4ef0ad083d18b23990f1f7b61e3866290c 100644
+index 7002d5f5700570e32ebf0b63e340d87d58357162..5940c2435dba421ee8480407f14827a2c876ac94 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-@@ -980,6 +980,7 @@ public class ServerPlayer extends Player {
+@@ -989,6 +989,7 @@ public class ServerPlayer extends Player {
this.unRide();
this.getLevel().removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION);
if (!this.wonGame) {
diff --git a/patches/unapplied/server/0033-Fix-lag-from-explosions-processing-dead-entities.patch b/patches/server/0033-Fix-lag-from-explosions-processing-dead-entities.patch
index 1e41454268..3a8886ecac 100644
--- a/patches/unapplied/server/0033-Fix-lag-from-explosions-processing-dead-entities.patch
+++ b/patches/server/0033-Fix-lag-from-explosions-processing-dead-entities.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix lag from explosions processing dead entities
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
-index 6929aca0759a090703c1c6ab4daffc069010bfbc..4be483b7a8138514f645909eb3e8ea9975c0f41c 100644
+index 2d4122eeee91dd857b2b4abeb5e9b3be19af6f4a..292571fc9fa999d3b92e0fdd56d07ebfb4ae7402 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
-@@ -208,7 +208,7 @@ public class Explosion {
+@@ -206,7 +206,7 @@ public class Explosion {
int i1 = Mth.floor(this.y + (double) f2 + 1.0D);
int j1 = Mth.floor(this.z - (double) f2 - 1.0D);
int k1 = Mth.floor(this.z + (double) f2 + 1.0D);
diff --git a/patches/unapplied/server/0034-Optimize-explosions.patch b/patches/server/0034-Optimize-explosions.patch
index 62609843b9..e7930ba9f5 100644
--- a/patches/unapplied/server/0034-Optimize-explosions.patch
+++ b/patches/server/0034-Optimize-explosions.patch
@@ -25,10 +25,10 @@ index 067234ed44cae4454acc76b9ebe83ee1394fb913..73dda3becdf29dac35f4a0ceea070d17
+ }
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index e26818bd6fb2216ab9b363affe99e4b6c83cca6a..400a59336300b189a1b86621b53817940f9a599e 100644
+index 032e6819da27c8616b9b3b6c09bd559e69c35100..f037503a68f2b7b7c76b6ac7243dde2bf734afbd 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1435,6 +1435,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1393,6 +1393,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.profiler.pop();
this.profiler.pop();
@@ -37,10 +37,10 @@ index e26818bd6fb2216ab9b363affe99e4b6c83cca6a..400a59336300b189a1b86621b5381794
this.profiler.popPush("connection");
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
-index 4be483b7a8138514f645909eb3e8ea9975c0f41c..318e46932409b83bce923937683619946d876dcb 100644
+index 292571fc9fa999d3b92e0fdd56d07ebfb4ae7402..95e59d7c45bb5128b9176e3c172bd51d98449050 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
-@@ -227,7 +227,7 @@ public class Explosion {
+@@ -225,7 +225,7 @@ public class Explosion {
d8 /= d11;
d9 /= d11;
d10 /= d11;
@@ -49,7 +49,7 @@ index 4be483b7a8138514f645909eb3e8ea9975c0f41c..318e46932409b83bce92393768361994
double d13 = (1.0D - d7) * d12;
// CraftBukkit start
-@@ -465,4 +465,84 @@ public class Explosion {
+@@ -470,4 +470,84 @@ public class Explosion {
private BlockInteraction() {}
}
@@ -135,10 +135,10 @@ index 4be483b7a8138514f645909eb3e8ea9975c0f41c..318e46932409b83bce92393768361994
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 8653fa072825c024e0fb620bdada4adc936b0490..7309226b6ee96db7330d712c41157bfde0d03d37 100644
+index 0a0625eabfb0574a2a0ce866690ae98b0a260378..7d86a8744d76e2fe8b3bf4b85152ea2203817713 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -151,6 +151,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -157,6 +157,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
private org.spigotmc.TickLimiter entityLimiter;
private org.spigotmc.TickLimiter tileLimiter;
private int tileTickPosition;
diff --git a/patches/unapplied/server/0035-Disable-explosion-knockback.patch b/patches/server/0035-Disable-explosion-knockback.patch
index 578f030cbf..0bb85e9b20 100644
--- a/patches/unapplied/server/0035-Disable-explosion-knockback.patch
+++ b/patches/server/0035-Disable-explosion-knockback.patch
@@ -19,10 +19,10 @@ index 73dda3becdf29dac35f4a0ceea070d174c546c8b..1d91adcfa636455bf67c6f7ac7d51baa
+ }
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index c8e59de21c1fc217068f40fc5c4c87cbfa58d329..91579d3ead3900ed6ff5b050f80ae031b141c24d 100644
+index c7017b86a3268aef0baff2ae0a56155aafc6a067..062d8c0d48798199319da5ccb422af2f1564f6f6 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -1376,6 +1376,7 @@ public abstract class LivingEntity extends Entity {
+@@ -1399,6 +1399,7 @@ public abstract class LivingEntity extends Entity {
}
}
@@ -30,7 +30,7 @@ index c8e59de21c1fc217068f40fc5c4c87cbfa58d329..91579d3ead3900ed6ff5b050f80ae031
if (flag1) {
if (flag) {
this.level.broadcastEntityEvent(this, (byte) 29);
-@@ -1396,6 +1397,7 @@ public abstract class LivingEntity extends Entity {
+@@ -1419,6 +1420,7 @@ public abstract class LivingEntity extends Entity {
b0 = 2;
}
@@ -38,7 +38,7 @@ index c8e59de21c1fc217068f40fc5c4c87cbfa58d329..91579d3ead3900ed6ff5b050f80ae031
this.level.broadcastEntityEvent(this, b0);
}
-@@ -1419,6 +1421,7 @@ public abstract class LivingEntity extends Entity {
+@@ -1442,6 +1444,7 @@ public abstract class LivingEntity extends Entity {
}
}
@@ -47,10 +47,10 @@ index c8e59de21c1fc217068f40fc5c4c87cbfa58d329..91579d3ead3900ed6ff5b050f80ae031
if (!this.checkTotemDeathProtection(source)) {
SoundEvent soundeffect = this.getDeathSound();
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
-index 318e46932409b83bce923937683619946d876dcb..afac23f1741baaf2a4ee2729f25a0ddf5f2b9d7d 100644
+index 95e59d7c45bb5128b9176e3c172bd51d98449050..2a10a50381b6d6229b7c6e1d32f0d8f96db70bd5 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
-@@ -262,14 +262,14 @@ public class Explosion {
+@@ -260,14 +260,14 @@ public class Explosion {
double d14 = d13;
if (entity instanceof LivingEntity) {
diff --git a/patches/unapplied/server/0036-Disable-thunder.patch b/patches/server/0036-Disable-thunder.patch
index b5bce6005a..ef3e355162 100644
--- a/patches/unapplied/server/0036-Disable-thunder.patch
+++ b/patches/server/0036-Disable-thunder.patch
@@ -19,10 +19,10 @@ index 1d91adcfa636455bf67c6f7ac7d51baaa6db047f..a591d52ed44213d7932690136796d3e0
+ }
}
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 0eb0229125fd027025b6b44dfceddf626fc05399..9383ba7a6bc91fa73a235e3d94de8a5332ba2924 100644
+index 53213d0c2d1b402f28a2da315d18c46deba509bf..94a796143e25a0e8914158efed4ce01a440f3bcc 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -561,7 +561,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -579,7 +579,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
gameprofilerfiller.push("thunder");
BlockPos blockposition;
diff --git a/patches/unapplied/server/0037-Disable-ice-and-snow.patch b/patches/server/0037-Disable-ice-and-snow.patch
index 12873e3696..714fbbc137 100644
--- a/patches/unapplied/server/0037-Disable-ice-and-snow.patch
+++ b/patches/server/0037-Disable-ice-and-snow.patch
@@ -19,10 +19,10 @@ index a591d52ed44213d7932690136796d3e068b06987..18e7960624e4e882677145c3bedd0026
+ }
}
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 9383ba7a6bc91fa73a235e3d94de8a5332ba2924..e330fc198705ff2a4d8503f8710e6424afc9fbbf 100644
+index 94a796143e25a0e8914158efed4ce01a440f3bcc..a04e75293b1d196341bc641ee7da975bf9baec13 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -585,7 +585,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -603,7 +603,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
gameprofilerfiller.popPush("iceandsnow");
diff --git a/patches/unapplied/server/0038-Configurable-mob-spawner-tick-rate.patch b/patches/server/0038-Configurable-mob-spawner-tick-rate.patch
index 5e6deb98c3..6e1a8bbec6 100644
--- a/patches/unapplied/server/0038-Configurable-mob-spawner-tick-rate.patch
+++ b/patches/server/0038-Configurable-mob-spawner-tick-rate.patch
@@ -19,18 +19,18 @@ index 18e7960624e4e882677145c3bedd00263a57b051..fcbb0d6cd09a9c80a8725c9cf0c503fa
+ }
}
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
-index 31bfc0c491c9a4cc6782b6c284121f96972517ea..6aab3df317a9612da9b83284aa6056f0c7cf436c 100644
+index c5b9b19763fd944b4f31c6d3c9b71d372f8403cf..5bc0071c5309548219cbcd902d7020ff4a5ca6b7 100644
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
@@ -42,6 +42,7 @@ public abstract class BaseSpawner {
+ public int maxNearbyEntities = 6;
public int requiredPlayerRange = 16;
public int spawnRange = 4;
- private final Random random = new Random();
+ private int tickDelay = 0; // Paper
public BaseSpawner() {}
-@@ -75,13 +76,18 @@ public abstract class BaseSpawner {
+@@ -76,13 +77,18 @@ public abstract class BaseSpawner {
}
public void serverTick(ServerLevel world, BlockPos pos) {
@@ -51,7 +51,7 @@ index 31bfc0c491c9a4cc6782b6c284121f96972517ea..6aab3df317a9612da9b83284aa6056f0
} else {
boolean flag = false;
-@@ -146,8 +152,7 @@ public abstract class BaseSpawner {
+@@ -148,8 +154,7 @@ public abstract class BaseSpawner {
((Mob) entity).finalizeSpawn(world, world.getCurrentDifficultyAt(entity.blockPosition()), MobSpawnType.SPAWNER, (SpawnGroupData) null, (CompoundTag) null);
}
// Spigot Start
diff --git a/patches/unapplied/server/0039-Implement-PlayerLocaleChangeEvent.patch b/patches/server/0039-Implement-PlayerLocaleChangeEvent.patch
index 0708928324..ab0f2cd5c6 100644
--- a/patches/unapplied/server/0039-Implement-PlayerLocaleChangeEvent.patch
+++ b/patches/server/0039-Implement-PlayerLocaleChangeEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Implement PlayerLocaleChangeEvent
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-index 726c5f4ef0ad083d18b23990f1f7b61e3866290c..d184c3f8f8f86b783f17d71886c9b43a74482f2a 100644
+index 5940c2435dba421ee8480407f14827a2c876ac94..732622344982137b5ac051c6d510c7860fbe4e0a 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-@@ -1733,7 +1733,7 @@ public class ServerPlayer extends Player {
+@@ -1755,7 +1755,7 @@ public class ServerPlayer extends Player {
return s;
}
@@ -17,7 +17,7 @@ index 726c5f4ef0ad083d18b23990f1f7b61e3866290c..d184c3f8f8f86b783f17d71886c9b43a
public java.util.Locale adventure$locale = java.util.Locale.US; // Paper
public void updateOptions(ServerboundClientInformationPacket packet) {
// CraftBukkit start
-@@ -1741,9 +1741,10 @@ public class ServerPlayer extends Player {
+@@ -1763,9 +1763,10 @@ public class ServerPlayer extends Player {
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT);
this.server.server.getPluginManager().callEvent(event);
}
@@ -30,10 +30,10 @@ index 726c5f4ef0ad083d18b23990f1f7b61e3866290c..d184c3f8f8f86b783f17d71886c9b43a
this.locale = packet.language;
// Paper start
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index 6c866e9fc091b8f2b982d5554f381bfed7d669a9..9b03879242d0f299a51cb4e91dd83b68a8ea3b9c 100644
+index 2f47906dffa9c11777cab6dfcc3b2eb65ab6f06a..dd3e2db7ef1e60223ef14852b14495c2573bf2e8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-@@ -1961,8 +1961,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+@@ -1959,8 +1959,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public String getLocale() {
diff --git a/patches/unapplied/server/0040-Per-Player-View-Distance-API-placeholders.patch b/patches/server/0040-Per-Player-View-Distance-API-placeholders.patch
index 2b3d9ed383..3ea0f87b40 100644
--- a/patches/unapplied/server/0040-Per-Player-View-Distance-API-placeholders.patch
+++ b/patches/server/0040-Per-Player-View-Distance-API-placeholders.patch
@@ -7,10 +7,10 @@ I hope to look at this more in-depth soon. It appears doable.
However this should not block the update.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-index d184c3f8f8f86b783f17d71886c9b43a74482f2a..e8cda0032a6c80e939d24be190507cba006a0280 100644
+index 732622344982137b5ac051c6d510c7860fbe4e0a..cebd22696a672fc0f1c1fb0676ac76842244b6d3 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-@@ -2205,4 +2205,6 @@ public class ServerPlayer extends Player {
+@@ -2242,4 +2242,6 @@ public class ServerPlayer extends Player {
return (CraftPlayer) super.getBukkitEntity();
}
// CraftBukkit end
@@ -18,10 +18,10 @@ index d184c3f8f8f86b783f17d71886c9b43a74482f2a..e8cda0032a6c80e939d24be190507cba
+ public final int getViewDistance() { return this.getLevel().getChunkSource().chunkMap.viewDistance - 1; } // Paper - placeholder
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
-index 5476dc1e80093d7684bc238bae102cbb691cec4f..be8b7170f3746e53985286066138781099930934 100644
+index 1357bc97801f892e59fc8e89c3cc2d697894ccfb..cf9c2456004ce5fc0e38da33251f66df0b3fdd51 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
-@@ -1833,6 +1833,37 @@ public class CraftWorld extends CraftRegionAccessor implements World {
+@@ -1834,6 +1834,37 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return world.spigotConfig.simulationDistance;
}
// Spigot end
@@ -60,10 +60,10 @@ index 5476dc1e80093d7684bc238bae102cbb691cec4f..be8b7170f3746e539852860661387810
// Spigot start
private final org.bukkit.World.Spigot spigot = new org.bukkit.World.Spigot()
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index 9b03879242d0f299a51cb4e91dd83b68a8ea3b9c..34b2b30ba5bf1f163ed647db1ea75e57323fb042 100644
+index dd3e2db7ef1e60223ef14852b14495c2573bf2e8..82a6eb9db090f254add880c8a289f948c82d5a64 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-@@ -405,6 +405,46 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+@@ -403,6 +403,46 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
connection.disconnect(message == null ? net.kyori.adventure.text.Component.empty() : message);
}
}
diff --git a/patches/unapplied/server/0041-Add-BeaconEffectEvent.patch b/patches/server/0041-Add-BeaconEffectEvent.patch
index 8eb9548fe5..4c04a07cd0 100644
--- a/patches/unapplied/server/0041-Add-BeaconEffectEvent.patch
+++ b/patches/server/0041-Add-BeaconEffectEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add BeaconEffectEvent
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
-index ccb9988d5113576d06438acf86a9f451ab0ea157..dca94c75f4531eab3ab788e722363d2065bf4170 100644
+index 26275e888d09ee4bdbe305be9a56f749a8f4db4a..0c699c08ef85ca3339ada5c869b571581092a11d 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
-@@ -41,6 +41,10 @@ import net.minecraft.world.phys.AABB;
+@@ -40,6 +40,10 @@ import net.minecraft.world.phys.AABB;
import org.bukkit.craftbukkit.potion.CraftPotionUtil;
import org.bukkit.potion.PotionEffect;
// CraftBukkit end
@@ -19,7 +19,7 @@ index ccb9988d5113576d06438acf86a9f451ab0ea157..dca94c75f4531eab3ab788e722363d20
public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
-@@ -272,15 +276,23 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
+@@ -278,15 +282,23 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
}
}
@@ -47,7 +47,7 @@ index ccb9988d5113576d06438acf86a9f451ab0ea157..dca94c75f4531eab3ab788e722363d20
}
}
}
-@@ -303,10 +315,10 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
+@@ -309,10 +321,10 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
int j = BeaconBlockEntity.getLevel(beaconLevel);
List list = BeaconBlockEntity.getHumansInRange(world, pos, beaconLevel);
diff --git a/patches/unapplied/server/0042-Configurable-container-update-tick-rate.patch b/patches/server/0042-Configurable-container-update-tick-rate.patch
index e755f62557..032bca1957 100644
--- a/patches/unapplied/server/0042-Configurable-container-update-tick-rate.patch
+++ b/patches/server/0042-Configurable-container-update-tick-rate.patch
@@ -19,10 +19,10 @@ index fcbb0d6cd09a9c80a8725c9cf0c503fa0532f1e3..156059d4951fa01b10cc36d70cd43903
+ }
}
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-index e8cda0032a6c80e939d24be190507cba006a0280..8eb9a96e879a28841fcc338ff5c90f86908414bc 100644
+index cebd22696a672fc0f1c1fb0676ac76842244b6d3..a375d2d0bffc3694e76bae3f9ba13f60e629d859 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-@@ -219,6 +219,7 @@ public class ServerPlayer extends Player {
+@@ -226,6 +226,7 @@ public class ServerPlayer extends Player {
private int containerCounter;
public int latency;
public boolean wonGame;
@@ -30,7 +30,7 @@ index e8cda0032a6c80e939d24be190507cba006a0280..8eb9a96e879a28841fcc338ff5c90f86
// CraftBukkit start
public String displayName;
-@@ -591,7 +592,12 @@ public class ServerPlayer extends Player {
+@@ -598,7 +599,12 @@ public class ServerPlayer extends Player {
--this.invulnerableTime;
}
diff --git a/patches/unapplied/server/0043-Use-UserCache-for-player-heads.patch b/patches/server/0043-Use-UserCache-for-player-heads.patch
index 2381324116..2381324116 100644
--- a/patches/unapplied/server/0043-Use-UserCache-for-player-heads.patch
+++ b/patches/server/0043-Use-UserCache-for-player-heads.patch
diff --git a/patches/unapplied/server/0044-Disable-spigot-tick-limiters.patch b/patches/server/0044-Disable-spigot-tick-limiters.patch
index e562468965..f81394e570 100644
--- a/patches/unapplied/server/0044-Disable-spigot-tick-limiters.patch
+++ b/patches/server/0044-Disable-spigot-tick-limiters.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Disable spigot tick limiters
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 7309226b6ee96db7330d712c41157bfde0d03d37..922b234865ff5d64049d634d0356f9a068bc8a8c 100644
+index 7d86a8744d76e2fe8b3bf4b85152ea2203817713..e52d69675c823184303536db0f673762d8eca100 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -702,9 +702,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -660,9 +660,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// Spigot start
// Iterator iterator = this.blockEntityTickers.iterator();
int tilesThisCycle = 0;
diff --git a/patches/unapplied/server/0045-Add-PlayerInitialSpawnEvent.patch b/patches/server/0045-Add-PlayerInitialSpawnEvent.patch
index de6c87d154..fc908d1e03 100644
--- a/patches/unapplied/server/0045-Add-PlayerInitialSpawnEvent.patch
+++ b/patches/server/0045-Add-PlayerInitialSpawnEvent.patch
@@ -9,10 +9,10 @@ This is a duplicate API from spigot, so use our duplicate subclass and
improve setPosition to use raw
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 5d7298a045ea827a5530faee62061d0f4ea34e2b..68835bcd519e41808669df51c0a9b04aa21727cb 100644
+index 870fb4ffb01ba291d9d3aabfd722e669a477e209..4cf2264208ce681d92441cd06bf8120d586bc82a 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -217,7 +217,7 @@ public abstract class PlayerList {
+@@ -221,7 +221,7 @@ public abstract class PlayerList {
// Spigot start - spawn location event
Player spawnPlayer = player.getBukkitEntity();
@@ -21,7 +21,7 @@ index 5d7298a045ea827a5530faee62061d0f4ea34e2b..68835bcd519e41808669df51c0a9b04a
this.cserver.getPluginManager().callEvent(ev);
Location loc = ev.getSpawnLocation();
-@@ -225,7 +225,10 @@ public abstract class PlayerList {
+@@ -229,7 +229,10 @@ public abstract class PlayerList {
player.spawnIn(worldserver1);
player.gameMode.setLevel((ServerLevel) player.level);
diff --git a/patches/unapplied/server/0046-Configurable-Disabling-Cat-Chest-Detection.patch b/patches/server/0046-Configurable-Disabling-Cat-Chest-Detection.patch
index 6fae627e28..becda642b1 100644
--- a/patches/unapplied/server/0046-Configurable-Disabling-Cat-Chest-Detection.patch
+++ b/patches/server/0046-Configurable-Disabling-Cat-Chest-Detection.patch
@@ -20,10 +20,10 @@ index 156059d4951fa01b10cc36d70cd439037c636e4c..adf5a83fc1b62e55ba4524893f8704ad
+ }
}
diff --git a/src/main/java/net/minecraft/world/level/block/ChestBlock.java b/src/main/java/net/minecraft/world/level/block/ChestBlock.java
-index 306fd5b1893d8a68af2073978bab7e590e936ef5..db726697b00afdee6078849fd224263483349912 100644
+index ccde1bef18a7ffe338d71a6feb2dd88228004c34..2f6b5142543aec14b27a996fe1a6817ac44c77b8 100644
--- a/src/main/java/net/minecraft/world/level/block/ChestBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/ChestBlock.java
-@@ -362,6 +362,11 @@ public class ChestBlock extends AbstractChestBlock<ChestBlockEntity> implements
+@@ -361,6 +361,11 @@ public class ChestBlock extends AbstractChestBlock<ChestBlockEntity> implements
}
private static boolean isCatSittingOnChest(LevelAccessor world, BlockPos pos) {
diff --git a/patches/unapplied/server/0047-Ensure-commands-are-not-ran-async.patch b/patches/server/0047-Ensure-commands-are-not-ran-async.patch
index cb9c5b38cd..6a4025dcba 100644
--- a/patches/unapplied/server/0047-Ensure-commands-are-not-ran-async.patch
+++ b/patches/server/0047-Ensure-commands-are-not-ran-async.patch
@@ -14,10 +14,10 @@ big slowdown in execution but throwing an exception at same time to raise awaren
that it is happening so that plugin authors can fix their code to stop executing commands async.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 96c59b0e5ac3d36c8ecd513b64723e7dbe5d9b3a..b85e557972e37566c853e0b4f882719b4d8bb293 100644
+index a75353e96d0e0a017e4a5dc84c04a5c594535439..984209f32015d765367fd7693fb759de571b9ad0 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -1872,6 +1872,29 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
+@@ -1947,6 +1947,29 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
}
if (!async && s.startsWith("/")) {
@@ -48,10 +48,10 @@ index 96c59b0e5ac3d36c8ecd513b64723e7dbe5d9b3a..b85e557972e37566c853e0b4f882719b
} else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) {
// Do nothing, this is coming from a plugin
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 46f895acd74de17784d0c5efc66caf10a8be8686..b6e8bf97d961c5b3fd59c8eab11db5d7cf11fe36 100644
+index a7dcdb5cce888f8580b54f7de263110e69285311..c30ee88c7e49364a799c848ceb683084ae0febc8 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -857,6 +857,28 @@ public final class CraftServer implements Server {
+@@ -852,6 +852,28 @@ public final class CraftServer implements Server {
Validate.notNull(commandLine, "CommandLine cannot be null");
org.spigotmc.AsyncCatcher.catchOp("command dispatch"); // Spigot
diff --git a/patches/unapplied/server/0048-All-chunks-are-slime-spawn-chunks-toggle.patch b/patches/server/0048-All-chunks-are-slime-spawn-chunks-toggle.patch
index e39421f1d6..7016bc9d69 100644
--- a/patches/unapplied/server/0048-All-chunks-are-slime-spawn-chunks-toggle.patch
+++ b/patches/server/0048-All-chunks-are-slime-spawn-chunks-toggle.patch
@@ -19,10 +19,10 @@ index adf5a83fc1b62e55ba4524893f8704ad6cd81e97..567bad50508870001c3337bf109a407b
+ }
}
diff --git a/src/main/java/net/minecraft/world/entity/monster/Slime.java b/src/main/java/net/minecraft/world/entity/monster/Slime.java
-index cee85fcbe061cf70ba9c828372369a4c41f9fbff..990f2e17aad4a1116482b3aa534686cf8dc3669a 100644
+index a62f88048d8243f5b98834988c049471114c4199..61304f83aff18ae20316db7e16b673a652eb73a4 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Slime.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java
-@@ -321,7 +321,7 @@ public class Slime extends Mob implements Enemy {
+@@ -316,7 +316,7 @@ public class Slime extends Mob implements Enemy {
}
ChunkPos chunkcoordintpair = new ChunkPos(pos);
@@ -32,10 +32,10 @@ index cee85fcbe061cf70ba9c828372369a4c41f9fbff..990f2e17aad4a1116482b3aa534686cf
if (random.nextInt(10) == 0 && flag && pos.getY() < 40) {
return checkMobSpawnRules(type, world, spawnReason, pos, random);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
-index d68bb94bf75d04b3f371518558addc645b55d8a4..404bd3389aaa75ca23f04d23ecea9093443c3976 100644
+index d748eb01ecb2b15b081ab3d98b3b3d5804a2215a..0a72475c241e0392993c3e501f891b74c7f72019 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
-@@ -219,7 +219,7 @@ public class CraftChunk implements Chunk {
+@@ -220,7 +220,7 @@ public class CraftChunk implements Chunk {
@Override
public boolean isSlimeChunk() {
// 987234911L is deterimined in EntitySlime when seeing if a slime can spawn in a chunk
diff --git a/patches/unapplied/server/0049-Expose-server-CommandMap.patch b/patches/server/0049-Expose-server-CommandMap.patch
index 58807b4f7b..32f3ab5a03 100644
--- a/patches/unapplied/server/0049-Expose-server-CommandMap.patch
+++ b/patches/server/0049-Expose-server-CommandMap.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Expose server CommandMap
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index b6e8bf97d961c5b3fd59c8eab11db5d7cf11fe36..680453b00b7fad402d0311141d82a9f0dd6cce2e 100644
+index c30ee88c7e49364a799c848ceb683084ae0febc8..5b002bb66d75f5a93492324fd77a91f851c47224 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1975,6 +1975,7 @@ public final class CraftServer implements Server {
+@@ -1958,6 +1958,7 @@ public final class CraftServer implements Server {
return this.helpMap;
}
diff --git a/patches/unapplied/server/0050-Be-a-bit-more-informative-in-maxHealth-exception.patch b/patches/server/0050-Be-a-bit-more-informative-in-maxHealth-exception.patch
index edd16859a7..edd16859a7 100644
--- a/patches/unapplied/server/0050-Be-a-bit-more-informative-in-maxHealth-exception.patch
+++ b/patches/server/0050-Be-a-bit-more-informative-in-maxHealth-exception.patch
diff --git a/patches/unapplied/server/0051-Ensure-inv-drag-is-in-bounds.patch b/patches/server/0051-Ensure-inv-drag-is-in-bounds.patch
index 0616b53169..f323028a3e 100644
--- a/patches/unapplied/server/0051-Ensure-inv-drag-is-in-bounds.patch
+++ b/patches/server/0051-Ensure-inv-drag-is-in-bounds.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Ensure inv drag is in bounds
diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
-index fc8c3798643c1a8cf29298f02c8ec057b950a2fc..eecb852e4946c774ad295c53dbd904571262055a 100644
+index 04874783a67dd8d9c2b2fd12e5f9d5447b8a2d7d..36d42b2a97168dfa525b55d8fa2f7a603b43340f 100644
--- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
-@@ -418,7 +418,7 @@ public abstract class AbstractContainerMenu {
+@@ -416,7 +416,7 @@ public abstract class AbstractContainerMenu {
this.resetQuickCraft();
}
} else if (this.quickcraftStatus == 1) {
diff --git a/patches/unapplied/server/0052-Player-Tab-List-and-Title-APIs.patch b/patches/server/0052-Player-Tab-List-and-Title-APIs.patch
index 14ebb4ed82..bb77935451 100644
--- a/patches/unapplied/server/0052-Player-Tab-List-and-Title-APIs.patch
+++ b/patches/server/0052-Player-Tab-List-and-Title-APIs.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Player Tab List and Title APIs
diff --git a/src/main/java/net/minecraft/network/FriendlyByteBuf.java b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
-index 0053474ab7c25de6d86c16e3079feb21f75d1c11..303b877bc467de7c046cc221d061fac841c1d9f3 100644
+index 42514a0c7066dc79050c0496d6463528b593f9e4..70631b3fe080320dfea0d1a4deb23e87448da250 100644
--- a/src/main/java/net/minecraft/network/FriendlyByteBuf.java
+++ b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
-@@ -356,6 +356,11 @@ public class FriendlyByteBuf extends ByteBuf {
+@@ -439,6 +439,11 @@ public class FriendlyByteBuf extends ByteBuf {
public FriendlyByteBuf writeComponent(final net.kyori.adventure.text.Component component) {
return this.writeUtf(PaperAdventure.asJsonString(component, this.adventure$locale), 262144);
}
@@ -63,7 +63,7 @@ index bd808eb312ade7122973a47f4b96505829511da5..bf0f9cab7c66c089f35b851e799ba4a4
// Paper end
buf.writeComponent(this.text);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index 34b2b30ba5bf1f163ed647db1ea75e57323fb042..0f04ae8e52f8dca80cfa71b2162a4c477dc0c4db 100644
+index 82a6eb9db090f254add880c8a289f948c82d5a64..25489d8aec04821d257badf009f66bb89fa8d04c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1,5 +1,6 @@
@@ -73,7 +73,7 @@ index 34b2b30ba5bf1f163ed647db1ea75e57323fb042..0f04ae8e52f8dca80cfa71b2162a4c47
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableSet;
import com.google.common.io.BaseEncoding;
-@@ -270,6 +271,100 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+@@ -268,6 +269,100 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
}
diff --git a/patches/unapplied/server/0053-Add-configurable-portal-search-radius.patch b/patches/server/0053-Add-configurable-portal-search-radius.patch
index 3a79b7e763..966fb4a9c7 100644
--- a/patches/unapplied/server/0053-Add-configurable-portal-search-radius.patch
+++ b/patches/server/0053-Add-configurable-portal-search-radius.patch
@@ -23,10 +23,10 @@ index 567bad50508870001c3337bf109a407b6b4cde0e..66dd2ebda5692157e397f7ddafd96a49
+ }
}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 2f35ce076a468ac260e28ba90ac55f7717ee1b13..4329563bccfefe5d56c12d0fa341f1ffd4ce22a1 100644
+index 51475d726004b857e0fbaffa9df2c777c2942071..d6bf1d3356a8894cdeacac270d96d7ea07c79879 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -2911,7 +2911,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
+@@ -2940,7 +2940,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
double d0 = DimensionType.getTeleportationScale(this.level.dimensionType(), destination.dimensionType());
BlockPos blockposition = worldborder.clampToBounds(this.getX() * d0, this.getY(), this.getZ() * d0);
// CraftBukkit start
@@ -42,7 +42,7 @@ index 2f35ce076a468ac260e28ba90ac55f7717ee1b13..4329563bccfefe5d56c12d0fa341f1ff
return null;
}
diff --git a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
-index 2f9ce2a5d187bbaf55f2599998aad357dac72ecc..05150fbade1d5a9b3b6de8ad1f5e825f34d1037e 100644
+index bb05ea288432ece497957c3503c3435655ce8997..8672545ba07205ef362442e1342f2ee5281f62cb 100644
--- a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
+++ b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
@@ -43,7 +43,7 @@ public class PortalForcer {
diff --git a/patches/unapplied/server/0054-Add-velocity-warnings.patch b/patches/server/0054-Add-velocity-warnings.patch
index bbf4214f57..e701f05b92 100644
--- a/patches/unapplied/server/0054-Add-velocity-warnings.patch
+++ b/patches/server/0054-Add-velocity-warnings.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add velocity warnings
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 680453b00b7fad402d0311141d82a9f0dd6cce2e..3341fb3250f2dd06328e7ec8ee2758d7497eaecc 100644
+index 5b002bb66d75f5a93492324fd77a91f851c47224..ff7f1347619d4df2a5c217a4b6545878ed81293c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -279,6 +279,7 @@ public final class CraftServer implements Server {
+@@ -274,6 +274,7 @@ public final class CraftServer implements Server {
public boolean ignoreVanillaPermissions = false;
private final List<CraftPlayer> playerView;
public int reloadCount;
@@ -17,10 +17,10 @@ index 680453b00b7fad402d0311141d82a9f0dd6cce2e..3341fb3250f2dd06328e7ec8ee2758d7
static {
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index fdbcf4989f72e1604a2841f565adfeebf8d45622..1e0b8314ef388763aa43055909e48778f0d421a3 100644
+index 35e6cdd6930209d5c0f1c23c4e6838a5c0d81aa3..bbd87aaedba4ff034678e17b2c377dbdbce02c57 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -438,10 +438,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -450,10 +450,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
public void setVelocity(Vector velocity) {
Preconditions.checkArgument(velocity != null, "velocity");
velocity.checkFinite();
diff --git a/patches/unapplied/server/0055-Configurable-inter-world-teleportation-safety.patch b/patches/server/0055-Configurable-inter-world-teleportation-safety.patch
index 68de154e25..ed40c6ee7d 100644
--- a/patches/unapplied/server/0055-Configurable-inter-world-teleportation-safety.patch
+++ b/patches/server/0055-Configurable-inter-world-teleportation-safety.patch
@@ -30,10 +30,10 @@ index 66dd2ebda5692157e397f7ddafd96a492e53c9e9..45b51fea6ba4381e4d245d70b5671f6e
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index 0f04ae8e52f8dca80cfa71b2162a4c477dc0c4db..de9dbbff4e0e3d14821d21a1506a6b2d4a8ce3ab 100644
+index 25489d8aec04821d257badf009f66bb89fa8d04c..f7e77a911ea950efc6be76d4d2c6b3fdf66a383c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-@@ -1034,7 +1034,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+@@ -1032,7 +1032,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (fromWorld == toWorld) {
entity.connection.teleport(to);
} else {
diff --git a/patches/unapplied/server/0056-Add-exception-reporting-event.patch b/patches/server/0056-Add-exception-reporting-event.patch
index 119710f7ae..79b0f9f447 100644
--- a/patches/unapplied/server/0056-Add-exception-reporting-event.patch
+++ b/patches/server/0056-Add-exception-reporting-event.patch
@@ -49,10 +49,10 @@ index 0000000000000000000000000000000000000000..f699ce18ca044f813e194ef2786b7ea8
+ }
+}
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index f9e9e00855627b78e8ff018bf6d52c9787fcffeb..fb8d50dc14e1d23001e184b425bc6ac2f8b0f37e 100644
+index e9a2a71b1f2bf6c701d4eba8dc31a10015cf7904..8b11fbfe2805ad7e8ba84e6b7fdfafc054a248bd 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
-@@ -961,6 +961,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -992,6 +992,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
return true;
} catch (Exception exception) {
ChunkMap.LOGGER.error("Failed to save chunk {},{}", new Object[]{chunkcoordintpair.x, chunkcoordintpair.z, exception});
@@ -61,7 +61,7 @@ index f9e9e00855627b78e8ff018bf6d52c9787fcffeb..fb8d50dc14e1d23001e184b425bc6ac2
}
}
diff --git a/src/main/java/net/minecraft/server/players/OldUsersConverter.java b/src/main/java/net/minecraft/server/players/OldUsersConverter.java
-index 7b84b20a4de0d6e95a1d47cb077abd0e00a2336c..b7b98832be6178a2bca534bf974519ede977b282 100644
+index 439ff01be1521c283d60cacb110fcb4993933057..da98f074ccd5a40c635824112c97fd174c393cb1 100644
--- a/src/main/java/net/minecraft/server/players/OldUsersConverter.java
+++ b/src/main/java/net/minecraft/server/players/OldUsersConverter.java
@@ -1,5 +1,6 @@
@@ -88,7 +88,7 @@ index 7b84b20a4de0d6e95a1d47cb077abd0e00a2336c..b7b98832be6178a2bca534bf974519ed
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/world/entity/ai/village/VillageSiege.java b/src/main/java/net/minecraft/world/entity/ai/village/VillageSiege.java
-index 1a9dfd8411bb8affdb3ff4c003433ecab203b004..5e526d0feda11d6b73f71b965aa098e0a79457d1 100644
+index c6fb4c33d7ea52b88d8fc0d90748cbab7387c565..fed09b886f4fa0006d160e5f2abb00dfee45434d 100644
--- a/src/main/java/net/minecraft/world/entity/ai/village/VillageSiege.java
+++ b/src/main/java/net/minecraft/world/entity/ai/village/VillageSiege.java
@@ -118,6 +118,7 @@ public class VillageSiege implements CustomSpawner {
@@ -100,7 +100,7 @@ index 1a9dfd8411bb8affdb3ff4c003433ecab203b004..5e526d0feda11d6b73f71b965aa098e0
}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 922b234865ff5d64049d634d0356f9a068bc8a8c..d923cc91a8f1e71831be8ded1b4818ac3b48fc34 100644
+index e52d69675c823184303536db0f673762d8eca100..2bc5b3c76264a5a23170adbc2e04c55a5e4f2a6a 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -1,5 +1,10 @@
@@ -114,7 +114,7 @@ index 922b234865ff5d64049d634d0356f9a068bc8a8c..d923cc91a8f1e71831be8ded1b4818ac
import com.google.common.collect.Lists;
import com.mojang.serialization.Codec;
import java.io.IOException;
-@@ -738,6 +743,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -696,6 +701,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// Paper start - Prevent tile entity and entity crashes
final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level.getWorld().getName(), entity.getX(), entity.getY(), entity.getZ());
MinecraftServer.LOGGER.error(msg, throwable);
@@ -123,10 +123,10 @@ index 922b234865ff5d64049d634d0356f9a068bc8a8c..d923cc91a8f1e71831be8ded1b4818ac
// Paper end
}
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
-index 2d290d2e17517bc39828e05369ca5bc5ce892c27..fee21a585b95448a5edab70002e9c4ea36a5d989 100644
+index b37e04a0c466dacf52e74a4d4fb0885511c2abc1..878fc7f57178bff0e42fd01434f0aaa2732f5a5b 100644
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
-@@ -288,6 +288,7 @@ public final class NaturalSpawner {
+@@ -289,6 +289,7 @@ public final class NaturalSpawner {
}
} catch (Exception exception) {
NaturalSpawner.LOGGER.warn("Failed to create mob", exception);
@@ -134,7 +134,7 @@ index 2d290d2e17517bc39828e05369ca5bc5ce892c27..fee21a585b95448a5edab70002e9c4ea
return null;
}
}
-@@ -400,6 +401,7 @@ public final class NaturalSpawner {
+@@ -401,6 +402,7 @@ public final class NaturalSpawner {
entity = biomesettingsmobs_c.type.create(world.getLevel());
} catch (Exception exception) {
NaturalSpawner.LOGGER.warn("Failed to create mob", exception);
@@ -143,7 +143,7 @@ index 2d290d2e17517bc39828e05369ca5bc5ce892c27..fee21a585b95448a5edab70002e9c4ea
}
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
-index ed6203119fe2e4ee47a2d51c84df5b7c236f32da..7a63c26e360fd054bf237df3eeffc466d73d5dfb 100644
+index a438025a2102fa911a6941cd9723c84743113dc7..2704a05766d42b0277fa6308820b88371db00ace 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -1,6 +1,7 @@
@@ -154,7 +154,7 @@ index ed6203119fe2e4ee47a2d51c84df5b7c236f32da..7a63c26e360fd054bf237df3eeffc466
import com.google.common.collect.Maps;
import com.google.common.collect.UnmodifiableIterator;
import com.mojang.logging.LogUtils;
-@@ -544,10 +545,16 @@ public class LevelChunk extends ChunkAccess {
+@@ -559,10 +560,16 @@ public class LevelChunk extends ChunkAccess {
// CraftBukkit start
} else {
@@ -175,7 +175,7 @@ index ed6203119fe2e4ee47a2d51c84df5b7c236f32da..7a63c26e360fd054bf237df3eeffc466
// CraftBukkit end
}
}
-@@ -1027,6 +1034,7 @@ public class LevelChunk extends ChunkAccess {
+@@ -1052,6 +1059,7 @@ public class LevelChunk extends ChunkAccess {
// Paper start - Prevent tile entity and entity crashes
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/patches/server/0057-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch b/patches/server/0057-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch
new file mode 100644
index 0000000000..5775fe4daf
--- /dev/null
+++ b/patches/server/0057-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch
@@ -0,0 +1,28 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: kashike <[email protected]>
+Date: Tue, 8 Mar 2016 18:28:43 -0800
+Subject: [PATCH] Don't nest if we don't need to when cerealising text
+ components
+
+
+diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSystemChatPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSystemChatPacket.java
+index 75b5f37c54a4de7f4235e2e5246aeda8a605ef45..6ba9874037af30acaf585914990dc7988db7b2ea 100644
+--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSystemChatPacket.java
++++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSystemChatPacket.java
+@@ -21,7 +21,15 @@ public record ClientboundSystemChatPacket(@org.jetbrains.annotations.Nullable ne
+ }
+
+ public ClientboundSystemChatPacket(net.md_5.bungee.api.chat.BaseComponent[] content, int typeId) {
+- this(null, net.md_5.bungee.chat.ComponentSerializer.toString(content), typeId);
++ this(null, garbageConversion(content), typeId); // Paper - don't nest if we don't need to so that we can preserve formatting
++ }
++
++ private static String garbageConversion(net.md_5.bungee.api.chat.BaseComponent[] content) {
++ if (content.length == 1) {
++ return net.md_5.bungee.chat.ComponentSerializer.toString(content[0]);
++ } else {
++ return net.md_5.bungee.chat.ComponentSerializer.toString(content);
++ }
+ }
+ // Spigot end
+ // Paper end
diff --git a/patches/unapplied/server/0058-Disable-Scoreboards-for-non-players-by-default.patch b/patches/server/0058-Disable-Scoreboards-for-non-players-by-default.patch
index 9ec525713c..558e5e9f25 100644
--- a/patches/unapplied/server/0058-Disable-Scoreboards-for-non-players-by-default.patch
+++ b/patches/server/0058-Disable-Scoreboards-for-non-players-by-default.patch
@@ -25,10 +25,10 @@ index 45b51fea6ba4381e4d245d70b5671f6e42c1f718..397995fe4c360d837282535b9b7aaf7f
+ }
}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 4329563bccfefe5d56c12d0fa341f1ffd4ce22a1..79dddb060d967303be70b690df83c3b2a2b1f67e 100644
+index d6bf1d3356a8894cdeacac270d96d7ea07c79879..e6917848029b1686e4e3a1a0eadac85eda92518d 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -2551,6 +2551,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
+@@ -2578,6 +2578,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@Nullable
public Team getTeam() {
@@ -37,10 +37,10 @@ index 4329563bccfefe5d56c12d0fa341f1ffd4ce22a1..79dddb060d967303be70b690df83c3b2
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 91579d3ead3900ed6ff5b050f80ae031b141c24d..cb7cccee34e897195d0a258ba6623b75e797ee7c 100644
+index 062d8c0d48798199319da5ccb422af2f1564f6f6..3f82c88058edb5c37fff98d760d931de20a85b5d 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -800,6 +800,7 @@ public abstract class LivingEntity extends Entity {
+@@ -823,6 +823,7 @@ public abstract class LivingEntity extends Entity {
if (nbt.contains("Team", 8)) {
String s = nbt.getString("Team");
PlayerTeam scoreboardteam = this.level.getScoreboard().getPlayerTeam(s);
diff --git a/patches/unapplied/server/0059-Add-methods-for-working-with-arrows-stuck-in-living-.patch b/patches/server/0059-Add-methods-for-working-with-arrows-stuck-in-living-.patch
index b73f1a823f..b73f1a823f 100644
--- a/patches/unapplied/server/0059-Add-methods-for-working-with-arrows-stuck-in-living-.patch
+++ b/patches/server/0059-Add-methods-for-working-with-arrows-stuck-in-living-.patch
diff --git a/patches/unapplied/server/0060-Chunk-Save-Reattempt.patch b/patches/server/0060-Chunk-Save-Reattempt.patch
index 82a269b220..82a269b220 100644
--- a/patches/unapplied/server/0060-Chunk-Save-Reattempt.patch
+++ b/patches/server/0060-Chunk-Save-Reattempt.patch
diff --git a/patches/unapplied/server/0057-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch b/patches/unapplied/server/0057-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch
deleted file mode 100644
index c569f0e66c..0000000000
--- a/patches/unapplied/server/0057-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: kashike <[email protected]>
-Date: Tue, 8 Mar 2016 18:28:43 -0800
-Subject: [PATCH] Don't nest if we don't need to when cerealising text
- components
-
-
-diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundChatPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundChatPacket.java
-index f4f52e43852d2b0b56770c3f747a655a3a6dd683..8b0d452b12d5eca1f92e2cdf014118e215407b31 100644
---- a/src/main/java/net/minecraft/network/protocol/game/ClientboundChatPacket.java
-+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundChatPacket.java
-@@ -36,7 +36,14 @@ public class ClientboundChatPacket implements Packet<ClientGamePacketListener> {
- // Paper end
- // Spigot start
- if (this.components != null) {
-- buf.writeUtf(net.md_5.bungee.chat.ComponentSerializer.toString(components));
-+ // buf.writeUtf(net.md_5.bungee.chat.ComponentSerializer.toString(components)); // Paper - comment, replaced with below
-+ // Paper start - don't nest if we don't need to so that we can preserve formatting
-+ if (this.components.length == 1) {
-+ buf.writeUtf(net.md_5.bungee.chat.ComponentSerializer.toString(this.components[0]));
-+ } else {
-+ buf.writeUtf(net.md_5.bungee.chat.ComponentSerializer.toString(this.components));
-+ }
-+ // Paper end
- } else {
- buf.writeComponent(this.message);
- }