From 2f8a6655493ff3d933a01697ceb168f3cdfb5d86 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Wed, 27 Jul 2022 23:50:05 +0200 Subject: [PATCH] More more more more more more more work --- ...nate-Current-redstone-implementation.patch | 0 ...eEvent-and-CollarColorable-interface.patch | 0 .../server/Add-EntityPortalReadyEvent.patch | 0 .../server/Add-Player-getFishHook.patch | 0 .../server/Add-PlayerStopUsingItemEvent.patch | 0 ...son-to-Tadpoles-spawned-by-Frogspawn.patch | 0 .../server/Add-WardenAngerChangeEvent.patch | 0 ...rtant-BlockStateListPopulator-method.patch | 0 .../server/Add-missing-spawn-eggs.patch | 0 ...-strict-advancement-dimension-checks.patch | 0 ...king-amount-to-PlayerItemDamageEvent.patch | 0 ...-debug-information-to-chat-packet-er.patch | 19 ++-- .../Add-support-for-Proxy-Protocol.patch | 0 ...us-missing-EntityDropItemEvent-calls.patch | 0 ...t-selector-resolving-in-books-by-def.patch | 0 ...o-not-accept-invalid-client-settings.patch | 2 +- ...-chunk-for-dynamic-game-event-listen.patch | 0 ...broadcast-messages-to-command-blocks.patch | 0 ...onent-in-resource-pack-rejection-mes.patch | 2 +- .../server/Don-t-tick-markers.patch | 0 ...-level-random-in-entity-constructors.patch | 0 .../Dont-resent-entity-on-art-update.patch | 0 .../FallingBlock-auto-expire-setting.patch | 0 ...-CauldronLevelChange-on-initial-fill.patch | 0 .../server/Fix-Bee-flower-NPE.patch | 0 ...shPotion-and-LingeringPotion-spawnin.patch | 0 ...ntory-for-smokers-and-blast-furnaces.patch | 0 ...verriding-a-block-entity-during-worl.patch | 0 ...x-NPE-for-BlockDataMeta-getBlockData.patch | 0 ...ix-OfflinePlayer-getBedSpawnLocation.patch | 0 ...g-not-using-commands.spam-exclusions.patch | 8 +- ...reGrowEvent-species-for-RED_MUSHROOM.patch | 0 ...rs-not-spawning-outside-slime-chunks.patch | 0 .../server/More-Teleport-API.patch | 2 +- .../server/Nameable-Banner-API.patch | 0 ...s-ServerLevel-for-gamerule-callbacks.patch | 2 +- ...mpty-items-from-being-added-to-world.patch | 0 ...entity-loading-causing-async-lookups.patch | 0 ...nt-tile-entity-copies-loading-chunks.patch | 24 +++++ .../Sanitize-Sent-BlockEntity-NBT.patch | 0 ...n-on-world-create-while-being-ticked.patch | 0 ..._destroyed-trigger-in-the-correct-pl.patch | 0 ...tead-of-display-name-in-PlayerList-g.patch | 0 .../server/WorldCreator-keepSpawnLoaded.patch | 0 ...-snow-cauldrons-not-turning-to-water.patch | 0 patches/unapplied/server/Fix-MC-252439.patch | 18 ---- ...-check-in-ChunkGenerator-findNearest.patch | 19 ---- ...nt-tile-entity-copies-loading-chunks.patch | 24 ----- ...e-invalid-signature-login-stacktrace.patch | 19 ---- .../server/Untrash-chat-handling.patch | 100 ------------------ 50 files changed, 42 insertions(+), 197 deletions(-) rename patches/{unapplied => }/server/Add-Alternate-Current-redstone-implementation.patch (100%) rename patches/{unapplied => }/server/Add-EntityDyeEvent-and-CollarColorable-interface.patch (100%) rename patches/{unapplied => }/server/Add-EntityPortalReadyEvent.patch (100%) rename patches/{unapplied => }/server/Add-Player-getFishHook.patch (100%) rename patches/{unapplied => }/server/Add-PlayerStopUsingItemEvent.patch (100%) rename patches/{unapplied => }/server/Add-SpawnReason-to-Tadpoles-spawned-by-Frogspawn.patch (100%) rename patches/{unapplied => }/server/Add-WardenAngerChangeEvent.patch (100%) rename patches/{unapplied => }/server/Add-missing-important-BlockStateListPopulator-method.patch (100%) rename patches/{unapplied => }/server/Add-missing-spawn-eggs.patch (100%) rename patches/{unapplied => }/server/Add-option-for-strict-advancement-dimension-checks.patch (100%) rename patches/{unapplied => }/server/Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch (100%) rename patches/{unapplied => }/server/Add-some-minimal-debug-information-to-chat-packet-er.patch (62%) rename patches/{unapplied => }/server/Add-support-for-Proxy-Protocol.patch (100%) rename patches/{unapplied => }/server/Add-various-missing-EntityDropItemEvent-calls.patch (100%) rename patches/{unapplied => }/server/Disable-component-selector-resolving-in-books-by-def.patch (100%) rename patches/{unapplied => }/server/Do-not-accept-invalid-client-settings.patch (97%) rename patches/{unapplied => }/server/Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch (100%) rename patches/{unapplied => }/server/Don-t-broadcast-messages-to-command-blocks.patch (100%) rename patches/{unapplied => }/server/Don-t-print-component-in-resource-pack-rejection-mes.patch (97%) rename patches/{unapplied => }/server/Don-t-tick-markers.patch (100%) rename patches/{unapplied => }/server/Don-t-use-level-random-in-entity-constructors.patch (100%) rename patches/{unapplied => }/server/Dont-resent-entity-on-art-update.patch (100%) rename patches/{unapplied => }/server/FallingBlock-auto-expire-setting.patch (100%) rename patches/{unapplied => }/server/Fire-CauldronLevelChange-on-initial-fill.patch (100%) rename patches/{unapplied => }/server/Fix-Bee-flower-NPE.patch (100%) rename patches/{unapplied => }/server/Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch (100%) rename patches/{unapplied => }/server/Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch (100%) rename patches/{unapplied => }/server/Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch (100%) rename patches/{unapplied => }/server/Fix-NPE-for-BlockDataMeta-getBlockData.patch (100%) rename patches/{unapplied => }/server/Fix-OfflinePlayer-getBedSpawnLocation.patch (100%) rename patches/{unapplied => }/server/Fix-Spigot-Config-not-using-commands.spam-exclusions.patch (82%) rename patches/{unapplied => }/server/Fix-StructureGrowEvent-species-for-RED_MUSHROOM.patch (100%) rename patches/{unapplied => }/server/Fix-slime-spawners-not-spawning-outside-slime-chunks.patch (100%) rename patches/{unapplied => }/server/More-Teleport-API.patch (99%) rename patches/{unapplied => }/server/Nameable-Banner-API.patch (100%) rename patches/{unapplied => }/server/Pass-ServerLevel-for-gamerule-callbacks.patch (99%) rename patches/{unapplied => }/server/Prevent-empty-items-from-being-added-to-world.patch (100%) rename patches/{unapplied => }/server/Prevent-entity-loading-causing-async-lookups.patch (100%) create mode 100644 patches/server/Prevent-tile-entity-copies-loading-chunks.patch rename patches/{unapplied => }/server/Sanitize-Sent-BlockEntity-NBT.patch (100%) rename patches/{unapplied => }/server/Throw-exception-on-world-create-while-being-ticked.patch (100%) rename patches/{unapplied => }/server/Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch (100%) rename patches/{unapplied => }/server/Use-username-instead-of-display-name-in-PlayerList-g.patch (100%) rename patches/{unapplied => }/server/WorldCreator-keepSpawnLoaded.patch (100%) rename patches/{unapplied => }/server/fix-powder-snow-cauldrons-not-turning-to-water.patch (100%) delete mode 100644 patches/unapplied/server/Fix-MC-252439.patch delete mode 100644 patches/unapplied/server/Fix-missing-null-check-in-ChunkGenerator-findNearest.patch delete mode 100644 patches/unapplied/server/Prevent-tile-entity-copies-loading-chunks.patch delete mode 100644 patches/unapplied/server/Remove-invalid-signature-login-stacktrace.patch delete mode 100644 patches/unapplied/server/Untrash-chat-handling.patch diff --git a/patches/unapplied/server/Add-Alternate-Current-redstone-implementation.patch b/patches/server/Add-Alternate-Current-redstone-implementation.patch similarity index 100% rename from patches/unapplied/server/Add-Alternate-Current-redstone-implementation.patch rename to patches/server/Add-Alternate-Current-redstone-implementation.patch diff --git a/patches/unapplied/server/Add-EntityDyeEvent-and-CollarColorable-interface.patch b/patches/server/Add-EntityDyeEvent-and-CollarColorable-interface.patch similarity index 100% rename from patches/unapplied/server/Add-EntityDyeEvent-and-CollarColorable-interface.patch rename to patches/server/Add-EntityDyeEvent-and-CollarColorable-interface.patch diff --git a/patches/unapplied/server/Add-EntityPortalReadyEvent.patch b/patches/server/Add-EntityPortalReadyEvent.patch similarity index 100% rename from patches/unapplied/server/Add-EntityPortalReadyEvent.patch rename to patches/server/Add-EntityPortalReadyEvent.patch diff --git a/patches/unapplied/server/Add-Player-getFishHook.patch b/patches/server/Add-Player-getFishHook.patch similarity index 100% rename from patches/unapplied/server/Add-Player-getFishHook.patch rename to patches/server/Add-Player-getFishHook.patch diff --git a/patches/unapplied/server/Add-PlayerStopUsingItemEvent.patch b/patches/server/Add-PlayerStopUsingItemEvent.patch similarity index 100% rename from patches/unapplied/server/Add-PlayerStopUsingItemEvent.patch rename to patches/server/Add-PlayerStopUsingItemEvent.patch diff --git a/patches/unapplied/server/Add-SpawnReason-to-Tadpoles-spawned-by-Frogspawn.patch b/patches/server/Add-SpawnReason-to-Tadpoles-spawned-by-Frogspawn.patch similarity index 100% rename from patches/unapplied/server/Add-SpawnReason-to-Tadpoles-spawned-by-Frogspawn.patch rename to patches/server/Add-SpawnReason-to-Tadpoles-spawned-by-Frogspawn.patch diff --git a/patches/unapplied/server/Add-WardenAngerChangeEvent.patch b/patches/server/Add-WardenAngerChangeEvent.patch similarity index 100% rename from patches/unapplied/server/Add-WardenAngerChangeEvent.patch rename to patches/server/Add-WardenAngerChangeEvent.patch diff --git a/patches/unapplied/server/Add-missing-important-BlockStateListPopulator-method.patch b/patches/server/Add-missing-important-BlockStateListPopulator-method.patch similarity index 100% rename from patches/unapplied/server/Add-missing-important-BlockStateListPopulator-method.patch rename to patches/server/Add-missing-important-BlockStateListPopulator-method.patch diff --git a/patches/unapplied/server/Add-missing-spawn-eggs.patch b/patches/server/Add-missing-spawn-eggs.patch similarity index 100% rename from patches/unapplied/server/Add-missing-spawn-eggs.patch rename to patches/server/Add-missing-spawn-eggs.patch diff --git a/patches/unapplied/server/Add-option-for-strict-advancement-dimension-checks.patch b/patches/server/Add-option-for-strict-advancement-dimension-checks.patch similarity index 100% rename from patches/unapplied/server/Add-option-for-strict-advancement-dimension-checks.patch rename to patches/server/Add-option-for-strict-advancement-dimension-checks.patch diff --git a/patches/unapplied/server/Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch b/patches/server/Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch similarity index 100% rename from patches/unapplied/server/Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch rename to patches/server/Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch diff --git a/patches/unapplied/server/Add-some-minimal-debug-information-to-chat-packet-er.patch b/patches/server/Add-some-minimal-debug-information-to-chat-packet-er.patch similarity index 62% rename from patches/unapplied/server/Add-some-minimal-debug-information-to-chat-packet-er.patch rename to patches/server/Add-some-minimal-debug-information-to-chat-packet-er.patch index 6dd8f92b46..e03dddc5c1 100644 --- a/patches/unapplied/server/Add-some-minimal-debug-information-to-chat-packet-er.patch +++ b/patches/server/Add-some-minimal-debug-information-to-chat-packet-er.patch @@ -9,20 +9,21 @@ diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListener index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - private boolean tryHandleChat(String s, Instant instant) { - if (!this.updateChatOrder(instant)) { -- ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}'", this.player.getName().getString(), s); -+ ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}'; {} > {}", this.player.getName().getString(), s, this.lastChatTimeStamp.get().getEpochSecond(), instant.getEpochSecond()); // Paper + 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); ++ ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}': {} > {}", this.player.getName().getString(), message, this.lastChatTimeStamp.get().getEpochSecond(), timestamp.getEpochSecond()); // Paper this.server.scheduleOnMain(() -> { // Paper - push to main this.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat")); }); // Paper - push to main +@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic return false; } else { - if (this.isChatExpired(instant)) { -- ServerGamePacketListenerImpl.LOGGER.warn("{} sent expired chat: '{}'. Is the client/server system time unsynchronized?", this.player.getName().getString(), s); -+ ServerGamePacketListenerImpl.LOGGER.warn("{} sent expired chat: '{}'. Is the client/server system time unsynchronized? c: {} s: {}", this.player.getName().getString(), s, instant.getEpochSecond(), Instant.now().getEpochSecond()); // Paper + if (message.hasExpiredServer(Instant.now())) { +- ServerGamePacketListenerImpl.LOGGER.warn("{} sent expired chat: '{}'. Is the client/server system time unsynchronized?", this.player.getName().getString(), message.signedContent().plain()); ++ ServerGamePacketListenerImpl.LOGGER.warn("{} sent expired chat: '{}'. Is the client/server system time unsynchronized? c: {} s: {}", this.player.getName().getString(), message.signedContent().plain(), message.timeStamp().getEpochSecond(), Instant.now().getEpochSecond()); // Paper } - return this.resetLastActionTime(); + return true; diff --git a/patches/unapplied/server/Add-support-for-Proxy-Protocol.patch b/patches/server/Add-support-for-Proxy-Protocol.patch similarity index 100% rename from patches/unapplied/server/Add-support-for-Proxy-Protocol.patch rename to patches/server/Add-support-for-Proxy-Protocol.patch diff --git a/patches/unapplied/server/Add-various-missing-EntityDropItemEvent-calls.patch b/patches/server/Add-various-missing-EntityDropItemEvent-calls.patch similarity index 100% rename from patches/unapplied/server/Add-various-missing-EntityDropItemEvent-calls.patch rename to patches/server/Add-various-missing-EntityDropItemEvent-calls.patch diff --git a/patches/unapplied/server/Disable-component-selector-resolving-in-books-by-def.patch b/patches/server/Disable-component-selector-resolving-in-books-by-def.patch similarity index 100% rename from patches/unapplied/server/Disable-component-selector-resolving-in-books-by-def.patch rename to patches/server/Disable-component-selector-resolving-in-books-by-def.patch diff --git a/patches/unapplied/server/Do-not-accept-invalid-client-settings.patch b/patches/server/Do-not-accept-invalid-client-settings.patch similarity index 97% rename from patches/unapplied/server/Do-not-accept-invalid-client-settings.patch rename to patches/server/Do-not-accept-invalid-client-settings.patch index 3a8b503f8b..3db8ab9f7d 100644 --- a/patches/unapplied/server/Do-not-accept-invalid-client-settings.patch +++ b/patches/server/Do-not-accept-invalid-client-settings.patch @@ -8,7 +8,7 @@ diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListener index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleClientInformation(ServerboundClientInformationPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); diff --git a/patches/unapplied/server/Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch b/patches/server/Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch similarity index 100% rename from patches/unapplied/server/Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch rename to patches/server/Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch diff --git a/patches/unapplied/server/Don-t-broadcast-messages-to-command-blocks.patch b/patches/server/Don-t-broadcast-messages-to-command-blocks.patch similarity index 100% rename from patches/unapplied/server/Don-t-broadcast-messages-to-command-blocks.patch rename to patches/server/Don-t-broadcast-messages-to-command-blocks.patch diff --git a/patches/unapplied/server/Don-t-print-component-in-resource-pack-rejection-mes.patch b/patches/server/Don-t-print-component-in-resource-pack-rejection-mes.patch similarity index 97% rename from patches/unapplied/server/Don-t-print-component-in-resource-pack-rejection-mes.patch rename to patches/server/Don-t-print-component-in-resource-pack-rejection-mes.patch index 20117e0a5e..585e444d08 100644 --- a/patches/unapplied/server/Don-t-print-component-in-resource-pack-rejection-mes.patch +++ b/patches/server/Don-t-print-component-in-resource-pack-rejection-mes.patch @@ -8,7 +8,7 @@ diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListener index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic public void handleResourcePackResponse(ServerboundResourcePackPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); if (packet.getAction() == ServerboundResourcePackPacket.Action.DECLINED && this.server.isResourcePackRequired()) { diff --git a/patches/unapplied/server/Don-t-tick-markers.patch b/patches/server/Don-t-tick-markers.patch similarity index 100% rename from patches/unapplied/server/Don-t-tick-markers.patch rename to patches/server/Don-t-tick-markers.patch diff --git a/patches/unapplied/server/Don-t-use-level-random-in-entity-constructors.patch b/patches/server/Don-t-use-level-random-in-entity-constructors.patch similarity index 100% rename from patches/unapplied/server/Don-t-use-level-random-in-entity-constructors.patch rename to patches/server/Don-t-use-level-random-in-entity-constructors.patch diff --git a/patches/unapplied/server/Dont-resent-entity-on-art-update.patch b/patches/server/Dont-resent-entity-on-art-update.patch similarity index 100% rename from patches/unapplied/server/Dont-resent-entity-on-art-update.patch rename to patches/server/Dont-resent-entity-on-art-update.patch diff --git a/patches/unapplied/server/FallingBlock-auto-expire-setting.patch b/patches/server/FallingBlock-auto-expire-setting.patch similarity index 100% rename from patches/unapplied/server/FallingBlock-auto-expire-setting.patch rename to patches/server/FallingBlock-auto-expire-setting.patch diff --git a/patches/unapplied/server/Fire-CauldronLevelChange-on-initial-fill.patch b/patches/server/Fire-CauldronLevelChange-on-initial-fill.patch similarity index 100% rename from patches/unapplied/server/Fire-CauldronLevelChange-on-initial-fill.patch rename to patches/server/Fire-CauldronLevelChange-on-initial-fill.patch diff --git a/patches/unapplied/server/Fix-Bee-flower-NPE.patch b/patches/server/Fix-Bee-flower-NPE.patch similarity index 100% rename from patches/unapplied/server/Fix-Bee-flower-NPE.patch rename to patches/server/Fix-Bee-flower-NPE.patch diff --git a/patches/unapplied/server/Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch b/patches/server/Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch similarity index 100% rename from patches/unapplied/server/Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch rename to patches/server/Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch diff --git a/patches/unapplied/server/Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch b/patches/server/Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch similarity index 100% rename from patches/unapplied/server/Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch rename to patches/server/Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch diff --git a/patches/unapplied/server/Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch b/patches/server/Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch similarity index 100% rename from patches/unapplied/server/Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch rename to patches/server/Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch diff --git a/patches/unapplied/server/Fix-NPE-for-BlockDataMeta-getBlockData.patch b/patches/server/Fix-NPE-for-BlockDataMeta-getBlockData.patch similarity index 100% rename from patches/unapplied/server/Fix-NPE-for-BlockDataMeta-getBlockData.patch rename to patches/server/Fix-NPE-for-BlockDataMeta-getBlockData.patch diff --git a/patches/unapplied/server/Fix-OfflinePlayer-getBedSpawnLocation.patch b/patches/server/Fix-OfflinePlayer-getBedSpawnLocation.patch similarity index 100% rename from patches/unapplied/server/Fix-OfflinePlayer-getBedSpawnLocation.patch rename to patches/server/Fix-OfflinePlayer-getBedSpawnLocation.patch diff --git a/patches/unapplied/server/Fix-Spigot-Config-not-using-commands.spam-exclusions.patch b/patches/server/Fix-Spigot-Config-not-using-commands.spam-exclusions.patch similarity index 82% rename from patches/unapplied/server/Fix-Spigot-Config-not-using-commands.spam-exclusions.patch rename to patches/server/Fix-Spigot-Config-not-using-commands.spam-exclusions.patch index 859b7b24e2..c139de5427 100644 --- a/patches/unapplied/server/Fix-Spigot-Config-not-using-commands.spam-exclusions.patch +++ b/patches/server/Fix-Spigot-Config-not-using-commands.spam-exclusions.patch @@ -8,12 +8,12 @@ diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListener index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // Spigot end // this.chatSpamTickCount += 20; - if (this.chatSpamTickCount.addAndGet(20) > 200 && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { + if (counted && this.chatSpamTickCount.addAndGet(20) > 200 && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { // Paper - exclude from SpigotConfig.spamExclusions - if (!isSync) { - Waitable waitable = new Waitable() { - @Override + // CraftBukkit end + this.disconnect(Component.translatable("disconnect.spam"), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM); // Paper - kick event cause + } diff --git a/patches/unapplied/server/Fix-StructureGrowEvent-species-for-RED_MUSHROOM.patch b/patches/server/Fix-StructureGrowEvent-species-for-RED_MUSHROOM.patch similarity index 100% rename from patches/unapplied/server/Fix-StructureGrowEvent-species-for-RED_MUSHROOM.patch rename to patches/server/Fix-StructureGrowEvent-species-for-RED_MUSHROOM.patch diff --git a/patches/unapplied/server/Fix-slime-spawners-not-spawning-outside-slime-chunks.patch b/patches/server/Fix-slime-spawners-not-spawning-outside-slime-chunks.patch similarity index 100% rename from patches/unapplied/server/Fix-slime-spawners-not-spawning-outside-slime-chunks.patch rename to patches/server/Fix-slime-spawners-not-spawning-outside-slime-chunks.patch diff --git a/patches/unapplied/server/More-Teleport-API.patch b/patches/server/More-Teleport-API.patch similarity index 99% rename from patches/unapplied/server/More-Teleport-API.patch rename to patches/server/More-Teleport-API.patch index c910174a8c..81e4f6d120 100644 --- a/patches/unapplied/server/More-Teleport-API.patch +++ b/patches/server/More-Teleport-API.patch @@ -8,7 +8,7 @@ diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListener index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic return false; // CraftBukkit - Return event status } diff --git a/patches/unapplied/server/Nameable-Banner-API.patch b/patches/server/Nameable-Banner-API.patch similarity index 100% rename from patches/unapplied/server/Nameable-Banner-API.patch rename to patches/server/Nameable-Banner-API.patch diff --git a/patches/unapplied/server/Pass-ServerLevel-for-gamerule-callbacks.patch b/patches/server/Pass-ServerLevel-for-gamerule-callbacks.patch similarity index 99% rename from patches/unapplied/server/Pass-ServerLevel-for-gamerule-callbacks.patch rename to patches/server/Pass-ServerLevel-for-gamerule-callbacks.patch index 312a041d86..8e20eeb450 100644 --- a/patches/unapplied/server/Pass-ServerLevel-for-gamerule-callbacks.patch +++ b/patches/server/Pass-ServerLevel-for-gamerule-callbacks.patch @@ -21,7 +21,7 @@ diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListener index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.player = this.server.getPlayerList().respawn(this.player, false); if (this.server.isHardcore()) { this.player.setGameMode(GameType.SPECTATOR, org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.HARDCORE_DEATH, null); // Paper diff --git a/patches/unapplied/server/Prevent-empty-items-from-being-added-to-world.patch b/patches/server/Prevent-empty-items-from-being-added-to-world.patch similarity index 100% rename from patches/unapplied/server/Prevent-empty-items-from-being-added-to-world.patch rename to patches/server/Prevent-empty-items-from-being-added-to-world.patch diff --git a/patches/unapplied/server/Prevent-entity-loading-causing-async-lookups.patch b/patches/server/Prevent-entity-loading-causing-async-lookups.patch similarity index 100% rename from patches/unapplied/server/Prevent-entity-loading-causing-async-lookups.patch rename to patches/server/Prevent-entity-loading-causing-async-lookups.patch diff --git a/patches/server/Prevent-tile-entity-copies-loading-chunks.patch b/patches/server/Prevent-tile-entity-copies-loading-chunks.patch new file mode 100644 index 0000000000..b010dbc6be --- /dev/null +++ b/patches/server/Prevent-tile-entity-copies-loading-chunks.patch @@ -0,0 +1,24 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Shane Freeder +Date: Wed, 13 Apr 2022 08:25:42 +0100 +Subject: [PATCH] Prevent tile entity copies loading chunks + + +diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java ++++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic + BlockPos blockposition = BlockEntity.getPosFromTag(nbttagcompound); + + if (this.player.level.isLoaded(blockposition)) { +- BlockEntity tileentity = this.player.level.getBlockEntity(blockposition); ++ // Paper start ++ BlockEntity tileentity = null; ++ if (this.player.distanceToSqr(blockposition.getX(), blockposition.getY(), blockposition.getZ()) < 32 * 32 && this.player.getLevel().isLoadedAndInBounds(blockposition)) { ++ tileentity = this.player.level.getBlockEntity(blockposition); ++ } ++ // Paper end + + if (tileentity != null) { + tileentity.saveToItem(itemstack); diff --git a/patches/unapplied/server/Sanitize-Sent-BlockEntity-NBT.patch b/patches/server/Sanitize-Sent-BlockEntity-NBT.patch similarity index 100% rename from patches/unapplied/server/Sanitize-Sent-BlockEntity-NBT.patch rename to patches/server/Sanitize-Sent-BlockEntity-NBT.patch diff --git a/patches/unapplied/server/Throw-exception-on-world-create-while-being-ticked.patch b/patches/server/Throw-exception-on-world-create-while-being-ticked.patch similarity index 100% rename from patches/unapplied/server/Throw-exception-on-world-create-while-being-ticked.patch rename to patches/server/Throw-exception-on-world-create-while-being-ticked.patch diff --git a/patches/unapplied/server/Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch b/patches/server/Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch similarity index 100% rename from patches/unapplied/server/Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch rename to patches/server/Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch diff --git a/patches/unapplied/server/Use-username-instead-of-display-name-in-PlayerList-g.patch b/patches/server/Use-username-instead-of-display-name-in-PlayerList-g.patch similarity index 100% rename from patches/unapplied/server/Use-username-instead-of-display-name-in-PlayerList-g.patch rename to patches/server/Use-username-instead-of-display-name-in-PlayerList-g.patch diff --git a/patches/unapplied/server/WorldCreator-keepSpawnLoaded.patch b/patches/server/WorldCreator-keepSpawnLoaded.patch similarity index 100% rename from patches/unapplied/server/WorldCreator-keepSpawnLoaded.patch rename to patches/server/WorldCreator-keepSpawnLoaded.patch diff --git a/patches/unapplied/server/fix-powder-snow-cauldrons-not-turning-to-water.patch b/patches/server/fix-powder-snow-cauldrons-not-turning-to-water.patch similarity index 100% rename from patches/unapplied/server/fix-powder-snow-cauldrons-not-turning-to-water.patch rename to patches/server/fix-powder-snow-cauldrons-not-turning-to-water.patch diff --git a/patches/unapplied/server/Fix-MC-252439.patch b/patches/unapplied/server/Fix-MC-252439.patch deleted file mode 100644 index 19ece699e8..0000000000 --- a/patches/unapplied/server/Fix-MC-252439.patch +++ /dev/null @@ -1,18 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Noah van der Aa -Date: Wed, 15 Jun 2022 22:34:07 +0200 -Subject: [PATCH] Fix MC-252439 - - -diff --git a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java -+++ b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java -@@ -0,0 +0,0 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { - - entityvillager.setVillagerXp(this.villagerXp); - entityvillager.finalizeSpawn(world, world.getCurrentDifficultyAt(entityvillager.blockPosition()), MobSpawnType.CONVERSION, (SpawnGroupData) null, (CompoundTag) null); -+ entityvillager.refreshBrain(world); // Paper - Fix MC-252439 - if (this.conversionStarter != null) { - Player entityhuman = world.getPlayerByUUID(this.conversionStarter); - diff --git a/patches/unapplied/server/Fix-missing-null-check-in-ChunkGenerator-findNearest.patch b/patches/unapplied/server/Fix-missing-null-check-in-ChunkGenerator-findNearest.patch deleted file mode 100644 index 6931db52a3..0000000000 --- a/patches/unapplied/server/Fix-missing-null-check-in-ChunkGenerator-findNearest.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shane Freeder -Date: Mon, 20 Jun 2022 14:59:38 +0100 -Subject: [PATCH] Fix missing null check in - ChunkGenerator#findNearestMapStructure - - -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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java -+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java -@@ -0,0 +0,0 @@ public abstract class ChunkGenerator { - if (structureplacement1 instanceof ConcentricRingsStructurePlacement) { - ConcentricRingsStructurePlacement concentricringsstructureplacement = (ConcentricRingsStructurePlacement) structureplacement1; - Pair> pair1 = this.getNearestGeneratedStructure((Set) entry.getValue(), world, structuremanager, center, skipReferencedStructures, concentricringsstructureplacement); -+ if (pair1 == null) continue; // Paper - BlockPos blockposition1 = (BlockPos) pair1.getFirst(); - double d1 = center.distSqr(blockposition1); - diff --git a/patches/unapplied/server/Prevent-tile-entity-copies-loading-chunks.patch b/patches/unapplied/server/Prevent-tile-entity-copies-loading-chunks.patch deleted file mode 100644 index 7be93ada79..0000000000 --- a/patches/unapplied/server/Prevent-tile-entity-copies-loading-chunks.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shane Freeder -Date: Wed, 13 Apr 2022 08:25:42 +0100 -Subject: [PATCH] Prevent tile entity copies loading chunks - - -diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser - - if (!itemstack.isEmpty() && nbttagcompound != null && nbttagcompound.contains("x") && nbttagcompound.contains("y") && nbttagcompound.contains("z") && this.player.getBukkitEntity().hasPermission("minecraft.nbt.copy")) { // Spigot - BlockPos blockposition = BlockEntity.getPosFromTag(nbttagcompound); -- BlockEntity tileentity = this.player.level.getBlockEntity(blockposition); -+ // Paper start -+ BlockEntity tileentity = null; -+ if (this.player.distanceToSqr(blockposition.getX(), blockposition.getY(), blockposition.getZ()) < 32 * 32 && this.player.getLevel().isLoadedAndInBounds(blockposition)) { -+ tileentity = this.player.level.getBlockEntity(blockposition); -+ } -+ // Paper end - - if (tileentity != null) { - tileentity.saveToItem(itemstack); diff --git a/patches/unapplied/server/Remove-invalid-signature-login-stacktrace.patch b/patches/unapplied/server/Remove-invalid-signature-login-stacktrace.patch deleted file mode 100644 index c391038fde..0000000000 --- a/patches/unapplied/server/Remove-invalid-signature-login-stacktrace.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Nassim Jahnke -Date: Fri, 10 Jun 2022 16:02:35 +0200 -Subject: [PATCH] Remove invalid signature login stacktrace - - -diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -0,0 +0,0 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener - try { - this.playerProfilePublicKey = ServerLoginPacketListenerImpl.validatePublicKey(packet, this.server.getServiceSignatureValidator(), this.server.enforceSecureProfile()); - } catch (ServerLoginPacketListenerImpl.PublicKeyParseException loginlistener_a) { -- ServerLoginPacketListenerImpl.LOGGER.error(loginlistener_a.getMessage(), loginlistener_a.getCause()); -+ //ServerLoginPacketListenerImpl.LOGGER.error(loginlistener_a.getMessage(), loginlistener_a.getCause()); // Paper - unnecessary stacktrace - if (!this.connection.isMemoryConnection()) { - this.disconnect(loginlistener_a.getComponent()); - return; diff --git a/patches/unapplied/server/Untrash-chat-handling.patch b/patches/unapplied/server/Untrash-chat-handling.patch deleted file mode 100644 index 016e5d589a..0000000000 --- a/patches/unapplied/server/Untrash-chat-handling.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Nassim Jahnke -Date: Wed, 8 Jun 2022 21:30:34 +0200 -Subject: [PATCH] Untrash chat handling - -Vanilla technically allows chat messages with starting slashes now, -Spigot still accepts them as commands, most likely due to being too -lazy to properly differentiate between chat and command intent in -their implementation. This disallows modified clients to send chat -messages with slashes and makes sure chat validation always happens -on the netty event loop, rather than there and possibly being moved -to the main thread, thus having the delayed handling cause a bad -process order of message ids. - -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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/network/protocol/game/ServerboundChatPacket.java -+++ b/src/main/java/net/minecraft/network/protocol/game/ServerboundChatPacket.java -@@ -0,0 +0,0 @@ public class ServerboundChatPacket implements Packet { - } - - // Spigot Start -- private static final java.util.concurrent.ExecutorService executors = java.util.concurrent.Executors.newCachedThreadPool( -+ // Paper start - untrash chat event handling -+ public static final java.util.concurrent.ExecutorService executors = java.util.concurrent.Executors.newCachedThreadPool( - new com.google.common.util.concurrent.ThreadFactoryBuilder().setDaemon( true ).setNameFormat( "Async Chat Thread - #%d" ).setUncaughtExceptionHandler(new net.minecraft.DefaultUncaughtExceptionHandlerWithName(net.minecraft.server.MinecraftServer.LOGGER)).build() ); // Paper - public void handle(final ServerGamePacketListener listener) { -- if ( !this.message.startsWith("/") ) -- { -- ServerboundChatPacket.executors.execute( new Runnable() // Paper - Use #execute to propagate exceptions up instead of swallowing them -- { -- -- @Override -- public void run() -- { -- listener.handleChat( ServerboundChatPacket.this ); -- } -- } ); -+ if (this.message.startsWith("/")) { -+ // Just don't allow this instead of creating gigantic diff when untrashing more Spigot code - return; - } -- // Spigot End - listener.handleChat(this); -+ // Paper end - untrash chat event handling - } - - public String getMessage() { -diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser - - @Override - public void handleChat(ServerboundChatPacket packet) { -- // CraftBukkit start - async chat -- // SPIGOT-3638 -- if (this.server.isStopped()) { -- return; -- } - // CraftBukkit end - if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.getMessage())) { - this.server.scheduleOnMain(() -> { // Paper - push to main for event firing -@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser - if (this.tryHandleChat(packet.getMessage(), packet.getTimeStamp())) { - // CraftBukkit start - // this.filterTextPacket(packetplayinchat.getMessage(), (filteredtext) -> { -+ // Paper start - untrash chat handling -+ ServerboundChatPacket.executors.execute(() -> { -+ if (this.server.isStopped()) { -+ return; -+ } - this.handleChat(packet, FilteredText.passThrough(packet.getMessage())); // CraftBukkit - filter NYI - // }); -+ }); -+ // Paper end - untrash chat handling - // CraftBukkit end - } - -@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser - this.disconnect(Component.translatable("multiplayer.disconnect.illegal_characters")); - }); // Paper - push to main for event firing - } else { -- PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); -+ // Paper start - untrash chat handling - if (this.tryHandleChat(packet.command(), packet.timeStamp())) { -+ this.server.scheduleOnMain(() -> { - // CraftBukkit start - // CommandListenerWrapper commandlistenerwrapper = this.player.createCommandSourceStack().withSigningContext(serverboundchatcommandpacket.signingContext(this.player.getUUID())); - -@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser - } - this.detectRateSpam(true, "/" + packet.command()); // Spigot - // CraftBukkit end -+ }); -+ // Paper end - untrash chat handling - } - - }