diff --git a/patches/unapplied/server/0768-Fix-merchant-inventory-not-closing-on-entity-removal.patch b/patches/server/0768-Fix-merchant-inventory-not-closing-on-entity-removal.patch similarity index 90% rename from patches/unapplied/server/0768-Fix-merchant-inventory-not-closing-on-entity-removal.patch rename to patches/server/0768-Fix-merchant-inventory-not-closing-on-entity-removal.patch index 37ceb18401..4db712e7b0 100644 --- a/patches/unapplied/server/0768-Fix-merchant-inventory-not-closing-on-entity-removal.patch +++ b/patches/server/0768-Fix-merchant-inventory-not-closing-on-entity-removal.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix merchant inventory not closing on entity removal diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 7e4c387871c84541712a9b4b0c97d5027d2a30c9..01fd17fa845d4f03f3e7e599f42e56f51dd52ff6 100644 +index 1d0273a9ec5afc9287b9153a3746299a2ec9adfa..856ef0c487af8e8c5689d58decc9acf8d52971c9 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2572,6 +2572,11 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2573,6 +2573,11 @@ public class ServerLevel extends Level implements WorldGenLevel { // Spigot end // Spigot Start if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message diff --git a/patches/unapplied/server/0769-Check-requirement-before-suggesting-root-nodes.patch b/patches/server/0769-Check-requirement-before-suggesting-root-nodes.patch similarity index 100% rename from patches/unapplied/server/0769-Check-requirement-before-suggesting-root-nodes.patch rename to patches/server/0769-Check-requirement-before-suggesting-root-nodes.patch diff --git a/patches/unapplied/server/0770-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch b/patches/server/0770-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch similarity index 83% rename from patches/unapplied/server/0770-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch rename to patches/server/0770-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch index d82f442a04..bf40824fb6 100644 --- a/patches/unapplied/server/0770-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch +++ b/patches/server/0770-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Don't respond to ServerboundCommandSuggestionPacket when diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 6ec86b033063066b231462b75c4b1190cc452cdd..5765b977dacc3982b633e47031dfcd4507c26a5d 100644 +index e8cd8adad14c6bcab3ccef7fcc458b38d90592c3..ac09598d2152b5dc9be004a6088ed65f3d1d6f59 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -802,6 +802,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -844,6 +844,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // Paper end // CraftBukkit end diff --git a/patches/unapplied/server/0771-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch b/patches/server/0771-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch similarity index 100% rename from patches/unapplied/server/0771-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch rename to patches/server/0771-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch diff --git a/patches/unapplied/server/0772-Ensure-valid-vehicle-status.patch b/patches/server/0772-Ensure-valid-vehicle-status.patch similarity index 84% rename from patches/unapplied/server/0772-Ensure-valid-vehicle-status.patch rename to patches/server/0772-Ensure-valid-vehicle-status.patch index 733de7e6cc..82002eaa2f 100644 --- a/patches/unapplied/server/0772-Ensure-valid-vehicle-status.patch +++ b/patches/server/0772-Ensure-valid-vehicle-status.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Ensure valid vehicle status diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index c5f0bb56844f54ac7a5f248e1d05f9609847ca56..3868f1438170b4a8ad64ed27827a842e4904ce90 100644 +index 62f2c9645a3bf5b2bfd9fe99d3e6ec08c7dafa9a..e243e67ff389014b2b1a80fa20e67996fae48f8d 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -512,7 +512,7 @@ public class ServerPlayer extends Player { +@@ -513,7 +513,7 @@ public class ServerPlayer extends Player { } } diff --git a/patches/unapplied/server/0773-Prevent-softlocked-end-exit-portal-generation.patch b/patches/server/0773-Prevent-softlocked-end-exit-portal-generation.patch similarity index 100% rename from patches/unapplied/server/0773-Prevent-softlocked-end-exit-portal-generation.patch rename to patches/server/0773-Prevent-softlocked-end-exit-portal-generation.patch diff --git a/patches/unapplied/server/0774-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch b/patches/server/0774-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch similarity index 100% rename from patches/unapplied/server/0774-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch rename to patches/server/0774-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch diff --git a/patches/unapplied/server/0775-Don-t-log-debug-logging-being-disabled.patch b/patches/server/0775-Don-t-log-debug-logging-being-disabled.patch similarity index 100% rename from patches/unapplied/server/0775-Don-t-log-debug-logging-being-disabled.patch rename to patches/server/0775-Don-t-log-debug-logging-being-disabled.patch diff --git a/patches/unapplied/server/0776-fix-various-menus-with-empty-level-accesses.patch b/patches/server/0776-fix-various-menus-with-empty-level-accesses.patch similarity index 100% rename from patches/unapplied/server/0776-fix-various-menus-with-empty-level-accesses.patch rename to patches/server/0776-fix-various-menus-with-empty-level-accesses.patch diff --git a/patches/unapplied/server/0777-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch b/patches/server/0777-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch similarity index 90% rename from patches/unapplied/server/0777-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch rename to patches/server/0777-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch index f2cbce6e16..c0add08508 100644 --- a/patches/unapplied/server/0777-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch +++ b/patches/server/0777-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch @@ -12,10 +12,10 @@ time to save, as flush saving performs a full flush at the end anyways. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 1a9e6544fed4cab0a2058ba9f576ad1285f6bf08..0b06da8a9d83d7adc6edad721ca167ae6f7d3e4b 100644 +index 236ba4c1950a3cced590f520b5349eede75fd59b..adce96d372e0f9b6c3813b2153a5dcbb32a4e75c 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -949,6 +949,16 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -946,6 +946,16 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider // Paper end protected void saveAllChunks(boolean flush) { @@ -32,7 +32,7 @@ index 1a9e6544fed4cab0a2058ba9f576ad1285f6bf08..0b06da8a9d83d7adc6edad721ca167ae if (flush) { List list = (List) this.updatingChunks.getVisibleValuesCopy().stream().filter(ChunkHolder::wasAccessibleSinceLastSave).peek(ChunkHolder::refreshAccessibility).collect(Collectors.toList()); // Paper MutableBoolean mutableboolean = new MutableBoolean(); -@@ -971,6 +981,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -968,6 +978,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider }).filter((ichunkaccess) -> { return ichunkaccess instanceof ImposterProtoChunk || ichunkaccess instanceof LevelChunk; }).filter(this::save).forEach((ichunkaccess) -> { diff --git a/patches/unapplied/server/0778-Preserve-overstacked-loot.patch b/patches/server/0778-Preserve-overstacked-loot.patch similarity index 100% rename from patches/unapplied/server/0778-Preserve-overstacked-loot.patch rename to patches/server/0778-Preserve-overstacked-loot.patch diff --git a/patches/unapplied/server/0779-Update-head-rotation-in-missing-places.patch b/patches/server/0779-Update-head-rotation-in-missing-places.patch similarity index 84% rename from patches/unapplied/server/0779-Update-head-rotation-in-missing-places.patch rename to patches/server/0779-Update-head-rotation-in-missing-places.patch index 5c174a3e2b..04499b065f 100644 --- a/patches/unapplied/server/0779-Update-head-rotation-in-missing-places.patch +++ b/patches/server/0779-Update-head-rotation-in-missing-places.patch @@ -8,10 +8,10 @@ This is because bukkit uses a separate head rotation field for yaw. This issue only applies to players. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index a325b145be3efda4c3521871c6b1cffddbd68c00..25b0ab58e32d1fe1746d6c97d6098db931fd39db 100644 +index 37123198bdf0188f59f289a31570663938fdc3c1..71fd35d9d89d878109b0d4d0ae73a99063059eec 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -1754,6 +1754,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -1749,6 +1749,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { this.setXRot(Mth.clamp(pitch, -90.0F, 90.0F) % 360.0F); this.yRotO = this.getYRot(); this.xRotO = this.getXRot(); @@ -19,7 +19,7 @@ index a325b145be3efda4c3521871c6b1cffddbd68c00..25b0ab58e32d1fe1746d6c97d6098db9 } public void absMoveTo(double x, double y, double z) { -@@ -1792,6 +1793,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -1787,6 +1788,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { this.setXRot(pitch); this.setOldPosAndRot(); this.reapplyPosition(); diff --git a/patches/unapplied/server/0780-prevent-unintended-light-block-manipulation.patch b/patches/server/0780-prevent-unintended-light-block-manipulation.patch similarity index 100% rename from patches/unapplied/server/0780-prevent-unintended-light-block-manipulation.patch rename to patches/server/0780-prevent-unintended-light-block-manipulation.patch diff --git a/patches/unapplied/server/0781-Fix-CraftCriteria-defaults-map.patch b/patches/server/0781-Fix-CraftCriteria-defaults-map.patch similarity index 100% rename from patches/unapplied/server/0781-Fix-CraftCriteria-defaults-map.patch rename to patches/server/0781-Fix-CraftCriteria-defaults-map.patch diff --git a/patches/unapplied/server/0782-Fix-upstreams-block-state-factories.patch b/patches/server/0782-Fix-upstreams-block-state-factories.patch similarity index 100% rename from patches/unapplied/server/0782-Fix-upstreams-block-state-factories.patch rename to patches/server/0782-Fix-upstreams-block-state-factories.patch diff --git a/patches/unapplied/server/0783-Add-config-option-for-logging-player-ip-addresses.patch b/patches/server/0783-Add-config-option-for-logging-player-ip-addresses.patch similarity index 88% rename from patches/unapplied/server/0783-Add-config-option-for-logging-player-ip-addresses.patch rename to patches/server/0783-Add-config-option-for-logging-player-ip-addresses.patch index 92fd04d237..917fac4304 100644 --- a/patches/unapplied/server/0783-Add-config-option-for-logging-player-ip-addresses.patch +++ b/patches/server/0783-Add-config-option-for-logging-player-ip-addresses.patch @@ -23,10 +23,10 @@ index c8012de68b997d6270ba4a5d79bc93c09ff4354f..1429f938c36d5a3a33e71837f440b230 net.minecraft.network.chat.Component error = net.minecraft.network.chat.Component.literal("Packet processing error"); networkmanager.send(new net.minecraft.network.protocol.game.ClientboundDisconnectPacket(error), (future) -> { diff --git a/src/main/java/net/minecraft/server/network/LegacyQueryHandler.java b/src/main/java/net/minecraft/server/network/LegacyQueryHandler.java -index 0d35e9ff88542b02bb948aa10e064911e73a6913..31a4cd5010cd4ed8eb64b2bad86dc3adfd8ecca8 100644 +index 37cd7b44559e5705b31296df87c94d2ab200138d..37e52ea9ab694b466358981bc2a3c99f28a70c7d 100644 --- a/src/main/java/net/minecraft/server/network/LegacyQueryHandler.java +++ b/src/main/java/net/minecraft/server/network/LegacyQueryHandler.java -@@ -183,7 +183,7 @@ public class LegacyQueryHandler extends ChannelInboundHandlerAdapter { +@@ -185,7 +185,7 @@ public class LegacyQueryHandler extends ChannelInboundHandlerAdapter { buf.release(); this.buf = null; @@ -36,10 +36,10 @@ index 0d35e9ff88542b02bb948aa10e064911e73a6913..31a4cd5010cd4ed8eb64b2bad86dc3ad InetSocketAddress virtualHost = com.destroystokyo.paper.network.PaperNetworkClient.prepareVirtualHost(host, port); com.destroystokyo.paper.event.server.PaperServerListPingEvent event = com.destroystokyo.paper.network.PaperLegacyStatusClient.processRequest( diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java -index af3e70920221b6bd127bb3aed7f1e0a7e9e4c322..597c7660bd517322d8bc9c5acef6956c40067405 100644 +index 2985271132c9ae822dcb0d7a7e6f0c268d1736cc..cfdbcd024de6ad0f9d4e83b2f912b36ef3299458 100644 --- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java +++ b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java -@@ -205,7 +205,7 @@ public class ServerConnectionListener { +@@ -206,7 +206,7 @@ public class ServerConnectionListener { throw new ReportedException(CrashReport.forThrowable(exception, "Ticking memory connection")); } @@ -47,12 +47,12 @@ index af3e70920221b6bd127bb3aed7f1e0a7e9e4c322..597c7660bd517322d8bc9c5acef6956c + ServerConnectionListener.LOGGER.warn("Failed to handle packet for {}", io.papermc.paper.configuration.GlobalConfiguration.get().logging.logPlayerIpAddresses ? String.valueOf(networkmanager.getRemoteAddress()) : "", exception); // Paper MutableComponent ichatmutablecomponent = Component.literal("Internal server error"); - networkmanager.send(new ClientboundDisconnectPacket(ichatmutablecomponent), (future) -> { + networkmanager.send(new ClientboundDisconnectPacket(ichatmutablecomponent), PacketSendListener.thenRun(() -> { diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index 5064ea6767ce17dde271e80f4360549462f6cca0..c098a602ce840db0099b15bd108ea873c7f111d4 100644 +index 547abc18f1e03945977bd38947d9db5e201045c4..303981c9b873eee07052fbe607690d12074cd1d1 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -229,7 +229,10 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener +@@ -241,7 +241,10 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se } public String getUserName() { @@ -65,10 +65,10 @@ index 5064ea6767ce17dde271e80f4360549462f6cca0..c098a602ce840db0099b15bd108ea873 @Nullable diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index bf2888b678567ace5959d989e5dd119c65a9500d..d74d6669005d0669503253787636756a0c6590f4 100644 +index dda357b4f52030435c012f10b11f1ccb3f6688be..1548df4057b34fe6bad2c51fb5a77ce118b36566 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -240,7 +240,7 @@ public abstract class PlayerList { +@@ -241,7 +241,7 @@ public abstract class PlayerList { final String s1; if (connection.getRemoteAddress() != null) { diff --git a/patches/unapplied/server/0784-Configurable-feature-seeds.patch b/patches/server/0784-Configurable-feature-seeds.patch similarity index 94% rename from patches/unapplied/server/0784-Configurable-feature-seeds.patch rename to patches/server/0784-Configurable-feature-seeds.patch index 39ae263f66..580d461869 100644 --- a/patches/unapplied/server/0784-Configurable-feature-seeds.patch +++ b/patches/server/0784-Configurable-feature-seeds.patch @@ -19,10 +19,10 @@ index 46297ac0a19fd2398ab777a381eff4d0a256161e..78280fb3bcd8d792a58ece6d735e0824 } final Object val = config.get(key); diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java -index a4e2ee3efde40c902555f982ffa546c24bc31377..ef53c68c1996e99bc6b6048d5b1bc290cf218158 100644 +index 28f01f29796a8a8e6e6331da5525a4306d78230e..bdcfa5aac4cd0bd5841922295cc8fbb6ca69bd68 100644 --- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java +++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java -@@ -603,7 +603,14 @@ public abstract class ChunkGenerator { +@@ -606,7 +606,14 @@ public abstract class ChunkGenerator { return (String) optional.orElseGet(placedfeature::toString); }; diff --git a/patches/unapplied/server/0785-VanillaCommandWrapper-didnt-account-for-entity-sende.patch b/patches/server/0785-VanillaCommandWrapper-didnt-account-for-entity-sende.patch similarity index 100% rename from patches/unapplied/server/0785-VanillaCommandWrapper-didnt-account-for-entity-sende.patch rename to patches/server/0785-VanillaCommandWrapper-didnt-account-for-entity-sende.patch diff --git a/patches/unapplied/server/0786-Add-root-admin-user-detection.patch b/patches/server/0786-Add-root-admin-user-detection.patch similarity index 97% rename from patches/unapplied/server/0786-Add-root-admin-user-detection.patch rename to patches/server/0786-Add-root-admin-user-detection.patch index 03ceae7507..404725a045 100644 --- a/patches/unapplied/server/0786-Add-root-admin-user-detection.patch +++ b/patches/server/0786-Add-root-admin-user-detection.patch @@ -57,7 +57,7 @@ index 0000000000000000000000000000000000000000..6bd0afddbcc461149dfe9a5c7a86fff6 + } +} diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index 9f3165178e744751343df98568113250578c6d2f..2cc45ec6a5f0b0d5c1ba44551d9a126176dfa8f6 100644 +index 2d01a1d4b2f7fdd38a6b1022f2476ba68b663171..20670bc075c387ee0422eb1014207e26105efccd 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java @@ -184,6 +184,16 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface diff --git a/patches/unapplied/server/0787-Always-allow-item-changing-in-Fireball.patch b/patches/server/0787-Always-allow-item-changing-in-Fireball.patch similarity index 100% rename from patches/unapplied/server/0787-Always-allow-item-changing-in-Fireball.patch rename to patches/server/0787-Always-allow-item-changing-in-Fireball.patch diff --git a/patches/unapplied/server/0788-don-t-attempt-to-teleport-dead-entities.patch b/patches/server/0788-don-t-attempt-to-teleport-dead-entities.patch similarity index 91% rename from patches/unapplied/server/0788-don-t-attempt-to-teleport-dead-entities.patch rename to patches/server/0788-don-t-attempt-to-teleport-dead-entities.patch index 9eba599902..2685387e30 100644 --- a/patches/unapplied/server/0788-don-t-attempt-to-teleport-dead-entities.patch +++ b/patches/server/0788-don-t-attempt-to-teleport-dead-entities.patch @@ -5,7 +5,7 @@ Subject: [PATCH] don't attempt to teleport dead entities diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 25b0ab58e32d1fe1746d6c97d6098db931fd39db..ed36fccf553d4758576afa620b6c0ab127d152d1 100644 +index 71fd35d9d89d878109b0d4d0ae73a99063059eec..bf039f3e2d1a228f0a169b42031d9708f3193a92 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -779,7 +779,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { diff --git a/patches/unapplied/server/0789-Prevent-excessive-velocity-through-repeated-crits.patch b/patches/server/0789-Prevent-excessive-velocity-through-repeated-crits.patch similarity index 94% rename from patches/unapplied/server/0789-Prevent-excessive-velocity-through-repeated-crits.patch rename to patches/server/0789-Prevent-excessive-velocity-through-repeated-crits.patch index 2fadc8cf33..15bdf422f1 100644 --- a/patches/unapplied/server/0789-Prevent-excessive-velocity-through-repeated-crits.patch +++ b/patches/server/0789-Prevent-excessive-velocity-through-repeated-crits.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent excessive velocity through repeated crits diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index b6af4e6b146cc6ceb769a0d1e0d253f0b0f844d2..93cb4d6177cb7ea7a6e9ba5848176d9d74ade3e1 100644 +index bc01742e3e762fbb5b7eb712a9211e4a8d411e03..4091253c84b5a722a75fa6dc8f5f0002b29ebf8e 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -2626,14 +2626,27 @@ public abstract class LivingEntity extends Entity { diff --git a/patches/unapplied/server/0790-Remove-client-side-code-using-deprecated-for-removal.patch b/patches/server/0790-Remove-client-side-code-using-deprecated-for-removal.patch similarity index 65% rename from patches/unapplied/server/0790-Remove-client-side-code-using-deprecated-for-removal.patch rename to patches/server/0790-Remove-client-side-code-using-deprecated-for-removal.patch index a08f54ceee..d96ebe539e 100644 --- a/patches/unapplied/server/0790-Remove-client-side-code-using-deprecated-for-removal.patch +++ b/patches/server/0790-Remove-client-side-code-using-deprecated-for-removal.patch @@ -7,18 +7,10 @@ Subject: [PATCH] Remove client-side code using deprecated for removal Fixes warnings on build diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java -index e8f5f87962cd3dbd383096fc4df9c3f0d5399211..c540b695282e2cca97cc4e3320d641befa19c1c6 100644 +index 23a999c19809a4fb62b37400e3767dc44692adb3..cdb7aea969b56f59d88f60bc3744e4932228c50a 100644 --- a/src/main/java/net/minecraft/Util.java +++ b/src/main/java/net/minecraft/Util.java -@@ -27,7 +27,6 @@ import java.net.URL; - import java.nio.file.Files; - import java.nio.file.Path; - import java.nio.file.spi.FileSystemProvider; --import java.security.AccessController; - import java.security.PrivilegedActionException; - import java.security.PrivilegedExceptionAction; - import java.time.Duration; -@@ -883,21 +882,7 @@ public class Util { +@@ -889,17 +889,7 @@ public class Util { } public void openUrl(URL url) { @@ -26,18 +18,14 @@ index e8f5f87962cd3dbd383096fc4df9c3f0d5399211..c540b695282e2cca97cc4e3320d641be - Process process = AccessController.doPrivileged((PrivilegedExceptionAction)(() -> { - return Runtime.getRuntime().exec(this.getOpenUrlArguments(url)); - })); -- -- for(String string : IOUtils.readLines(process.getErrorStream())) { -- Util.LOGGER.error(string); -- } -- - process.getInputStream().close(); - process.getErrorStream().close(); - process.getOutputStream().close(); -- } catch (IOException | PrivilegedActionException var5) { -- Util.LOGGER.error("Couldn't open url '{}'", url, var5); +- } catch (IOException | PrivilegedActionException var3) { +- Util.LOGGER.error("Couldn't open url '{}'", url, var3); - } +- + throw new IllegalStateException("This method is not useful on dedicated servers."); // Paper - } + public void openUri(URI uri) { diff --git a/patches/unapplied/server/0791-Rewrite-the-light-engine.patch b/patches/server/0791-Rewrite-the-light-engine.patch similarity index 99% rename from patches/unapplied/server/0791-Rewrite-the-light-engine.patch rename to patches/server/0791-Rewrite-the-light-engine.patch index aef68f2bdb..cb60f1cacb 100644 --- a/patches/unapplied/server/0791-Rewrite-the-light-engine.patch +++ b/patches/server/0791-Rewrite-the-light-engine.patch @@ -4469,10 +4469,10 @@ index 5b4c3ca92dffff876af18db106310cb14e8612b1..5482be03a667939ff009b6810d5cc90c private final DebugBuffer chunkToSaveHistory; public int oldTicketLevel; diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 0b06da8a9d83d7adc6edad721ca167ae6f7d3e4b..d5c3bd389d36f4d8be167bd6a9a15c329b0fb453 100644 +index adce96d372e0f9b6c3813b2153a5dcbb32a4e75c..dc8d915956c04b3e9b596e3cb62f1a0498ef1787 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -136,7 +136,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -133,7 +133,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider public final LongSet entitiesInLevel; public final ServerLevel level; private final ThreadedLevelLightEngine lightEngine; @@ -4824,10 +4824,10 @@ index 41ddcf6775f99c56cf4b13b284420061e5dd6bdc..ae46429264e6a7e5c88b6b6a41a6df4d public static TicketType create(String name, Comparator argumentComparator) { return new TicketType<>(name, argumentComparator, 0L); diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -index 254ac28e692cf06c3286c8f4c6edb9de412851a2..b8541b54886fc1f48b4c99cf449284ffece1a78a 100644 +index 178d9ad7525b6743038ed45c6f85686a860ffd26..24b820484497714eb8be87e07ca1d37829d4f2c9 100644 --- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -@@ -700,6 +700,7 @@ public abstract class BlockBehaviour { +@@ -701,6 +701,7 @@ public abstract class BlockBehaviour { this.hasPostProcess = blockbase_info.hasPostProcess; this.emissiveRendering = blockbase_info.emissiveRendering; this.offsetType = (BlockBehaviour.OffsetType) blockbase_info.offsetType.apply(this.asState()); @@ -4835,7 +4835,7 @@ index 254ac28e692cf06c3286c8f4c6edb9de412851a2..b8541b54886fc1f48b4c99cf449284ff } // Paper start - impl cached craft block data, lazy load to fix issue with loading at the wrong time private org.bukkit.craftbukkit.block.data.CraftBlockData cachedCraftBlockData; -@@ -720,6 +721,18 @@ public abstract class BlockBehaviour { +@@ -721,6 +722,18 @@ public abstract class BlockBehaviour { protected boolean isTicking; protected FluidState fluid; // Paper end @@ -4854,7 +4854,7 @@ index 254ac28e692cf06c3286c8f4c6edb9de412851a2..b8541b54886fc1f48b4c99cf449284ff public void initCache() { this.fluid = this.getBlock().getFluidState(this.asState()); // Paper - moved from getFluid() -@@ -728,6 +741,7 @@ public abstract class BlockBehaviour { +@@ -729,6 +742,7 @@ public abstract class BlockBehaviour { this.cache = new BlockBehaviour.BlockStateBase.Cache(this.asState()); } this.shapeExceedsCube = this.cache == null || this.cache.largeCollisionShape; // Paper - moved from actual method to here @@ -4863,7 +4863,7 @@ index 254ac28e692cf06c3286c8f4c6edb9de412851a2..b8541b54886fc1f48b4c99cf449284ff } diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java -index 44e1fdbf6798034b9092fe151568ff392da8af08..c15cedaca3a3dc921ac758580b165d28ee3a945f 100644 +index a97909e77b9b28aede8c8716831c3f9a90618f09..b68625ebb32b8d1e5bc232d7cc791edbed923378 100644 --- a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java +++ b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java @@ -81,6 +81,47 @@ public abstract class ChunkAccess implements BlockGetter, BiomeManager.NoiseBiom @@ -4958,7 +4958,7 @@ index a9c65c8d36e5c7080133706df1363b3ce52e3370..d1b175f2bb1bc96e4f044a97b14721fe @Override public BlockState getBlockState(int x, int y, int z) { diff --git a/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java b/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java -index ca46ed27fdc1eef979829d19b9e90db6d5c59e09..c37bb3125334a3a4c6c05e57289d758ffabe0558 100644 +index 7b320357973202423c29743d922b72dc4ec11efe..8ffc206a858864d277ff94de7c66ffdb07d8f491 100644 --- a/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java @@ -31,6 +31,48 @@ public class ImposterProtoChunk extends ProtoChunk { @@ -5039,7 +5039,7 @@ index c85380c3bf3bf4448a28a91af78f41c235a583e4..d870cefbe5b7485f423817f4f639e3e2 while (iterator.hasNext()) { diff --git a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java -index d71954c3b080e0d4a082b84925592350d8259aac..18c4f815888fee0c85ebbb485d21063ce0d143fb 100644 +index 1326dc1239e00e7001c9ea98713b955b37e759b9..09201b51d6b9fadcef7e38d6a108bfafc5235fbe 100644 --- a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java +++ b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java @@ -203,7 +203,7 @@ public class PalettedContainer implements PaletteResize, PalettedContainer @@ -5052,7 +5052,7 @@ index d71954c3b080e0d4a082b84925592350d8259aac..18c4f815888fee0c85ebbb485d21063c return data.palette.valueFor(data.storage.get(index)); } diff --git a/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java b/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java -index 5ce6a2b83546f4dbc3183a386f51b4bacc173744..a7231ceda4f3e96c0e0c11eee953f129dc9e4487 100644 +index 9014331e4ceac9f77a911aead87bf452d29e3fb4..13b62e8e6569c154547bc0d5626488c5b0839f20 100644 --- a/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java @@ -55,6 +55,12 @@ public class ProtoChunk extends ChunkAccess { diff --git a/patches/unapplied/server/0792-Always-parse-protochunk-light-sources-unless-it-is-m.patch b/patches/server/0792-Always-parse-protochunk-light-sources-unless-it-is-m.patch similarity index 100% rename from patches/unapplied/server/0792-Always-parse-protochunk-light-sources-unless-it-is-m.patch rename to patches/server/0792-Always-parse-protochunk-light-sources-unless-it-is-m.patch diff --git a/patches/unapplied/server/0793-Fix-removing-recipes-from-RecipeIterator.patch b/patches/server/0793-Fix-removing-recipes-from-RecipeIterator.patch similarity index 100% rename from patches/unapplied/server/0793-Fix-removing-recipes-from-RecipeIterator.patch rename to patches/server/0793-Fix-removing-recipes-from-RecipeIterator.patch diff --git a/patches/unapplied/server/0794-Prevent-sending-oversized-item-data-in-equipment-and.patch b/patches/server/0794-Prevent-sending-oversized-item-data-in-equipment-and.patch similarity index 95% rename from patches/unapplied/server/0794-Prevent-sending-oversized-item-data-in-equipment-and.patch rename to patches/server/0794-Prevent-sending-oversized-item-data-in-equipment-and.patch index b06d7e84c2..b5429f37e6 100644 --- a/patches/unapplied/server/0794-Prevent-sending-oversized-item-data-in-equipment-and.patch +++ b/patches/server/0794-Prevent-sending-oversized-item-data-in-equipment-and.patch @@ -34,10 +34,10 @@ index cc418554b655ea4111631e4a1abf69776e150e7c..319dfa82dff1fe188a52bed5aa2d3957 } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 93cb4d6177cb7ea7a6e9ba5848176d9d74ade3e1..1fed50f7310b276090614d05bbf871727f4dea55 100644 +index 4091253c84b5a722a75fa6dc8f5f0002b29ebf8e..d8522072adb93d47fdd7cfa947132c23c2386952 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3109,7 +3109,10 @@ public abstract class LivingEntity extends Entity { +@@ -3112,7 +3112,10 @@ public abstract class LivingEntity extends Entity { equipmentChanges.forEach((enumitemslot, itemstack) -> { ItemStack itemstack1 = itemstack.copy(); @@ -49,7 +49,7 @@ index 93cb4d6177cb7ea7a6e9ba5848176d9d74ade3e1..1fed50f7310b276090614d05bbf87172 switch (enumitemslot.getType()) { case HAND: this.setLastHandItem(enumitemslot, itemstack1); -@@ -3122,6 +3125,34 @@ public abstract class LivingEntity extends Entity { +@@ -3125,6 +3128,34 @@ public abstract class LivingEntity extends Entity { ((ServerLevel) this.level).getChunkSource().broadcast(this, new ClientboundSetEquipmentPacket(this.getId(), list)); } diff --git a/patches/unapplied/server/0795-Hide-unnecessary-itemmeta-from-clients.patch b/patches/server/0795-Hide-unnecessary-itemmeta-from-clients.patch similarity index 95% rename from patches/unapplied/server/0795-Hide-unnecessary-itemmeta-from-clients.patch rename to patches/server/0795-Hide-unnecessary-itemmeta-from-clients.patch index 53dd21259f..2ee0b2523b 100644 --- a/patches/unapplied/server/0795-Hide-unnecessary-itemmeta-from-clients.patch +++ b/patches/server/0795-Hide-unnecessary-itemmeta-from-clients.patch @@ -18,10 +18,10 @@ index 319dfa82dff1fe188a52bed5aa2d39575853b793..919758363c7b703cb200582768e68c97 } } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 1fed50f7310b276090614d05bbf871727f4dea55..7ea4f8003c0da7ea171ac47c27a8bfb7b707be99 100644 +index d8522072adb93d47fdd7cfa947132c23c2386952..8dc54061802f0253193bda79bded1d5265591519 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3111,7 +3111,7 @@ public abstract class LivingEntity extends Entity { +@@ -3114,7 +3114,7 @@ public abstract class LivingEntity extends Entity { // Paper start - prevent oversized data ItemStack toSend = sanitizeItemStack(itemstack1, true); @@ -30,7 +30,7 @@ index 1fed50f7310b276090614d05bbf871727f4dea55..7ea4f8003c0da7ea171ac47c27a8bfb7 // Paper end switch (enumitemslot.getType()) { case HAND: -@@ -3125,6 +3125,59 @@ public abstract class LivingEntity extends Entity { +@@ -3128,6 +3128,59 @@ public abstract class LivingEntity extends Entity { ((ServerLevel) this.level).getChunkSource().broadcast(this, new ClientboundSetEquipmentPacket(this.getId(), list)); } diff --git a/patches/unapplied/server/0796-Fix-kelp-modifier-changing-growth-for-other-crops.patch b/patches/server/0796-Fix-kelp-modifier-changing-growth-for-other-crops.patch similarity index 100% rename from patches/unapplied/server/0796-Fix-kelp-modifier-changing-growth-for-other-crops.patch rename to patches/server/0796-Fix-kelp-modifier-changing-growth-for-other-crops.patch diff --git a/patches/unapplied/server/0797-Prevent-ContainerOpenersCounter-openCount-from-going.patch b/patches/server/0797-Prevent-ContainerOpenersCounter-openCount-from-going.patch similarity index 100% rename from patches/unapplied/server/0797-Prevent-ContainerOpenersCounter-openCount-from-going.patch rename to patches/server/0797-Prevent-ContainerOpenersCounter-openCount-from-going.patch diff --git a/patches/unapplied/server/0798-Add-PlayerItemFrameChangeEvent.patch b/patches/server/0798-Add-PlayerItemFrameChangeEvent.patch similarity index 100% rename from patches/unapplied/server/0798-Add-PlayerItemFrameChangeEvent.patch rename to patches/server/0798-Add-PlayerItemFrameChangeEvent.patch diff --git a/patches/unapplied/server/0799-Add-player-health-update-API.patch b/patches/server/0799-Add-player-health-update-API.patch similarity index 95% rename from patches/unapplied/server/0799-Add-player-health-update-API.patch rename to patches/server/0799-Add-player-health-update-API.patch index 164ebe2cb1..f9109623a9 100644 --- a/patches/unapplied/server/0799-Add-player-health-update-API.patch +++ b/patches/server/0799-Add-player-health-update-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add player health update API diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 89d30891defdf3b1ee71f31e7fd06a87e13a25d2..eb2a93a02006c95d50d6158d6ad03b1ea2c96c18 100644 +index 0d7da68faa8c3401dcc12c67ae9edd977c436e55..b0f49701460fd2d53f691d7485aab49b14da024f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -2140,9 +2140,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/unapplied/server/0800-Optimize-HashMapPalette.patch b/patches/server/0800-Optimize-HashMapPalette.patch similarity index 100% rename from patches/unapplied/server/0800-Optimize-HashMapPalette.patch rename to patches/server/0800-Optimize-HashMapPalette.patch diff --git a/patches/unapplied/server/0801-Allow-delegation-to-vanilla-chunk-gen.patch b/patches/server/0801-Allow-delegation-to-vanilla-chunk-gen.patch similarity index 100% rename from patches/unapplied/server/0801-Allow-delegation-to-vanilla-chunk-gen.patch rename to patches/server/0801-Allow-delegation-to-vanilla-chunk-gen.patch diff --git a/patches/unapplied/server/0802-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch b/patches/server/0802-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch similarity index 99% rename from patches/unapplied/server/0802-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch rename to patches/server/0802-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch index 002bbd667f..616fcebec2 100644 --- a/patches/unapplied/server/0802-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch +++ b/patches/server/0802-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch @@ -1180,10 +1180,10 @@ index 0000000000000000000000000000000000000000..d67a40e7be030142443680c89e1763fc + } +} diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 3868f1438170b4a8ad64ed27827a842e4904ce90..dbbe8af3017eb625888bbd22c9c01fe39b59b456 100644 +index e243e67ff389014b2b1a80fa20e67996fae48f8d..c3484d612d0273bc066b3ac274b33c21ae9e0936 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -422,7 +422,7 @@ public class ServerPlayer extends Player { +@@ -423,7 +423,7 @@ public class ServerPlayer extends Player { if (blockposition1 != null) { this.moveTo(blockposition1, 0.0F, 0.0F); @@ -1192,7 +1192,7 @@ index 3868f1438170b4a8ad64ed27827a842e4904ce90..dbbe8af3017eb625888bbd22c9c01fe3 break; } } -@@ -430,7 +430,7 @@ public class ServerPlayer extends Player { +@@ -431,7 +431,7 @@ public class ServerPlayer extends Player { } else { this.moveTo(blockposition, 0.0F, 0.0F); @@ -1202,10 +1202,10 @@ index 3868f1438170b4a8ad64ed27827a842e4904ce90..dbbe8af3017eb625888bbd22c9c01fe3 } } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index d74d6669005d0669503253787636756a0c6590f4..6d013360d35c54d1493849b22c9d65b18147cc33 100644 +index 1548df4057b34fe6bad2c51fb5a77ce118b36566..20d1360a42a3adb1342b5dc8595b57b82ce573a8 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -936,7 +936,7 @@ public abstract class PlayerList { +@@ -940,7 +940,7 @@ public abstract class PlayerList { // CraftBukkit end worldserver1.getChunkSource().addRegionTicket(net.minecraft.server.level.TicketType.POST_TELEPORT, new net.minecraft.world.level.ChunkPos(location.getBlockX() >> 4, location.getBlockZ() >> 4), 1, entityplayer.getId()); // Paper @@ -1215,7 +1215,7 @@ index d74d6669005d0669503253787636756a0c6590f4..6d013360d35c54d1493849b22c9d65b1 } // CraftBukkit start diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index ed36fccf553d4758576afa620b6c0ab127d152d1..7e71fe2d570af700f09833a394bbe7af17a3ca3e 100644 +index bf039f3e2d1a228f0a169b42031d9708f3193a92..983b3b73ed071b1958e96b5be33e1b1097b95659 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -1160,9 +1160,44 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -1366,7 +1366,7 @@ index ed36fccf553d4758576afa620b6c0ab127d152d1..7e71fe2d570af700f09833a394bbe7af } public static Vec3 collideBoundingBox(@Nullable Entity entity, Vec3 movement, AABB entityBoundingBox, Level world, List collisions) { -@@ -2443,11 +2524,30 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2440,11 +2521,30 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { float f = this.dimensions.width * 0.8F; AABB axisalignedbb = AABB.ofSize(this.getEyePosition(), (double) f, 1.0E-6D, (double) f); @@ -1493,10 +1493,10 @@ index c0817ef8927f00e2fd3fbf3289f8041fcb494049..3f458ddd4dc04ed28510a212be76bb19 return List.of(); } else { diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -index b8541b54886fc1f48b4c99cf449284ffece1a78a..771c6cf992664b65ffbf4ae0192bc7b09f77c2e6 100644 +index 24b820484497714eb8be87e07ca1d37829d4f2c9..fd74cc9c0dab84b176f7da3fbbbdbc8fd3a7e26d 100644 --- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -@@ -733,6 +733,13 @@ public abstract class BlockBehaviour { +@@ -734,6 +734,13 @@ public abstract class BlockBehaviour { return this.conditionallyFullOpaque; } // Paper end @@ -1510,7 +1510,7 @@ index b8541b54886fc1f48b4c99cf449284ffece1a78a..771c6cf992664b65ffbf4ae0192bc7b0 public void initCache() { this.fluid = this.getBlock().getFluidState(this.asState()); // Paper - moved from getFluid() -@@ -742,7 +749,35 @@ public abstract class BlockBehaviour { +@@ -743,7 +750,35 @@ public abstract class BlockBehaviour { } this.shapeExceedsCube = this.cache == null || this.cache.largeCollisionShape; // Paper - moved from actual method to here this.opacityIfCached = this.cache == null || this.isConditionallyFullOpaque() ? -1 : this.cache.lightBlock; // Paper - cache opacity for light diff --git a/patches/unapplied/server/0803-Optimise-collision-checking-in-player-move-packet-ha.patch b/patches/server/0803-Optimise-collision-checking-in-player-move-packet-ha.patch similarity index 91% rename from patches/unapplied/server/0803-Optimise-collision-checking-in-player-move-packet-ha.patch rename to patches/server/0803-Optimise-collision-checking-in-player-move-packet-ha.patch index e2b66180f8..2cffb888f3 100644 --- a/patches/unapplied/server/0803-Optimise-collision-checking-in-player-move-packet-ha.patch +++ b/patches/server/0803-Optimise-collision-checking-in-player-move-packet-ha.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Optimise collision checking in player move packet handling Move collision logic to just the hasNewCollision call instead of getCubes + hasNewCollision diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 5765b977dacc3982b633e47031dfcd4507c26a5d..1f4be9ed8bd36ed15ca591751c0f76be21fac320 100644 +index ac09598d2152b5dc9be004a6088ed65f3d1d6f59..e31f1fc855da5dcde77f0bced4e195824110e018 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -614,7 +614,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -656,7 +656,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic return; } @@ -18,7 +18,7 @@ index 5765b977dacc3982b633e47031dfcd4507c26a5d..1f4be9ed8bd36ed15ca591751c0f76be d6 = d3 - this.vehicleLastGoodX; // Paper - diff on change, used for checking large move vectors above d7 = d4 - this.vehicleLastGoodY - 1.0E-6D; // Paper - diff on change, used for checking large move vectors above -@@ -622,6 +622,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -664,6 +664,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic boolean flag1 = entity.verticalCollisionBelow; entity.move(MoverType.PLAYER, new Vec3(d6, d7, d8)); @@ -26,7 +26,7 @@ index 5765b977dacc3982b633e47031dfcd4507c26a5d..1f4be9ed8bd36ed15ca591751c0f76be double d11 = d7; d6 = d3 - entity.getX(); -@@ -635,16 +636,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -677,16 +678,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic boolean flag2 = false; if (d10 > org.spigotmc.SpigotConfig.movedWronglyThreshold) { // Spigot @@ -54,7 +54,7 @@ index 5765b977dacc3982b633e47031dfcd4507c26a5d..1f4be9ed8bd36ed15ca591751c0f76be entity.absMoveTo(d0, d1, d2, f, f1); this.player.absMoveTo(d0, d1, d2, this.player.getYRot(), this.player.getXRot()); // CraftBukkit this.connection.send(new ClientboundMoveVehiclePacket(entity)); -@@ -730,7 +739,32 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -772,7 +781,32 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } private boolean noBlocksAround(Entity entity) { @@ -88,7 +88,7 @@ index 5765b977dacc3982b633e47031dfcd4507c26a5d..1f4be9ed8bd36ed15ca591751c0f76be } @Override -@@ -1282,7 +1316,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -1348,7 +1382,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } if (this.awaitingPositionFromClient != null) { @@ -97,7 +97,7 @@ index 5765b977dacc3982b633e47031dfcd4507c26a5d..1f4be9ed8bd36ed15ca591751c0f76be this.awaitingTeleportTime = this.tickCount; this.teleport(this.awaitingPositionFromClient.x, this.awaitingPositionFromClient.y, this.awaitingPositionFromClient.z, this.player.getYRot(), this.player.getXRot()); } -@@ -1376,7 +1410,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -1442,7 +1476,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } } @@ -106,7 +106,7 @@ index 5765b977dacc3982b633e47031dfcd4507c26a5d..1f4be9ed8bd36ed15ca591751c0f76be d7 = d0 - this.lastGoodX; // Paper - diff on change, used for checking large move vectors above d8 = d1 - this.lastGoodY; // Paper - diff on change, used for checking large move vectors above -@@ -1417,6 +1451,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -1483,6 +1517,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic boolean flag1 = this.player.verticalCollisionBelow; this.player.move(MoverType.PLAYER, new Vec3(d7, d8, d9)); @@ -114,7 +114,7 @@ index 5765b977dacc3982b633e47031dfcd4507c26a5d..1f4be9ed8bd36ed15ca591751c0f76be this.player.onGround = packet.isOnGround(); // CraftBukkit - SPIGOT-5810, SPIGOT-5835, SPIGOT-6828: reset by this.player.move // Paper start - prevent position desync if (this.awaitingPositionFromClient != null) { -@@ -1436,12 +1471,23 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -1502,12 +1537,23 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic boolean flag2 = false; if (!this.player.isChangingDimension() && d11 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.gameMode.isCreative() && this.player.gameMode.getGameModeForPlayer() != GameType.SPECTATOR) { // Spigot @@ -140,7 +140,7 @@ index 5765b977dacc3982b633e47031dfcd4507c26a5d..1f4be9ed8bd36ed15ca591751c0f76be this.internalTeleport(d3, d4, d5, f, f1, Collections.emptySet(), false); // CraftBukkit - SPIGOT-1807: Don't call teleport event, when the client thinks the player is falling, because the chunks are not loaded on the client yet. } else { // CraftBukkit start - fire PlayerMoveEvent -@@ -1527,6 +1573,27 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -1593,6 +1639,27 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } } diff --git a/patches/unapplied/server/0804-Actually-unload-POI-data.patch b/patches/server/0804-Actually-unload-POI-data.patch similarity index 97% rename from patches/unapplied/server/0804-Actually-unload-POI-data.patch rename to patches/server/0804-Actually-unload-POI-data.patch index 016fa6f30c..0d8ec84d4e 100644 --- a/patches/unapplied/server/0804-Actually-unload-POI-data.patch +++ b/patches/server/0804-Actually-unload-POI-data.patch @@ -10,10 +10,10 @@ This patch also prevents the saving/unloading of POI data when world saving is disabled. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index d5c3bd389d36f4d8be167bd6a9a15c329b0fb453..4cbe5dbb1909de40153e3757cfff8d8c36cf66f3 100644 +index dc8d915956c04b3e9b596e3cb62f1a0498ef1787..39915f1c71fae142725ae2977a4eb0c483b4967a 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -869,6 +869,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -866,6 +866,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } // Paper end } @@ -21,7 +21,7 @@ index d5c3bd389d36f4d8be167bd6a9a15c329b0fb453..4cbe5dbb1909de40153e3757cfff8d8c this.updatingChunks.queueUpdate(pos, holder); // Paper - Don't copy this.modified = true; -@@ -1020,7 +1021,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1017,7 +1018,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider private void processUnloads(BooleanSupplier shouldKeepTicking) { LongIterator longiterator = this.toDrop.iterator(); @@ -30,7 +30,7 @@ index d5c3bd389d36f4d8be167bd6a9a15c329b0fb453..4cbe5dbb1909de40153e3757cfff8d8c long j = longiterator.nextLong(); ChunkHolder playerchunk = this.updatingChunks.queueRemove(j); // Paper - Don't copy -@@ -1068,6 +1069,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1065,6 +1066,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.regionManagers.get(index).removeChunk(holder.pos.x, holder.pos.z); } // Paper end @@ -38,7 +38,7 @@ index d5c3bd389d36f4d8be167bd6a9a15c329b0fb453..4cbe5dbb1909de40153e3757cfff8d8c if (ichunkaccess instanceof LevelChunk) { ((LevelChunk) ichunkaccess).setLoaded(false); } -@@ -1097,6 +1099,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1094,6 +1096,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider for (int index = 0, len = this.regionManagers.size(); index < len; ++index) { this.regionManagers.get(index).removeChunk(holder.pos.x, holder.pos.z); } @@ -46,7 +46,7 @@ index d5c3bd389d36f4d8be167bd6a9a15c329b0fb453..4cbe5dbb1909de40153e3757cfff8d8c } // Paper end } finally { this.unloadingPlayerChunk = unloadingBefore; } // Paper - do not allow ticket level changes while unloading chunks -@@ -1172,6 +1175,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1169,6 +1172,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } this.poiManager.loadInData(pos, chunkHolder.poiData); chunkHolder.tasks.forEach(Runnable::run); diff --git a/patches/unapplied/server/0805-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch b/patches/server/0805-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch similarity index 100% rename from patches/unapplied/server/0805-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch rename to patches/server/0805-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch diff --git a/patches/unapplied/server/0806-Update-Log4j.patch b/patches/server/0806-Update-Log4j.patch similarity index 100% rename from patches/unapplied/server/0806-Update-Log4j.patch rename to patches/server/0806-Update-Log4j.patch diff --git a/patches/unapplied/server/0807-Add-more-Campfire-API.patch b/patches/server/0807-Add-more-Campfire-API.patch similarity index 100% rename from patches/unapplied/server/0807-Add-more-Campfire-API.patch rename to patches/server/0807-Add-more-Campfire-API.patch diff --git a/patches/unapplied/server/0808-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch b/patches/server/0808-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch similarity index 100% rename from patches/unapplied/server/0808-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch rename to patches/server/0808-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch diff --git a/patches/unapplied/server/0809-Fix-tripwire-state-inconsistency.patch b/patches/server/0809-Fix-tripwire-state-inconsistency.patch similarity index 100% rename from patches/unapplied/server/0809-Fix-tripwire-state-inconsistency.patch rename to patches/server/0809-Fix-tripwire-state-inconsistency.patch diff --git a/patches/unapplied/server/0810-Fix-fluid-logging-on-Block-breakNaturally.patch b/patches/server/0810-Fix-fluid-logging-on-Block-breakNaturally.patch similarity index 100% rename from patches/unapplied/server/0810-Fix-fluid-logging-on-Block-breakNaturally.patch rename to patches/server/0810-Fix-fluid-logging-on-Block-breakNaturally.patch diff --git a/patches/unapplied/server/0811-Forward-CraftEntity-in-teleport-command.patch b/patches/server/0811-Forward-CraftEntity-in-teleport-command.patch similarity index 88% rename from patches/unapplied/server/0811-Forward-CraftEntity-in-teleport-command.patch rename to patches/server/0811-Forward-CraftEntity-in-teleport-command.patch index 7ad6ed0ecb..fccb9245d5 100644 --- a/patches/unapplied/server/0811-Forward-CraftEntity-in-teleport-command.patch +++ b/patches/server/0811-Forward-CraftEntity-in-teleport-command.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Forward CraftEntity in teleport command diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 7e71fe2d570af700f09833a394bbe7af17a3ca3e..45d55054c8bd677ab0532b15f2aa2cf3449344bf 100644 +index 983b3b73ed071b1958e96b5be33e1b1097b95659..ccef7676eee4024885fee3c6350410100a97c748 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3265,6 +3265,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3262,6 +3262,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } public void restoreFrom(Entity original) { @@ -22,7 +22,7 @@ index 7e71fe2d570af700f09833a394bbe7af17a3ca3e..45d55054c8bd677ab0532b15f2aa2cf3 CompoundTag nbttagcompound = original.saveWithoutId(new CompoundTag()); nbttagcompound.remove("Dimension"); -@@ -3346,10 +3353,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3343,10 +3350,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { if (worldserver.getTypeKey() == LevelStem.END) { // CraftBukkit ServerLevel.makeObsidianPlatform(worldserver, this); // CraftBukkit } diff --git a/patches/unapplied/server/0812-Improve-scoreboard-entries.patch b/patches/server/0812-Improve-scoreboard-entries.patch similarity index 100% rename from patches/unapplied/server/0812-Improve-scoreboard-entries.patch rename to patches/server/0812-Improve-scoreboard-entries.patch diff --git a/patches/unapplied/server/0813-Entity-powdered-snow-API.patch b/patches/server/0813-Entity-powdered-snow-API.patch similarity index 100% rename from patches/unapplied/server/0813-Entity-powdered-snow-API.patch rename to patches/server/0813-Entity-powdered-snow-API.patch diff --git a/patches/unapplied/server/0814-Add-API-for-item-entity-health.patch b/patches/server/0814-Add-API-for-item-entity-health.patch similarity index 100% rename from patches/unapplied/server/0814-Add-API-for-item-entity-health.patch rename to patches/server/0814-Add-API-for-item-entity-health.patch diff --git a/patches/unapplied/server/0815-Fix-entity-type-tags-suggestions-in-selectors.patch b/patches/server/0815-Fix-entity-type-tags-suggestions-in-selectors.patch similarity index 96% rename from patches/unapplied/server/0815-Fix-entity-type-tags-suggestions-in-selectors.patch rename to patches/server/0815-Fix-entity-type-tags-suggestions-in-selectors.patch index 57131436c7..6717a81d06 100644 --- a/patches/unapplied/server/0815-Fix-entity-type-tags-suggestions-in-selectors.patch +++ b/patches/server/0815-Fix-entity-type-tags-suggestions-in-selectors.patch @@ -10,10 +10,10 @@ when if this was fixed on the client, that wouldn't be needed. Mojira Issue: https://bugs.mojang.com/browse/MC-235045 diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java -index c948b9387e14d7f8bb2cd6236f513d57286d9301..8762a5d88e80bb68872652a4490e76a669e17c22 100644 +index b14773074fc4b10ef427eb0ad9e21601a7287901..e0dd0fc1638377f4d4226d4b2976b901d635dff0 100644 --- a/src/main/java/net/minecraft/commands/CommandSourceStack.java +++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java -@@ -367,4 +367,20 @@ public class CommandSourceStack implements SharedSuggestionProvider, com.destroy +@@ -412,4 +412,20 @@ public class CommandSourceStack implements SharedSuggestionProvider, com.destroy return this.source.getBukkitSender(this); } // CraftBukkit end @@ -35,10 +35,10 @@ index c948b9387e14d7f8bb2cd6236f513d57286d9301..8762a5d88e80bb68872652a4490e76a6 + // Paper end } diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java -index af00f7dcbc1c4fb8da25128d5603b3ef041db7da..ea5f0600d47b0f7c08b96eed91e5de255114637b 100644 +index e70e5af7e49e4ccf332d9ce44e1a106344b35490..a0f5aa8c3cfce63af9cb286278a7fdebd7aa3642 100644 --- a/src/main/java/net/minecraft/commands/Commands.java +++ b/src/main/java/net/minecraft/commands/Commands.java -@@ -411,6 +411,7 @@ public class Commands { +@@ -422,6 +422,7 @@ public class Commands { private void fillUsableCommands(CommandNode tree, CommandNode result, CommandSourceStack source, Map, CommandNode> resultNodes) { Iterator iterator = tree.getChildren().iterator(); @@ -46,7 +46,7 @@ index af00f7dcbc1c4fb8da25128d5603b3ef041db7da..ea5f0600d47b0f7c08b96eed91e5de25 while (iterator.hasNext()) { CommandNode commandnode2 = (CommandNode) iterator.next(); if ( !org.spigotmc.SpigotConfig.sendNamespaced && commandnode2.getName().contains( ":" ) ) continue; // Spigot -@@ -432,6 +433,12 @@ public class Commands { +@@ -443,6 +444,12 @@ public class Commands { if (requiredargumentbuilder.getSuggestionsProvider() != null) { requiredargumentbuilder.suggests(SuggestionProviders.safelySwap(requiredargumentbuilder.getSuggestionsProvider())); diff --git a/patches/unapplied/server/0816-Configurable-max-block-light-for-monster-spawning.patch b/patches/server/0816-Configurable-max-block-light-for-monster-spawning.patch similarity index 100% rename from patches/unapplied/server/0816-Configurable-max-block-light-for-monster-spawning.patch rename to patches/server/0816-Configurable-max-block-light-for-monster-spawning.patch diff --git a/patches/unapplied/server/0817-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch b/patches/server/0817-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch similarity index 100% rename from patches/unapplied/server/0817-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch rename to patches/server/0817-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch diff --git a/patches/unapplied/server/0818-Load-effect-amplifiers-greater-than-127-correctly.patch b/patches/server/0818-Load-effect-amplifiers-greater-than-127-correctly.patch similarity index 91% rename from patches/unapplied/server/0818-Load-effect-amplifiers-greater-than-127-correctly.patch rename to patches/server/0818-Load-effect-amplifiers-greater-than-127-correctly.patch index b44bde85fd..cf55a56134 100644 --- a/patches/unapplied/server/0818-Load-effect-amplifiers-greater-than-127-correctly.patch +++ b/patches/server/0818-Load-effect-amplifiers-greater-than-127-correctly.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Load effect amplifiers greater than 127 correctly MOJIRA: MC-118857 diff --git a/src/main/java/net/minecraft/world/effect/MobEffectInstance.java b/src/main/java/net/minecraft/world/effect/MobEffectInstance.java -index 9537f6dbc51f21d3e4dd5d28cf77c3f29e35eab8..2faf634994f355ef1bf07fc70f1a0f4451db5fcc 100644 +index b99f15fbe87bcf130d9136559d38a2082a275c12..d545a581b802ec74bcf8a1709d1b0cb790ed5d40 100644 --- a/src/main/java/net/minecraft/world/effect/MobEffectInstance.java +++ b/src/main/java/net/minecraft/world/effect/MobEffectInstance.java @@ -265,7 +265,7 @@ public class MobEffectInstance implements Comparable { diff --git a/patches/unapplied/server/0819-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch b/patches/server/0819-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch similarity index 100% rename from patches/unapplied/server/0819-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch rename to patches/server/0819-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch diff --git a/patches/unapplied/server/0820-Fix-bees-aging-inside-hives.patch b/patches/server/0820-Fix-bees-aging-inside-hives.patch similarity index 100% rename from patches/unapplied/server/0820-Fix-bees-aging-inside-hives.patch rename to patches/server/0820-Fix-bees-aging-inside-hives.patch diff --git a/patches/unapplied/server/0821-Bucketable-API.patch b/patches/server/0821-Bucketable-API.patch similarity index 100% rename from patches/unapplied/server/0821-Bucketable-API.patch rename to patches/server/0821-Bucketable-API.patch diff --git a/patches/unapplied/server/0822-Check-player-world-in-endPortalSoundRadius.patch b/patches/server/0822-Check-player-world-in-endPortalSoundRadius.patch similarity index 100% rename from patches/unapplied/server/0822-Check-player-world-in-endPortalSoundRadius.patch rename to patches/server/0822-Check-player-world-in-endPortalSoundRadius.patch diff --git a/patches/unapplied/server/0823-Validate-usernames.patch b/patches/server/0823-Validate-usernames.patch similarity index 82% rename from patches/unapplied/server/0823-Validate-usernames.patch rename to patches/server/0823-Validate-usernames.patch index 572381f175..01a41eaff9 100644 --- a/patches/unapplied/server/0823-Validate-usernames.patch +++ b/patches/server/0823-Validate-usernames.patch @@ -5,18 +5,18 @@ Subject: [PATCH] Validate usernames diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index c098a602ce840db0099b15bd108ea873c7f111d4..55b7e18507eb68d66b107a1716df948040e659d6 100644 +index 303981c9b873eee07052fbe607690d12074cd1d1..aabd8916470290045832e0fc1895d099c8553dd4 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -70,6 +70,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener - private ProfilePublicKey playerProfilePublicKey; +@@ -71,6 +71,7 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se + private ProfilePublicKey.Data profilePublicKeyData; public String hostname = ""; // CraftBukkit - add field private int velocityLoginMessageId = -1; // Paper - Velocity support + public boolean iKnowThisMayNotBeTheBestIdeaButPleaseDisableUsernameValidation = false; // Paper - username validation overriding public ServerLoginPacketListenerImpl(MinecraftServer server, Connection connection) { this.state = ServerLoginPacketListenerImpl.State.HELLO; -@@ -262,10 +263,38 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener +@@ -272,10 +273,38 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se } } @@ -52,14 +52,14 @@ index c098a602ce840db0099b15bd108ea873c7f111d4..55b7e18507eb68d66b107a1716df9480 + } + } + // Paper end - validate usernames + this.profilePublicKeyData = (ProfilePublicKey.Data) packet.publicKey().orElse(null); // CraftBukkit - decompile error + GameProfile gameprofile = this.server.getSingleplayerProfile(); - try { - this.playerProfilePublicKey = ServerLoginPacketListenerImpl.validatePublicKey(packet, this.server.getServiceSignatureValidator(), this.server.enforceSecureProfile()); diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 6d013360d35c54d1493849b22c9d65b18147cc33..c0ed1103e649e619c58f59c7bedd6a18a58f71ea 100644 +index 20d1360a42a3adb1342b5dc8595b57b82ce573a8..c5f4e30e434dc1467b889bdc41de3773fab3307a 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -707,7 +707,7 @@ public abstract class PlayerList { +@@ -711,7 +711,7 @@ public abstract class PlayerList { for (int i = 0; i < this.players.size(); ++i) { entityplayer = (ServerPlayer) this.players.get(i); diff --git a/patches/unapplied/server/0824-Fix-saving-configs-with-more-long-comments.patch b/patches/server/0824-Fix-saving-configs-with-more-long-comments.patch similarity index 100% rename from patches/unapplied/server/0824-Fix-saving-configs-with-more-long-comments.patch rename to patches/server/0824-Fix-saving-configs-with-more-long-comments.patch diff --git a/patches/unapplied/server/0825-Make-water-animal-spawn-height-configurable.patch b/patches/server/0825-Make-water-animal-spawn-height-configurable.patch similarity index 100% rename from patches/unapplied/server/0825-Make-water-animal-spawn-height-configurable.patch rename to patches/server/0825-Make-water-animal-spawn-height-configurable.patch diff --git a/patches/unapplied/server/0826-Expose-vanilla-BiomeProvider-from-WorldInfo.patch b/patches/server/0826-Expose-vanilla-BiomeProvider-from-WorldInfo.patch similarity index 98% rename from patches/unapplied/server/0826-Expose-vanilla-BiomeProvider-from-WorldInfo.patch rename to patches/server/0826-Expose-vanilla-BiomeProvider-from-WorldInfo.patch index 352f92941f..27fb3bbc46 100644 --- a/patches/unapplied/server/0826-Expose-vanilla-BiomeProvider-from-WorldInfo.patch +++ b/patches/server/0826-Expose-vanilla-BiomeProvider-from-WorldInfo.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose vanilla BiomeProvider from WorldInfo diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 64a4a56d4bb929fddfa415ffea4118cc9c94a4dc..f4b15a660a2ebc13c11649c1555ab0d4068f2cb0 100644 +index 8a36c0bacb71cd9e31affa6290d28bf0f0374d07..d087b37ef4a2c6bee9ef05dfc8ca614d98601928 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -560,7 +560,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { // Paper - push to main for event firing this.disconnect(Component.translatable("multiplayer.disconnect.illegal_characters"), org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_CHARACTERS); // Paper - add cause + }); // Paper - push to main for event firing } else { - if (this.tryHandleChat(packet.getMessage(), packet.getTimeStamp())) { - // CraftBukkit start -@@ -2121,7 +2123,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser + if (this.tryHandleChat(packet.message(), packet.timeStamp(), packet.lastSeenMessages())) { + // this.server.submit(() -> { // CraftBukkit - async chat +@@ -2199,7 +2201,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleChatCommand(ServerboundChatCommandPacket packet) { if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.command())) { @@ -28,15 +28,15 @@ index 1f4be9ed8bd36ed15ca591751c0f76be21fac320..3a9b39d7718948636de9cc47b793ef34 this.disconnect(Component.translatable("multiplayer.disconnect.illegal_characters")); + }); // Paper - push to main for event firing } else { - PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); - if (this.tryHandleChat(packet.command(), packet.timeStamp())) { -@@ -2145,7 +2149,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser - private boolean tryHandleChat(String s, Instant instant) { - if (!this.updateChatOrder(instant)) { - ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}'", this.player.getName().getString(), s); + if (this.tryHandleChat(packet.command(), packet.timeStamp(), packet.lastSeenMessages())) { + this.server.submit(() -> { +@@ -2285,7 +2289,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic + private boolean tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) { + if (!this.updateChatOrder(timestamp)) { + ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}'", this.player.getName().getString(), message); + this.server.scheduleOnMain(() -> { // Paper - push to main this.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat")); + }); // Paper - push to main return false; - } else { - if (this.isChatExpired(instant)) { + } else if (this.player.isRemoved() || this.player.getChatVisibility() == ChatVisiblity.HIDDEN) { // CraftBukkit - dead men tell no tales + this.send(new ClientboundSystemChatPacket(Component.translatable("chat.disabled.options").withStyle(ChatFormatting.RED), false)); diff --git a/patches/unapplied/server/0835-Multi-Block-Change-API-Implementation.patch b/patches/server/0835-Multi-Block-Change-API-Implementation.patch similarity index 97% rename from patches/unapplied/server/0835-Multi-Block-Change-API-Implementation.patch rename to patches/server/0835-Multi-Block-Change-API-Implementation.patch index d50b51941b..f3b1112b49 100644 --- a/patches/unapplied/server/0835-Multi-Block-Change-API-Implementation.patch +++ b/patches/server/0835-Multi-Block-Change-API-Implementation.patch @@ -25,7 +25,7 @@ index 82ea4fabd5732052a286d50bcff8bbcc2c4aa7d7..652bea6868a03a5315965f79c76172fb public void write(FriendlyByteBuf buf) { buf.writeLong(this.sectionPos.asLong()); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index eb2a93a02006c95d50d6158d6ad03b1ea2c96c18..909693c50d75eebc8fcb5a091c561dda00ddfd8c 100644 +index b0f49701460fd2d53f691d7485aab49b14da024f..690bbb42ebe86c9ebca21ac53ad1d10d011d9e6e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -29,6 +29,7 @@ import java.util.logging.Logger; diff --git a/patches/unapplied/server/0836-Fix-NotePlayEvent.patch b/patches/server/0836-Fix-NotePlayEvent.patch similarity index 100% rename from patches/unapplied/server/0836-Fix-NotePlayEvent.patch rename to patches/server/0836-Fix-NotePlayEvent.patch diff --git a/patches/unapplied/server/0837-Freeze-Tick-Lock-API.patch b/patches/server/0837-Freeze-Tick-Lock-API.patch similarity index 90% rename from patches/unapplied/server/0837-Freeze-Tick-Lock-API.patch rename to patches/server/0837-Freeze-Tick-Lock-API.patch index 2d0adac7f5..a3dcc6117b 100644 --- a/patches/unapplied/server/0837-Freeze-Tick-Lock-API.patch +++ b/patches/server/0837-Freeze-Tick-Lock-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Freeze Tick Lock API diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 45d55054c8bd677ab0532b15f2aa2cf3449344bf..cd9ecce672415c9dd26b091b8107d085bb03e759 100644 +index ccef7676eee4024885fee3c6350410100a97c748..473b7c0bd9c49192041e3a6e4c8a9d760344a44a 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -397,6 +397,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -25,7 +25,7 @@ index 45d55054c8bd677ab0532b15f2aa2cf3449344bf..cd9ecce672415c9dd26b091b8107d085 this.setTicksFrozen(0); this.level.levelEvent((Player) null, 1009, this.blockPosition, 1); } -@@ -2252,6 +2253,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2247,6 +2248,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { if (fromNetherPortal) { nbt.putBoolean("Paper.FromNetherPortal", true); } @@ -35,7 +35,7 @@ index 45d55054c8bd677ab0532b15f2aa2cf3449344bf..cd9ecce672415c9dd26b091b8107d085 // Paper end return nbt; } catch (Throwable throwable) { -@@ -2414,6 +2418,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2411,6 +2415,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { if (spawnReason == null) { spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT; } @@ -46,10 +46,10 @@ index 45d55054c8bd677ab0532b15f2aa2cf3449344bf..cd9ecce672415c9dd26b091b8107d085 } catch (Throwable throwable) { diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 7ea4f8003c0da7ea171ac47c27a8bfb7b707be99..ea54c429c170c9aca68a96f38ae4dfc3a23b0f5e 100644 +index 8dc54061802f0253193bda79bded1d5265591519..44c0f77bdeeb9061b1dfcd904ed2c63910e30e42 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3351,7 +3351,7 @@ public abstract class LivingEntity extends Entity { +@@ -3354,7 +3354,7 @@ public abstract class LivingEntity extends Entity { boolean flag1 = this.getType().is(EntityTypeTags.FREEZE_HURTS_EXTRA_TYPES); int i; diff --git a/patches/unapplied/server/0838-Dolphin-API.patch b/patches/server/0838-Dolphin-API.patch similarity index 100% rename from patches/unapplied/server/0838-Dolphin-API.patch rename to patches/server/0838-Dolphin-API.patch diff --git a/patches/unapplied/server/0839-More-PotionEffectType-API.patch b/patches/server/0839-More-PotionEffectType-API.patch similarity index 100% rename from patches/unapplied/server/0839-More-PotionEffectType-API.patch rename to patches/server/0839-More-PotionEffectType-API.patch diff --git a/patches/unapplied/server/0840-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch b/patches/server/0840-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch similarity index 88% rename from patches/unapplied/server/0840-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch rename to patches/server/0840-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch index 2bbcd10eb9..02ee15a8e1 100644 --- a/patches/unapplied/server/0840-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch +++ b/patches/server/0840-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Use a CHM for StructureTemplate.Pallete cache fixes a CME due to this collection being shared across threads diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java -index f3fcd345178efd4917ef79cb141275a987f99e58..fcd6b2a438ffc2f039036a45ff88ba46017981f7 100644 +index 9c45e49f480ccd72f6d6c94e5dec41c4becc76cf..4aac9be67a073e60272a68b52c2cda026d4ee28f 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java +++ b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java -@@ -831,7 +831,7 @@ public class StructureTemplate { +@@ -832,7 +832,7 @@ public class StructureTemplate { public static final class Palette { private final List blocks; diff --git a/patches/unapplied/server/0841-API-for-creating-command-sender-which-forwards-feedb.patch b/patches/server/0841-API-for-creating-command-sender-which-forwards-feedb.patch similarity index 100% rename from patches/unapplied/server/0841-API-for-creating-command-sender-which-forwards-feedb.patch rename to patches/server/0841-API-for-creating-command-sender-which-forwards-feedb.patch diff --git a/patches/unapplied/server/0842-Add-config-for-stronghold-seed.patch b/patches/server/0842-Add-config-for-stronghold-seed.patch similarity index 96% rename from patches/unapplied/server/0842-Add-config-for-stronghold-seed.patch rename to patches/server/0842-Add-config-for-stronghold-seed.patch index 9cde0d0a5a..5118cd7c4b 100644 --- a/patches/unapplied/server/0842-Add-config-for-stronghold-seed.patch +++ b/patches/server/0842-Add-config-for-stronghold-seed.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add config for stronghold seed diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java -index ef53c68c1996e99bc6b6048d5b1bc290cf218158..cdfe2589ca598263d58a11a978e176ab3ecb87e6 100644 +index bdcfa5aac4cd0bd5841922295cc8fbb6ca69bd68..19ffd93b7bc745d9a6822f1e5642d2f640f61df7 100644 --- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java +++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java @@ -236,7 +236,13 @@ public abstract class ChunkGenerator { diff --git a/patches/unapplied/server/0843-Implement-regenerateChunk.patch b/patches/server/0843-Implement-regenerateChunk.patch similarity index 100% rename from patches/unapplied/server/0843-Implement-regenerateChunk.patch rename to patches/server/0843-Implement-regenerateChunk.patch diff --git a/patches/unapplied/server/0845-Fix-cancelled-powdered-snow-bucket-placement.patch b/patches/server/0844-Fix-cancelled-powdered-snow-bucket-placement.patch similarity index 96% rename from patches/unapplied/server/0845-Fix-cancelled-powdered-snow-bucket-placement.patch rename to patches/server/0844-Fix-cancelled-powdered-snow-bucket-placement.patch index d0db4013fe..c6754ee3e6 100644 --- a/patches/unapplied/server/0845-Fix-cancelled-powdered-snow-bucket-placement.patch +++ b/patches/server/0844-Fix-cancelled-powdered-snow-bucket-placement.patch @@ -20,7 +20,7 @@ index 00d31df5ba7e147b4b969a89cfc2b5088a988169..62d6c5b7590ff4faef5d8c7a8be03155 } return InteractionResult.FAIL; diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index c8943bbd72d7ea12298af710d465983cdaa394e8..30b307076e61c183acd5a1d900043b09f54734fc 100644 +index 5c987e863a6ef257caebf8321fa3048dfc7a93c5..67626e7faa4d0854d31b41c0a702edbeb6ce4270 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -337,7 +337,7 @@ public final class ItemStack { diff --git a/patches/unapplied/server/0846-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch b/patches/server/0845-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch similarity index 100% rename from patches/unapplied/server/0846-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch rename to patches/server/0845-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch diff --git a/patches/unapplied/server/0847-Add-GameEvent-tags.patch b/patches/server/0846-Add-GameEvent-tags.patch similarity index 100% rename from patches/unapplied/server/0847-Add-GameEvent-tags.patch rename to patches/server/0846-Add-GameEvent-tags.patch diff --git a/patches/unapplied/server/0848-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch b/patches/server/0847-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch similarity index 94% rename from patches/unapplied/server/0848-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch rename to patches/server/0847-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch index b7915b1deb..d4f44081c5 100644 --- a/patches/unapplied/server/0848-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch +++ b/patches/server/0847-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch @@ -9,7 +9,7 @@ This might result in chunks loading far slower in the nether, for example. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index f4b15a660a2ebc13c11649c1555ab0d4068f2cb0..93d5ce396c40648f392961ef94ce1f0eb3939cd5 100644 +index d087b37ef4a2c6bee9ef05dfc8ca614d98601928..a790387e88c15e44ce3aaf50ab99e1d8beabb551 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1313,6 +1313,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop> { +@@ -100,6 +100,28 @@ public class Connection extends SimpleChannelInboundHandler> { public boolean queueImmunity = false; public ConnectionProtocol protocol; // Paper end @@ -1250,7 +1250,7 @@ index f018d07cbea3785876a547da158cf60eb831a5fb..1f55239677738fdb77ca66b0fab08345 // Paper start - allow controlled flushing volatile boolean canFlush = true; -@@ -479,6 +501,7 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -488,6 +510,7 @@ public class Connection extends SimpleChannelInboundHandler> { return false; } private boolean processQueue() { @@ -1258,7 +1258,7 @@ index f018d07cbea3785876a547da158cf60eb831a5fb..1f55239677738fdb77ca66b0fab08345 if (this.queue.isEmpty()) return true; // Paper start - make only one flush call per sendPacketQueue() call final boolean needsFlush = this.canFlush; -@@ -510,6 +533,12 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -519,6 +542,12 @@ public class Connection extends SimpleChannelInboundHandler> { } } return true; @@ -1369,10 +1369,10 @@ index 5482be03a667939ff009b6810d5cc90c8601e983..11cd31691307749e925930c4b6e10e3f public CompletableFuture> getOrScheduleFuture(ChunkStatus targetStatus, ChunkMap chunkStorage) { diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 4cbe5dbb1909de40153e3757cfff8d8c36cf66f3..638d438824918bf410d66286f3b738c1c1e3311b 100644 +index 39915f1c71fae142725ae2977a4eb0c483b4967a..77c89376495d90d0e7cbf6cd02c9a1c8d9a4340b 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -221,6 +221,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -218,6 +218,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider public final com.destroystokyo.paper.util.misc.PlayerAreaMap playerMobSpawnMap; // this map is absent from updateMaps since it's controlled at the start of the chunkproviderserver tick public final com.destroystokyo.paper.util.misc.PlayerAreaMap playerChunkTickRangeMap; // Paper end - optimise ChunkMap#anyPlayerCloseEnoughForSpawning @@ -1380,7 +1380,7 @@ index 4cbe5dbb1909de40153e3757cfff8d8c36cf66f3..638d438824918bf410d66286f3b738c1 // Paper start - use distance map to optimise tracker public static boolean isLegacyTrackingEntity(Entity entity) { return entity.isLegacyTrackingEntity; -@@ -240,6 +241,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -237,6 +238,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider // Paper end - use distance map to optimise tracker void addPlayerToDistanceMaps(ServerPlayer player) { @@ -1388,7 +1388,7 @@ index 4cbe5dbb1909de40153e3757cfff8d8c36cf66f3..638d438824918bf410d66286f3b738c1 int chunkX = MCUtil.getChunkCoordinate(player.getX()); int chunkZ = MCUtil.getChunkCoordinate(player.getZ()); // Paper start - use distance map to optimise entity tracker -@@ -247,7 +249,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -244,7 +246,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider com.destroystokyo.paper.util.misc.PlayerAreaMap trackMap = this.playerEntityTrackerTrackMaps[i]; int trackRange = this.entityTrackerTrackRanges[i]; @@ -1397,7 +1397,7 @@ index 4cbe5dbb1909de40153e3757cfff8d8c36cf66f3..638d438824918bf410d66286f3b738c1 } // Paper end - use distance map to optimise entity tracker // Note: players need to be explicitly added to distance maps before they can be updated -@@ -277,6 +279,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -274,6 +276,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.playerMobDistanceMap.remove(player); } // Paper end - per player mob spawning @@ -1405,7 +1405,7 @@ index 4cbe5dbb1909de40153e3757cfff8d8c36cf66f3..638d438824918bf410d66286f3b738c1 } void updateMaps(ServerPlayer player) { -@@ -288,7 +291,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -285,7 +288,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider com.destroystokyo.paper.util.misc.PlayerAreaMap trackMap = this.playerEntityTrackerTrackMaps[i]; int trackRange = this.entityTrackerTrackRanges[i]; @@ -1414,7 +1414,7 @@ index 4cbe5dbb1909de40153e3757cfff8d8c36cf66f3..638d438824918bf410d66286f3b738c1 } // Paper end - use distance map to optimise entity tracker this.playerChunkTickRangeMap.update(player, chunkX, chunkZ, DistanceManager.MOB_SPAWN_RANGE); // Paper - optimise ChunkMap#anyPlayerCloseEnoughForSpawning -@@ -298,6 +301,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -295,6 +298,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.playerMobDistanceMap.update(player, chunkX, chunkZ, this.distanceManager.getSimulationDistance()); } // Paper end - per player mob spawning @@ -1422,7 +1422,7 @@ index 4cbe5dbb1909de40153e3757cfff8d8c36cf66f3..638d438824918bf410d66286f3b738c1 } // Paper end // Paper start -@@ -1452,11 +1456,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1449,11 +1453,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider completablefuture1.thenAcceptAsync((either) -> { either.ifLeft((chunk) -> { this.tickingGenerated.getAndIncrement(); @@ -1435,7 +1435,7 @@ index 4cbe5dbb1909de40153e3757cfff8d8c36cf66f3..638d438824918bf410d66286f3b738c1 }); }, (runnable) -> { this.mainThreadMailbox.tell(ChunkTaskPriorityQueueSorter.message(holder, runnable)); -@@ -1625,33 +1625,24 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1622,33 +1622,24 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider int k = this.viewDistance; this.viewDistance = j; @@ -1478,7 +1478,7 @@ index 4cbe5dbb1909de40153e3757cfff8d8c36cf66f3..638d438824918bf410d66286f3b738c1 if (chunk != null) { this.playerLoadedChunk(player, packet, chunk); -@@ -1682,7 +1673,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1679,7 +1670,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider void dumpChunks(Writer writer) throws IOException { CsvOutput csvwriter = CsvOutput.builder().addColumn("x").addColumn("z").addColumn("level").addColumn("in_memory").addColumn("status").addColumn("full_status").addColumn("accessible_ready").addColumn("ticking_ready").addColumn("entity_ticking_ready").addColumn("ticket").addColumn("spawning").addColumn("block_entity_count").addColumn("ticking_ticket").addColumn("ticking_level").addColumn("block_ticks").addColumn("fluid_ticks").build(writer); @@ -1487,7 +1487,7 @@ index 4cbe5dbb1909de40153e3757cfff8d8c36cf66f3..638d438824918bf410d66286f3b738c1 ObjectBidirectionalIterator objectbidirectionaliterator = this.updatingChunks.getVisibleMap().clone().long2ObjectEntrySet().fastIterator(); // Paper while (objectbidirectionaliterator.hasNext()) { -@@ -1698,7 +1689,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1695,7 +1686,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider // CraftBukkit - decompile error csvwriter.writeRow(chunkcoordintpair.x, chunkcoordintpair.z, playerchunk.getTicketLevel(), optional.isPresent(), optional.map(ChunkAccess::getStatus).orElse(null), optional1.map(LevelChunk::getFullStatus).orElse(null), ChunkMap.printFuture(playerchunk.getFullChunkFuture()), ChunkMap.printFuture(playerchunk.getTickingChunkFuture()), ChunkMap.printFuture(playerchunk.getEntityTickingChunkFuture()), this.distanceManager.getTicketDebugString(i), this.anyPlayerCloseEnoughForSpawning(chunkcoordintpair), optional1.map((chunk) -> { return chunk.getBlockEntities().size(); @@ -1496,7 +1496,7 @@ index 4cbe5dbb1909de40153e3757cfff8d8c36cf66f3..638d438824918bf410d66286f3b738c1 return chunk.getBlockTicks().count(); }).orElse(0), optional1.map((chunk) -> { return chunk.getFluidTicks().count(); -@@ -1932,15 +1923,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1929,15 +1920,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.removePlayerFromDistanceMaps(player); // Paper - distance maps } @@ -1513,7 +1513,7 @@ index 4cbe5dbb1909de40153e3757cfff8d8c36cf66f3..638d438824918bf410d66286f3b738c1 } -@@ -1948,7 +1931,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1945,7 +1928,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider SectionPos sectionposition = SectionPos.of((EntityAccess) player); player.setLastSectionPos(sectionposition); @@ -1522,7 +1522,7 @@ index 4cbe5dbb1909de40153e3757cfff8d8c36cf66f3..638d438824918bf410d66286f3b738c1 return sectionposition; } -@@ -1993,65 +1976,40 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1990,65 +1973,40 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider int k1; int l1; @@ -1610,7 +1610,7 @@ index 4cbe5dbb1909de40153e3757cfff8d8c36cf66f3..638d438824918bf410d66286f3b738c1 } public void addEntity(Entity entity) { -@@ -2420,7 +2378,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -2417,7 +2375,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider double vec3d_dx = player.getX() - this.entity.getX(); double vec3d_dz = player.getZ() - this.entity.getZ(); // Paper end - remove allocation of Vec3D here @@ -1855,10 +1855,10 @@ index 96a232f22b1c270b91635ce9c7c6cacc63b026cc..59acbf6249f8f5285504c0ddea448a34 return true; } else { diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 01fd17fa845d4f03f3e7e599f42e56f51dd52ff6..b021fc77687cf7f569e5bf6fbb481c486e27e5a6 100644 +index 856ef0c487af8e8c5689d58decc9acf8d52971c9..836841987ff5dd4901f75f47028a60d8d1b6e04a 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -676,7 +676,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -677,7 +677,7 @@ public class ServerLevel extends Level implements WorldGenLevel { gameprofilerfiller.push("checkDespawn"); entity.checkDespawn(); gameprofilerfiller.pop(); @@ -1867,7 +1867,7 @@ index 01fd17fa845d4f03f3e7e599f42e56f51dd52ff6..b021fc77687cf7f569e5bf6fbb481c48 Entity entity1 = entity.getVehicle(); if (entity1 != null) { -@@ -709,7 +709,10 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -710,7 +710,10 @@ public class ServerLevel extends Level implements WorldGenLevel { @Override public boolean shouldTickBlocksAt(long chunkPos) { @@ -1879,7 +1879,7 @@ index 01fd17fa845d4f03f3e7e599f42e56f51dd52ff6..b021fc77687cf7f569e5bf6fbb481c48 } protected void tickTime() { -@@ -2453,7 +2456,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2454,7 +2457,7 @@ public class ServerLevel extends Level implements WorldGenLevel { private boolean isPositionTickingWithEntitiesLoaded(long chunkPos) { // Paper start - optimize is ticking ready type functions ChunkHolder chunkHolder = this.chunkSource.chunkMap.getVisibleChunkIfPresent(chunkPos); @@ -1889,10 +1889,10 @@ index 01fd17fa845d4f03f3e7e599f42e56f51dd52ff6..b021fc77687cf7f569e5bf6fbb481c48 } diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index dbbe8af3017eb625888bbd22c9c01fe39b59b456..f32876c6c65b52ccb747fb07739386d045ed87e2 100644 +index c3484d612d0273bc066b3ac274b33c21ae9e0936..2dae3fe22bad90ba10a21999816b80e28a19ac39 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -2481,5 +2481,5 @@ public class ServerPlayer extends Player { +@@ -2470,5 +2470,5 @@ public class ServerPlayer extends Player { } // CraftBukkit end @@ -1900,10 +1900,10 @@ index dbbe8af3017eb625888bbd22c9c01fe39b59b456..f32876c6c65b52ccb747fb07739386d0 + public final int getViewDistance() { throw new UnsupportedOperationException("Use PlayerChunkLoader"); } // Paper - placeholder } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index c0ed1103e649e619c58f59c7bedd6a18a58f71ea..e57636efacedf1c6f1ccd4f01f7e94d6fda2ff4f 100644 +index c5f4e30e434dc1467b889bdc41de3773fab3307a..ce7216061492350b89d386f62fc6ffdf85027b3d 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -273,7 +273,7 @@ public abstract class PlayerList { +@@ -274,7 +274,7 @@ public abstract class PlayerList { boolean flag1 = gamerules.getBoolean(GameRules.RULE_REDUCEDDEBUGINFO); // Spigot - view distance @@ -1912,7 +1912,7 @@ index c0ed1103e649e619c58f59c7bedd6a18a58f71ea..e57636efacedf1c6f1ccd4f01f7e94d6 player.getBukkitEntity().sendSupportedChannels(); // CraftBukkit playerconnection.send(new ClientboundCustomPayloadPacket(ClientboundCustomPayloadPacket.BRAND, (new FriendlyByteBuf(Unpooled.buffer())).writeUtf(this.getServer().getServerModName()))); playerconnection.send(new ClientboundChangeDifficultyPacket(worlddata.getDifficulty(), worlddata.isDifficultyLocked())); -@@ -942,8 +942,8 @@ public abstract class PlayerList { +@@ -946,8 +946,8 @@ public abstract class PlayerList { // CraftBukkit start LevelData worlddata = worldserver1.getLevelData(); entityplayer1.connection.send(new ClientboundRespawnPacket(worldserver1.dimensionTypeId(), worldserver1.dimension(), BiomeManager.obfuscateSeed(worldserver1.getSeed()), entityplayer1.gameMode.getGameModeForPlayer(), entityplayer1.gameMode.getPreviousGameModeForPlayer(), worldserver1.isDebug(), worldserver1.isFlat(), flag, entityplayer1.getLastDeathLocation())); @@ -1923,7 +1923,7 @@ index c0ed1103e649e619c58f59c7bedd6a18a58f71ea..e57636efacedf1c6f1ccd4f01f7e94d6 entityplayer1.spawnIn(worldserver1); entityplayer1.unsetRemoved(); entityplayer1.connection.teleport(new Location(worldserver1.getWorld(), entityplayer1.getX(), entityplayer1.getY(), entityplayer1.getZ(), entityplayer1.getYRot(), entityplayer1.getXRot())); -@@ -1485,7 +1485,7 @@ public abstract class PlayerList { +@@ -1505,7 +1505,7 @@ public abstract class PlayerList { public void setViewDistance(int viewDistance) { this.viewDistance = viewDistance; @@ -1932,7 +1932,7 @@ index c0ed1103e649e619c58f59c7bedd6a18a58f71ea..e57636efacedf1c6f1ccd4f01f7e94d6 Iterator iterator = this.server.getAllLevels().iterator(); while (iterator.hasNext()) { -@@ -1500,7 +1500,7 @@ public abstract class PlayerList { +@@ -1520,7 +1520,7 @@ public abstract class PlayerList { public void setSimulationDistance(int simulationDistance) { this.simulationDistance = simulationDistance; @@ -2148,7 +2148,7 @@ index 1bbc73dcdf890a9383795ffeb0d368293f7146a5..c4f7aa9ffb72d2bc555ace64bb8cedc5 // Paper end - view distance api diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 909693c50d75eebc8fcb5a091c561dda00ddfd8c..287520f91e22309e1268be1940e0fafb628980a9 100644 +index 690bbb42ebe86c9ebca21ac53ad1d10d011d9e6e..37f43ef07881b0898caef3ec28779a8b61fada47 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -541,45 +541,80 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/unapplied/server/0858-Fix-Fluid-tags-isTagged-method.patch b/patches/server/0857-Fix-Fluid-tags-isTagged-method.patch similarity index 94% rename from patches/unapplied/server/0858-Fix-Fluid-tags-isTagged-method.patch rename to patches/server/0857-Fix-Fluid-tags-isTagged-method.patch index 4b8e71e081..1210e3715a 100644 --- a/patches/unapplied/server/0858-Fix-Fluid-tags-isTagged-method.patch +++ b/patches/server/0857-Fix-Fluid-tags-isTagged-method.patch @@ -18,7 +18,7 @@ index 89cb1ec575c0f58e9934d98b056621348dbbe27a..cdd474e9b0363641839a66d3e61fec46 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index e8787c6d674178be3beadf3391e77948d9460b0c..7c1e510a0ad4b69c1fedc3367a8216046efb228e 100644 +index 1f491d48b591281e3a054c33683ac4cf76ada802..8961da579b114cbafb329c00aadf1cf75e70cf97 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -201,7 +201,7 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/unapplied/server/0859-Force-close-world-loading-screen.patch b/patches/server/0858-Force-close-world-loading-screen.patch similarity index 92% rename from patches/unapplied/server/0859-Force-close-world-loading-screen.patch rename to patches/server/0858-Force-close-world-loading-screen.patch index 672783b749..b78d4f549b 100644 --- a/patches/unapplied/server/0859-Force-close-world-loading-screen.patch +++ b/patches/server/0858-Force-close-world-loading-screen.patch @@ -10,10 +10,10 @@ so we do not need that. The client only needs the chunk it is currently in to be loaded to close the loading screen, so we just send an empty one. diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index e57636efacedf1c6f1ccd4f01f7e94d6fda2ff4f..c247d27e516d1d7c5dc1e4b50ff6c81cbc54b0cc 100644 +index ce7216061492350b89d386f62fc6ffdf85027b3d..685f3375a825c1ce88fb7d066153d69dd6090ac3 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -422,6 +422,16 @@ public abstract class PlayerList { +@@ -426,6 +426,16 @@ public abstract class PlayerList { // Paper start - move vehicle into method so it can be called above - short circuit around that code onPlayerJoinFinish(player, worldserver1, s1); diff --git a/patches/unapplied/server/0860-Fix-falling-block-spawn-methods.patch b/patches/server/0859-Fix-falling-block-spawn-methods.patch similarity index 100% rename from patches/unapplied/server/0860-Fix-falling-block-spawn-methods.patch rename to patches/server/0859-Fix-falling-block-spawn-methods.patch diff --git a/patches/unapplied/server/0861-Expose-furnace-minecart-push-values.patch b/patches/server/0860-Expose-furnace-minecart-push-values.patch similarity index 100% rename from patches/unapplied/server/0861-Expose-furnace-minecart-push-values.patch rename to patches/server/0860-Expose-furnace-minecart-push-values.patch diff --git a/patches/unapplied/server/0862-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch b/patches/server/0861-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch similarity index 100% rename from patches/unapplied/server/0862-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch rename to patches/server/0861-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch diff --git a/patches/unapplied/server/0863-Fix-save-problems-on-shutdown.patch b/patches/server/0862-Fix-save-problems-on-shutdown.patch similarity index 88% rename from patches/unapplied/server/0863-Fix-save-problems-on-shutdown.patch rename to patches/server/0862-Fix-save-problems-on-shutdown.patch index 20dd6ea7fc..5d60f277a3 100644 --- a/patches/unapplied/server/0863-Fix-save-problems-on-shutdown.patch +++ b/patches/server/0862-Fix-save-problems-on-shutdown.patch @@ -12,10 +12,10 @@ Subject: [PATCH] Fix save problems on shutdown processed so that the main process queue can be drained diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 330b965bcf4740743d131d28b0ff72ba257b2bce..104428d032721fc488c2931c06e802e9b00e47bd 100644 +index 1edf1d97c2d0a145d3baac9140765a9c2bb2a7a6..ad9609ccb33bbe9bdda94a50900258ad3e0339f0 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -954,6 +954,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { return worldserver1.getChunkSource().chunkMap.hasWork(); })) { -@@ -966,9 +973,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { return true; }, false); @@ -55,10 +55,10 @@ index 330b965bcf4740743d131d28b0ff72ba257b2bce..104428d032721fc488c2931c06e802e9 if (isOversleep) return canOversleep();// Paper - because of our changes, this logic is broken return this.forceTicks || this.runningTask() || Util.getMillis() < (this.mayHaveDelayedTasks ? this.delayedTasksMaxNextTickTime : this.nextTickTime); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index b021fc77687cf7f569e5bf6fbb481c486e27e5a6..c89e85c1fe37c8fba54825be76bb1caa15d84dcd 100644 +index 836841987ff5dd4901f75f47028a60d8d1b6e04a..802b929a16b6a8aeee608caeb524e268f8df53bd 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1278,7 +1278,13 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1279,7 +1279,13 @@ public class ServerLevel extends Level implements WorldGenLevel { } } diff --git a/patches/unapplied/server/0864-More-Projectile-API.patch b/patches/server/0863-More-Projectile-API.patch similarity index 100% rename from patches/unapplied/server/0864-More-Projectile-API.patch rename to patches/server/0863-More-Projectile-API.patch diff --git a/patches/unapplied/server/0865-Fix-swamp-hut-cat-generation-deadlock.patch b/patches/server/0864-Fix-swamp-hut-cat-generation-deadlock.patch similarity index 83% rename from patches/unapplied/server/0865-Fix-swamp-hut-cat-generation-deadlock.patch rename to patches/server/0864-Fix-swamp-hut-cat-generation-deadlock.patch index df73aa2280..88f0c6ad96 100644 --- a/patches/unapplied/server/0865-Fix-swamp-hut-cat-generation-deadlock.patch +++ b/patches/server/0864-Fix-swamp-hut-cat-generation-deadlock.patch @@ -23,20 +23,20 @@ index 5ad968a2f1add27da0d6a858e683d5d771128092..e44352857272a2a4027c67bd25a28a94 this.setPersistenceRequired(); } diff --git a/src/main/java/net/minecraft/world/level/StructureManager.java b/src/main/java/net/minecraft/world/level/StructureManager.java -index 21afcbc71fdb10994f2f3451f5b06e4bb75c60c7..bca1e39da66a889caf92c28b6348623a440e1c7f 100644 +index e7445c1ff0d1e3e989fcd8d3630dd5269a64598d..16740418e22560687c0326084c004f19681f8da6 100644 --- a/src/main/java/net/minecraft/world/level/StructureManager.java +++ b/src/main/java/net/minecraft/world/level/StructureManager.java @@ -43,7 +43,12 @@ public class StructureManager { } - public List startsForStructure(ChunkPos chunkPos, Predicate predicate) { -- Map map = this.level.getChunk(chunkPos.x, chunkPos.z, ChunkStatus.STRUCTURE_REFERENCES).getAllReferences(); + public List startsForStructure(ChunkPos pos, Predicate predicate) { +- Map map = this.level.getChunk(pos.x, pos.z, ChunkStatus.STRUCTURE_REFERENCES).getAllReferences(); + // Paper start + return this.startsForStructure(chunkPos, predicate, null); + } -+ public List startsForStructure(ChunkPos chunkPos, Predicate predicate, @Nullable ServerLevelAccessor levelAccessor) { ++ public List startsForStructure(ChunkPos pos, Predicate predicate, @Nullable ServerLevelAccessor levelAccessor) { ++ Map map = (levelAccessor == null ? this.level : levelAccessor).getChunk(pos.x, pos.z, ChunkStatus.STRUCTURE_REFERENCES).getAllReferences(); + // Paper end -+ Map map = (levelAccessor == null ? this.level : levelAccessor).getChunk(chunkPos.x, chunkPos.z, ChunkStatus.STRUCTURE_REFERENCES).getAllReferences(); ImmutableList.Builder builder = ImmutableList.builder(); for(Map.Entry entry : map.entrySet()) { diff --git a/patches/unapplied/server/0866-Don-t-allow-vehicle-movement-from-players-while-tele.patch b/patches/server/0865-Don-t-allow-vehicle-movement-from-players-while-tele.patch similarity index 86% rename from patches/unapplied/server/0866-Don-t-allow-vehicle-movement-from-players-while-tele.patch rename to patches/server/0865-Don-t-allow-vehicle-movement-from-players-while-tele.patch index aedd078a47..ac16a212e9 100644 --- a/patches/unapplied/server/0866-Don-t-allow-vehicle-movement-from-players-while-tele.patch +++ b/patches/server/0865-Don-t-allow-vehicle-movement-from-players-while-tele.patch @@ -7,10 +7,10 @@ Bring the vehicle move packet behavior in line with the regular player move packet. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 3a9b39d7718948636de9cc47b793ef3489300c00..cd4fbce5d7b53e343db2a16f45ef05c696b97121 100644 +index 9a719ee2f2e1394458da2d459b4bc434e06786cd..8ac6bba7a4427733f9f03835480fd574fe17dd93 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -544,6 +544,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -586,6 +586,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } else { Entity entity = this.player.getRootVehicle(); diff --git a/patches/unapplied/server/0867-Implement-getComputedBiome-API.patch b/patches/server/0866-Implement-getComputedBiome-API.patch similarity index 100% rename from patches/unapplied/server/0867-Implement-getComputedBiome-API.patch rename to patches/server/0866-Implement-getComputedBiome-API.patch diff --git a/patches/unapplied/server/0868-Make-some-itemstacks-nonnull.patch b/patches/server/0867-Make-some-itemstacks-nonnull.patch similarity index 100% rename from patches/unapplied/server/0868-Make-some-itemstacks-nonnull.patch rename to patches/server/0867-Make-some-itemstacks-nonnull.patch diff --git a/patches/unapplied/server/0869-Add-debug-for-invalid-GameProfiles-on-skull-blocks-i.patch b/patches/server/0868-Add-debug-for-invalid-GameProfiles-on-skull-blocks-i.patch similarity index 100% rename from patches/unapplied/server/0869-Add-debug-for-invalid-GameProfiles-on-skull-blocks-i.patch rename to patches/server/0868-Add-debug-for-invalid-GameProfiles-on-skull-blocks-i.patch diff --git a/patches/unapplied/server/0870-Implement-enchantWithLevels-API.patch b/patches/server/0869-Implement-enchantWithLevels-API.patch similarity index 100% rename from patches/unapplied/server/0870-Implement-enchantWithLevels-API.patch rename to patches/server/0869-Implement-enchantWithLevels-API.patch diff --git a/patches/unapplied/server/0871-Fix-saving-in-unloadWorld.patch b/patches/server/0870-Fix-saving-in-unloadWorld.patch similarity index 100% rename from patches/unapplied/server/0871-Fix-saving-in-unloadWorld.patch rename to patches/server/0870-Fix-saving-in-unloadWorld.patch diff --git a/patches/unapplied/server/0872-Buffer-OOB-setBlock-calls.patch b/patches/server/0871-Buffer-OOB-setBlock-calls.patch similarity index 89% rename from patches/unapplied/server/0872-Buffer-OOB-setBlock-calls.patch rename to patches/server/0871-Buffer-OOB-setBlock-calls.patch index 2c96f312d6..62e5606e17 100644 --- a/patches/unapplied/server/0872-Buffer-OOB-setBlock-calls.patch +++ b/patches/server/0871-Buffer-OOB-setBlock-calls.patch @@ -13,10 +13,10 @@ we'll also only gen a trace for the first one, I see no real pressing need to generate more, given that that would *massively* negate this patch otherwise diff --git a/src/main/java/net/minecraft/server/level/WorldGenRegion.java b/src/main/java/net/minecraft/server/level/WorldGenRegion.java -index 05ff7bcc79e617904903cf082f6687d24e587547..f000c822ed4563b5b840936852bc7d8e030763e3 100644 +index 51d3150e732f95be13f5f54d994dab1fa89ed3f2..80c1e0e47818486a68e0114b063395290365346b 100644 --- a/src/main/java/net/minecraft/server/level/WorldGenRegion.java +++ b/src/main/java/net/minecraft/server/level/WorldGenRegion.java -@@ -273,6 +273,7 @@ public class WorldGenRegion implements WorldGenLevel { +@@ -274,6 +274,7 @@ public class WorldGenRegion implements WorldGenLevel { } } @@ -24,7 +24,7 @@ index 05ff7bcc79e617904903cf082f6687d24e587547..f000c822ed4563b5b840936852bc7d8e @Override public boolean ensureCanWrite(BlockPos pos) { int i = SectionPos.blockToSectionCoord(pos.getX()); -@@ -292,7 +293,15 @@ public class WorldGenRegion implements WorldGenLevel { +@@ -293,7 +294,15 @@ public class WorldGenRegion implements WorldGenLevel { return true; } else { diff --git a/patches/unapplied/server/0873-Add-TameableDeathMessageEvent.patch b/patches/server/0872-Add-TameableDeathMessageEvent.patch similarity index 100% rename from patches/unapplied/server/0873-Add-TameableDeathMessageEvent.patch rename to patches/server/0872-Add-TameableDeathMessageEvent.patch diff --git a/patches/unapplied/server/0874-Fix-new-block-data-for-EntityChangeBlockEvent-when-s.patch b/patches/server/0873-Fix-new-block-data-for-EntityChangeBlockEvent-when-s.patch similarity index 100% rename from patches/unapplied/server/0874-Fix-new-block-data-for-EntityChangeBlockEvent-when-s.patch rename to patches/server/0873-Fix-new-block-data-for-EntityChangeBlockEvent-when-s.patch diff --git a/patches/unapplied/server/0875-fix-player-loottables-running-when-mob-loot-gamerule.patch b/patches/server/0874-fix-player-loottables-running-when-mob-loot-gamerule.patch similarity index 87% rename from patches/unapplied/server/0875-fix-player-loottables-running-when-mob-loot-gamerule.patch rename to patches/server/0874-fix-player-loottables-running-when-mob-loot-gamerule.patch index 886665f7f9..c3b07f6dd8 100644 --- a/patches/unapplied/server/0875-fix-player-loottables-running-when-mob-loot-gamerule.patch +++ b/patches/server/0874-fix-player-loottables-running-when-mob-loot-gamerule.patch @@ -5,10 +5,10 @@ Subject: [PATCH] fix player loottables running when mob loot gamerule is false diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index f32876c6c65b52ccb747fb07739386d045ed87e2..4a28aeee2235690da28337605bba40417138c360 100644 +index 2dae3fe22bad90ba10a21999816b80e28a19ac39..a6e999b7698948564f6b7e1852a87acf389d60d7 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -860,12 +860,14 @@ public class ServerPlayer extends Player { +@@ -861,12 +861,14 @@ public class ServerPlayer extends Player { } } } diff --git a/patches/unapplied/server/0876-Ensure-entity-passenger-world-matches-ridden-entity.patch b/patches/server/0875-Ensure-entity-passenger-world-matches-ridden-entity.patch similarity index 88% rename from patches/unapplied/server/0876-Ensure-entity-passenger-world-matches-ridden-entity.patch rename to patches/server/0875-Ensure-entity-passenger-world-matches-ridden-entity.patch index 0c3fdbabbc..c2917d9223 100644 --- a/patches/unapplied/server/0876-Ensure-entity-passenger-world-matches-ridden-entity.patch +++ b/patches/server/0875-Ensure-entity-passenger-world-matches-ridden-entity.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Ensure entity passenger world matches ridden entity Bad plugins doing this would cause some obvious problems... diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index cd9ecce672415c9dd26b091b8107d085bb03e759..00ab453328eafa4b5c7b4d1f7ec4eb1e7e1cf359 100644 +index 473b7c0bd9c49192041e3a6e4c8a9d760344a44a..82ccf8eacd5cac82ae2f44d38fc05f606ff50f8e 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2673,6 +2673,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2670,6 +2670,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } protected boolean addPassenger(Entity entity) { // CraftBukkit diff --git a/patches/unapplied/server/0877-Guard-against-invalid-entity-positions.patch b/patches/server/0876-Guard-against-invalid-entity-positions.patch similarity index 92% rename from patches/unapplied/server/0877-Guard-against-invalid-entity-positions.patch rename to patches/server/0876-Guard-against-invalid-entity-positions.patch index e6609c09dd..3e64edd9dc 100644 --- a/patches/unapplied/server/0877-Guard-against-invalid-entity-positions.patch +++ b/patches/server/0876-Guard-against-invalid-entity-positions.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Guard against invalid entity positions Anything not finite should be blocked and logged diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 00ab453328eafa4b5c7b4d1f7ec4eb1e7e1cf359..ae30cfb8681e474af1236411a7ec8e8f99d045ca 100644 +index 82ccf8eacd5cac82ae2f44d38fc05f606ff50f8e..6a1f11a2519cc320407696cc7165404a43d0b961 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -4176,11 +4176,33 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4173,11 +4173,33 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { return this.getZ((2.0D * this.random.nextDouble() - 1.0D) * widthScale); } diff --git a/patches/unapplied/server/0878-cache-resource-keys.patch b/patches/server/0877-cache-resource-keys.patch similarity index 100% rename from patches/unapplied/server/0878-cache-resource-keys.patch rename to patches/server/0877-cache-resource-keys.patch diff --git a/patches/unapplied/server/0879-Allow-to-change-the-podium-for-the-EnderDragon.patch b/patches/server/0878-Allow-to-change-the-podium-for-the-EnderDragon.patch similarity index 100% rename from patches/unapplied/server/0879-Allow-to-change-the-podium-for-the-EnderDragon.patch rename to patches/server/0878-Allow-to-change-the-podium-for-the-EnderDragon.patch diff --git a/patches/unapplied/server/0844-Log-exceptions-thrown-during-chat-processing.patch b/patches/unapplied/server/0844-Log-exceptions-thrown-during-chat-processing.patch deleted file mode 100644 index 7e974e4627..0000000000 --- a/patches/unapplied/server/0844-Log-exceptions-thrown-during-chat-processing.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Bjarne Koll -Date: Sat, 12 Feb 2022 03:20:36 +0100 -Subject: [PATCH] Log exceptions thrown during chat processing - -Previously the async chat executor service would take chat handling -using the #submit method, which wraps the logic in a future task. -The future takes full ownership of the task, including any potential -exception, meaning that the uncaught exception handler never gets -notified about potential exceptions thrown during async chat logic. - -As the chat task does neither need to be cancelled nor returns something -required later on, this commit moves from #submit to #execute, skipping -any future task creation. This properly propagates any exception upwards -to the worker thread in the executor service, allowing the server to -catch and properly log the exception to the console. - -diff --git a/src/main/java/net/minecraft/network/protocol/game/ServerboundChatPacket.java b/src/main/java/net/minecraft/network/protocol/game/ServerboundChatPacket.java -index 5c92aa1cc1a7e7fd0b7a06ae9b21e734fab71c74..3825aa2c381a3ee77e05bea520ff5fb828733857 100644 ---- a/src/main/java/net/minecraft/network/protocol/game/ServerboundChatPacket.java -+++ b/src/main/java/net/minecraft/network/protocol/game/ServerboundChatPacket.java -@@ -45,7 +45,7 @@ public class ServerboundChatPacket implements Packet { - public void handle(final ServerGamePacketListener listener) { - if ( !this.message.startsWith("/") ) - { -- ServerboundChatPacket.executors.submit( new Runnable() -+ ServerboundChatPacket.executors.execute( new Runnable() // Paper - Use #execute to propagate exceptions up instead of swallowing them - { - - @Override