diff --git a/patches/removed/1.18.2/0831-Fix-entity-type-tags-suggestions-in-selectors.patch b/patches/server/0831-Fix-entity-type-tags-suggestions-in-selectors.patch similarity index 85% rename from patches/removed/1.18.2/0831-Fix-entity-type-tags-suggestions-in-selectors.patch rename to patches/server/0831-Fix-entity-type-tags-suggestions-in-selectors.patch index b0e070a47..8e61b0d56 100644 --- a/patches/removed/1.18.2/0831-Fix-entity-type-tags-suggestions-in-selectors.patch +++ b/patches/server/0831-Fix-entity-type-tags-suggestions-in-selectors.patch @@ -10,7 +10,7 @@ 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/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 609f7ff543353ede53dc46dafc5a2fd0b0622cd8..d5aa95846e7f52108a03e3731023527281b21d73 100644 +index 3916d3e7773f4a3b6d5c5347d6a12a707bffcdad..04cb8282efae69aa62ae1dad4c39220f658ec575 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -525,6 +525,11 @@ public class PaperConfig { @@ -26,10 +26,10 @@ index 609f7ff543353ede53dc46dafc5a2fd0b0622cd8..d5aa95846e7f52108a03e37310235272 public final double packetLimitInterval; public final double maxPacketRate; diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java -index cb0045fc4ddd738c45dee89d57b213a633b9a136..098182d2426a25cef0bc285356bc346db0af8172 100644 +index db26d834d9a59c4fd60f99077f0118c08293678f..00bbf33aa44e2d5a4e755a2d7c1a60de9e36674f 100644 --- a/src/main/java/net/minecraft/commands/CommandSourceStack.java +++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java -@@ -322,4 +322,20 @@ public class CommandSourceStack implements SharedSuggestionProvider, com.destroy +@@ -330,4 +330,20 @@ public class CommandSourceStack implements SharedSuggestionProvider, com.destroy return this.source.getBukkitSender(this); } // CraftBukkit end @@ -51,10 +51,10 @@ index cb0045fc4ddd738c45dee89d57b213a633b9a136..098182d2426a25cef0bc285356bc346d + // Paper end } diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java -index f6b73f8c6638ddf79e45042f5c8902ea1f271f5c..1617437515590a32c42687d290dd11bc8fa8edf5 100644 +index 13a0f78abbb00b489b63d88ce14f60cb04402085..b66afde6851ceaeccb84aea00cdc333dfbf3d4b0 100644 --- a/src/main/java/net/minecraft/commands/Commands.java +++ b/src/main/java/net/minecraft/commands/Commands.java -@@ -407,6 +407,7 @@ public class Commands { +@@ -409,6 +409,7 @@ public class Commands { private void fillUsableCommands(CommandNode tree, CommandNode result, CommandSourceStack source, Map, CommandNode> resultNodes) { Iterator iterator = tree.getChildren().iterator(); @@ -62,7 +62,7 @@ index f6b73f8c6638ddf79e45042f5c8902ea1f271f5c..1617437515590a32c42687d290dd11bc while (iterator.hasNext()) { CommandNode commandnode2 = (CommandNode) iterator.next(); if ( !org.spigotmc.SpigotConfig.sendNamespaced && commandnode2.getName().contains( ":" ) ) continue; // Spigot -@@ -428,6 +429,12 @@ public class Commands { +@@ -430,6 +431,12 @@ public class Commands { if (requiredargumentbuilder.getSuggestionsProvider() != null) { requiredargumentbuilder.suggests(SuggestionProviders.safelySwap(requiredargumentbuilder.getSuggestionsProvider())); @@ -89,7 +89,7 @@ index 1f3076e59bac23d428c747ae12619e4b4e5fdd5a..1d23d05d7028c5f820f172cc54153f56 try { argumentparserselector.parse(); diff --git a/src/main/java/net/minecraft/commands/arguments/selector/EntitySelectorParser.java b/src/main/java/net/minecraft/commands/arguments/selector/EntitySelectorParser.java -index 466d1d8d80df028ff842ce21be198be6a1c77b42..015d01242a9e8e7c6ef5b6bbf1b6d6ad0c8f36ca 100644 +index 2816fd4a57fe51689daf1b4850ad3ab3c9749225..cdbe0695a29d0854d7f59c1f63a74bd0c1dbf4d9 100644 --- a/src/main/java/net/minecraft/commands/arguments/selector/EntitySelectorParser.java +++ b/src/main/java/net/minecraft/commands/arguments/selector/EntitySelectorParser.java @@ -115,12 +115,19 @@ public class EntitySelectorParser { @@ -113,7 +113,7 @@ index 466d1d8d80df028ff842ce21be198be6a1c77b42..015d01242a9e8e7c6ef5b6bbf1b6d6ad this.level = MinMaxBounds.Ints.ANY; this.rotX = WrappedMinMaxBounds.ANY; diff --git a/src/main/java/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java b/src/main/java/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java -index 061181381e4eabad5fa0122f049c4ce05996ffd2..90e023be5c38a038f1c03141ef4325abb25fd615 100644 +index ff1e8fafe55fec729b3d8da3c2cd0d6c347013dd..5a078a4ee1f5535399f70ddb2bc6559441c3daf0 100644 --- a/src/main/java/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java +++ b/src/main/java/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java @@ -69,6 +69,19 @@ public class EntitySelectorOptions { @@ -136,25 +136,16 @@ index 061181381e4eabad5fa0122f049c4ce05996ffd2..90e023be5c38a038f1c03141ef4325ab private static void register(String id, EntitySelectorOptions.Modifier handler, Predicate condition, Component description) { OPTIONS.put(id, new EntitySelectorOptions.Option(handler, condition, description)); -@@ -316,8 +329,20 @@ public class EntitySelectorOptions { +@@ -316,6 +329,12 @@ public class EntitySelectorOptions { if (reader.isTag()) { - ResourceLocation resourceLocation = ResourceLocation.read(reader.getReader()); + TagKey> tagKey = TagKey.create(Registry.ENTITY_TYPE_REGISTRY, ResourceLocation.read(reader.getReader())); + // Paper start - throw error if invalid entity tag (only on suggestions to keep cmd success behavior) -+ final net.minecraft.tags.Tag> tag; -+ if (com.destroystokyo.paper.PaperConfig.fixTargetSelectorTagCompletion && reader.parsingEntityArgumentSuggestions) { -+ tag = EntityTypeTags.getAllTags().getTag(resourceLocation); -+ } else { -+ tag = EntityTypeTags.getAllTags().getTagOrEmpty(resourceLocation); -+ } -+ if (tag == null) { ++ if (com.destroystokyo.paper.PaperConfig.fixTargetSelectorTagCompletion && reader.parsingEntityArgumentSuggestions && !Registry.ENTITY_TYPE.isKnownTagName(tagKey)) { + reader.getReader().setCursor(i); -+ throw ERROR_ENTITY_TAG_INVALID.createWithContext(reader.getReader(), resourceLocation.toString()); ++ throw ERROR_ENTITY_TAG_INVALID.createWithContext(reader.getReader(), tagKey); + } + // Paper end reader.addPredicate((entity) -> { -- return entity.getType().is(entity.getServer().getTags().getOrEmpty(Registry.ENTITY_TYPE_REGISTRY).getTagOrEmpty(resourceLocation)) != bl; -+ return entity.getType().is(tag) != bl; // Paper + return entity.getType().is(tagKey) != bl; }); - } else { - ResourceLocation resourceLocation2 = ResourceLocation.read(reader.getReader()); diff --git a/patches/server/0831-Configurable-max-block-light-for-monster-spawning.patch b/patches/server/0832-Configurable-max-block-light-for-monster-spawning.patch similarity index 100% rename from patches/server/0831-Configurable-max-block-light-for-monster-spawning.patch rename to patches/server/0832-Configurable-max-block-light-for-monster-spawning.patch diff --git a/patches/server/0832-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch b/patches/server/0833-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch similarity index 100% rename from patches/server/0832-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch rename to patches/server/0833-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch diff --git a/patches/server/0833-Load-effect-amplifiers-greater-than-127-correctly.patch b/patches/server/0834-Load-effect-amplifiers-greater-than-127-correctly.patch similarity index 100% rename from patches/server/0833-Load-effect-amplifiers-greater-than-127-correctly.patch rename to patches/server/0834-Load-effect-amplifiers-greater-than-127-correctly.patch diff --git a/patches/server/0834-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch b/patches/server/0835-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch similarity index 100% rename from patches/server/0834-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch rename to patches/server/0835-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch diff --git a/patches/server/0835-Fix-bees-aging-inside-hives.patch b/patches/server/0836-Fix-bees-aging-inside-hives.patch similarity index 100% rename from patches/server/0835-Fix-bees-aging-inside-hives.patch rename to patches/server/0836-Fix-bees-aging-inside-hives.patch diff --git a/patches/server/0836-Bucketable-API.patch b/patches/server/0837-Bucketable-API.patch similarity index 100% rename from patches/server/0836-Bucketable-API.patch rename to patches/server/0837-Bucketable-API.patch diff --git a/patches/server/0837-Check-player-world-in-endPortalSoundRadius.patch b/patches/server/0838-Check-player-world-in-endPortalSoundRadius.patch similarity index 100% rename from patches/server/0837-Check-player-world-in-endPortalSoundRadius.patch rename to patches/server/0838-Check-player-world-in-endPortalSoundRadius.patch diff --git a/patches/server/0838-Validate-usernames.patch b/patches/server/0839-Validate-usernames.patch similarity index 96% rename from patches/server/0838-Validate-usernames.patch rename to patches/server/0839-Validate-usernames.patch index dec1576cd..1b417d320 100644 --- a/patches/server/0838-Validate-usernames.patch +++ b/patches/server/0839-Validate-usernames.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Validate usernames diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 609f7ff543353ede53dc46dafc5a2fd0b0622cd8..32f258997face08c20d787b5a9534cb8f3ae4906 100644 +index 04cb8282efae69aa62ae1dad4c39220f658ec575..48eeeb832127f681f6cb8162cbe3954fc14bb47d 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -493,6 +493,12 @@ public class PaperConfig { @@ -74,7 +74,7 @@ index f5c1dff1d571e89f960f11400edbcbbea0620575..7065aa4522431d08018fec8e591ba7c2 this.state = ServerLoginPacketListenerImpl.State.KEY; this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.nonce)); diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 639670e7570beec3dba24b348bc3da0ce0231393..0766abd7334bc76b57fd509c8890701704aa217c 100644 +index 6a3d444fcac8c7d561dcadb02f64eaa3c3d7b1cd..fae67931849eb0c19598def9f538c7971c36c575 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 { diff --git a/patches/server/0839-Fix-saving-configs-with-more-long-comments.patch b/patches/server/0840-Fix-saving-configs-with-more-long-comments.patch similarity index 100% rename from patches/server/0839-Fix-saving-configs-with-more-long-comments.patch rename to patches/server/0840-Fix-saving-configs-with-more-long-comments.patch diff --git a/patches/server/0840-Make-water-animal-spawn-height-configurable.patch b/patches/server/0841-Make-water-animal-spawn-height-configurable.patch similarity index 100% rename from patches/server/0840-Make-water-animal-spawn-height-configurable.patch rename to patches/server/0841-Make-water-animal-spawn-height-configurable.patch diff --git a/patches/server/0841-Expose-vanilla-BiomeProvider-from-WorldInfo.patch b/patches/server/0842-Expose-vanilla-BiomeProvider-from-WorldInfo.patch similarity index 96% rename from patches/server/0841-Expose-vanilla-BiomeProvider-from-WorldInfo.patch rename to patches/server/0842-Expose-vanilla-BiomeProvider-from-WorldInfo.patch index c9881d72d..225bfa5e0 100644 --- a/patches/server/0841-Expose-vanilla-BiomeProvider-from-WorldInfo.patch +++ b/patches/server/0842-Expose-vanilla-BiomeProvider-from-WorldInfo.patch @@ -5,7 +5,7 @@ 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 cdbee0c0d0f6154dc6396be87eeea1db67ad5dbf..7fcc1342245470158da4cc35112649210eacddee 100644 +index d86e74c9363d10428d611cb232243a872abd9d5f..c2ddd9f8bf9dded65a7cd1fa69b30113336cd409 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -584,7 +584,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index d9e883a936bc4b6bb12a4c28f2174994bc3ec710..72df27de006121fe21d1cc4c5f50dbc4a23fc505 100644 +index 46b43e515138a2d8b4a30d7007489bf0a7a981fe..2e8e066ca3f57cfb9d11cbc620d038cea9dd2b64 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -132,6 +132,7 @@ import org.bukkit.util.Vector; diff --git a/patches/server/0858-Log-exceptions-thrown-during-chat-processing.patch b/patches/server/0859-Log-exceptions-thrown-during-chat-processing.patch similarity index 100% rename from patches/server/0858-Log-exceptions-thrown-during-chat-processing.patch rename to patches/server/0859-Log-exceptions-thrown-during-chat-processing.patch diff --git a/patches/server/0859-Fix-cancelled-powdered-snow-bucket-placement.patch b/patches/server/0860-Fix-cancelled-powdered-snow-bucket-placement.patch similarity index 100% rename from patches/server/0859-Fix-cancelled-powdered-snow-bucket-placement.patch rename to patches/server/0860-Fix-cancelled-powdered-snow-bucket-placement.patch diff --git a/patches/server/0860-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch b/patches/server/0861-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch similarity index 91% rename from patches/server/0860-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch rename to patches/server/0861-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch index ac26ffed5..b72e1c19b 100644 --- a/patches/server/0860-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch +++ b/patches/server/0861-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add missing Validate calls to CraftServer#getSpawnLimit Copies appropriate checks from CraftWorld#getSpawnLimit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 2ebacb84f70c63c304cb709e11fe265a0dfd48db..640cfb7cf792e2e61417cc93627b43db8dc9bcc9 100644 +index 32bc72e930b5876116a9e7da816ff11d8d44a410..3b7b4a578346a162afbeb5781633c163d0c46177 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2145,6 +2145,8 @@ public final class CraftServer implements Server { diff --git a/patches/server/0861-Add-GameEvent-tags.patch b/patches/server/0862-Add-GameEvent-tags.patch similarity index 100% rename from patches/server/0861-Add-GameEvent-tags.patch rename to patches/server/0862-Add-GameEvent-tags.patch diff --git a/patches/server/0862-Replace-player-chunk-loader-system.patch b/patches/server/0863-Replace-player-chunk-loader-system.patch similarity index 99% rename from patches/server/0862-Replace-player-chunk-loader-system.patch rename to patches/server/0863-Replace-player-chunk-loader-system.patch index 455f27f30..e4965a431 100644 --- a/patches/server/0862-Replace-player-chunk-loader-system.patch +++ b/patches/server/0863-Replace-player-chunk-loader-system.patch @@ -84,10 +84,10 @@ index 5e3b7fb2e0b7608610555cd23e7ad25a05883181..1cb0aae3e0c619a715766e0fa604dfd9 })); diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 19f93d3bbac34ca40000965ce515e17c2ffe2603..ba8323c62212c8daa10b17af61759ac68856d19c 100644 +index 66501c3b0eb92d946ef77bbd3f36ebcc0d3023af..153f07bac06093b43a1f5b0f8e1a46ffbe6407e5 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -645,4 +645,33 @@ public class PaperConfig { +@@ -650,4 +650,33 @@ public class PaperConfig { private static void timeCommandAffectsAllWorlds() { timeCommandAffectsAllWorlds = getBoolean("settings.time-command-affects-all-worlds", timeCommandAffectsAllWorlds); } diff --git a/patches/server/0863-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch b/patches/server/0864-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch similarity index 94% rename from patches/server/0863-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch rename to patches/server/0864-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch index cf02a182c..f36aa2077 100644 --- a/patches/server/0863-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch +++ b/patches/server/0864-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 7fcc1342245470158da4cc35112649210eacddee..e065c834033af7bc06065f34515ba7d045f345f7 100644 +index c2ddd9f8bf9dded65a7cd1fa69b30113336cd409..d19d816ee511bf5d44151c3e159adb288b60bc03 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1358,6 +1358,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop