From 83b6b26d39e2fd9f9dfe7713e70cd28f5080b17a Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Sat, 10 Aug 2024 12:24:38 +0200 Subject: [PATCH] Update to 1.21.1 --- README.md | 4 ++-- build.gradle.kts | 2 +- gradle.properties | 4 ++-- patches/api/0001-Convert-project-to-Gradle.patch | 4 ++-- patches/server/0001-Setup-Gradle-project.patch | 4 ++-- patches/server/0009-MC-Utils.patch | 8 ++++---- patches/server/0010-Adventure.patch | 8 ++++---- patches/server/0023-Timings-v2.patch | 12 ++++++------ ...Prevent-block-entity-and-entity-crashes.patch | 14 +++++++------- .../0062-Add-exception-reporting-event.patch | 6 +++--- ...-to-get-a-BlockState-without-a-snapshot.patch | 12 ++++++------ ...626-Fix-upstreams-block-state-factories.patch | 4 ++-- .../0707-Sanitize-sent-BlockEntity-NBT.patch | 4 ++-- ...ument-suggestion-permissions-to-align-w.patch | 6 +++--- ...of-invalid-block-entity-during-world-ge.patch | 4 ++-- patches/server/0966-General-ItemMeta-fixes.patch | 4 ++-- .../0971-Brigadier-based-command-API.patch | 6 +++--- ...ng-oversized-item-data-in-equipment-and.patch | 14 +++++++------- .../0987-Moonrise-optimisation-patches.patch | 16 ++++++++-------- patches/server/1005-Optimize-Hoppers.patch | 4 ++-- ...tity-type-tags-suggestions-in-selectors.patch | 14 +++++--------- .../server/1022-Improved-Watchdog-Support.patch | 4 ++-- work/BuildData | 2 +- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 26 files changed, 81 insertions(+), 85 deletions(-) diff --git a/README.md b/README.md index 0da22f4faa..062f378c86 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ How To (Plugin Developers) io.papermc.paper paper-api - 1.21-R0.1-SNAPSHOT + 1.21.1-R0.1-SNAPSHOT provided ``` @@ -53,7 +53,7 @@ repositories { } dependencies { - compileOnly("io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT") + compileOnly("io.papermc.paper:paper-api:1.21.1-R0.1-SNAPSHOT") } java { diff --git a/build.gradle.kts b/build.gradle.kts index 5a2840e06e..95035067be 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -67,7 +67,7 @@ repositories { } dependencies { - paramMappings("net.fabricmc:yarn:1.21+build.1:mergedv2") + paramMappings("net.fabricmc:yarn:1.21.1+build.3:mergedv2") remapper("net.fabricmc:tiny-remapper:0.10.3:fat") decompiler("org.vineflower:vineflower:1.10.1") spigotDecompiler("io.papermc:patched-spigot-fernflower:0.1+build.13") diff --git a/gradle.properties b/gradle.properties index 7aa001f7cc..4d595c30f3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ group=io.papermc.paper -version=1.21-R0.1-SNAPSHOT -mcVersion=1.21 +version=1.21.1-R0.1-SNAPSHOT +mcVersion=1.21.1 # Set to true while updating Minecraft version updatingMinecraft=false diff --git a/patches/api/0001-Convert-project-to-Gradle.patch b/patches/api/0001-Convert-project-to-Gradle.patch index aa54057aba..339ca372f0 100644 --- a/patches/api/0001-Convert-project-to-Gradle.patch +++ b/patches/api/0001-Convert-project-to-Gradle.patch @@ -124,7 +124,7 @@ index 0000000000000000000000000000000000000000..6271e2bad0ed937c2c46a8c8fdf186c4 +} diff --git a/pom.xml b/pom.xml deleted file mode 100644 -index 86628114c1d111f6d256186ca739ba8a44b3412a..0000000000000000000000000000000000000000 +index 2c5ac393cffbe61330c5aa95115e7e906c0775d3..0000000000000000000000000000000000000000 --- a/pom.xml +++ /dev/null @@ -1,267 +0,0 @@ @@ -135,7 +135,7 @@ index 86628114c1d111f6d256186ca739ba8a44b3412a..00000000000000000000000000000000 - - org.spigotmc - spigot-api -- 1.21-R0.1-SNAPSHOT +- 1.21.1-R0.1-SNAPSHOT - jar - - Spigot-API diff --git a/patches/server/0001-Setup-Gradle-project.patch b/patches/server/0001-Setup-Gradle-project.patch index 8cdbf973d7..d8dace80ea 100644 --- a/patches/server/0001-Setup-Gradle-project.patch +++ b/patches/server/0001-Setup-Gradle-project.patch @@ -160,7 +160,7 @@ index 0000000000000000000000000000000000000000..9ea079d14a92367629dc8fb30d1be043 +} diff --git a/pom.xml b/pom.xml deleted file mode 100644 -index e6f88c20b3a3ba28b917bea9a671b2709d32b3cd..0000000000000000000000000000000000000000 +index 5abcca1894a0d7795d394834f56c189c0bbeb82f..0000000000000000000000000000000000000000 --- a/pom.xml +++ /dev/null @@ -1,604 +0,0 @@ @@ -170,7 +170,7 @@ index e6f88c20b3a3ba28b917bea9a671b2709d32b3cd..00000000000000000000000000000000 - org.spigotmc - spigot - jar -- 1.21-R0.1-SNAPSHOT +- 1.21.1-R0.1-SNAPSHOT - Spigot - https://www.spigotmc.org/ - diff --git a/patches/server/0009-MC-Utils.patch b/patches/server/0009-MC-Utils.patch index 64c984e330..1fc2a2627a 100644 --- a/patches/server/0009-MC-Utils.patch +++ b/patches/server/0009-MC-Utils.patch @@ -5421,7 +5421,7 @@ index a52077f0d93c94b0ea644bc14b9b28e84fd1b154..dcc0acd259920463a4464213b9a5e793 @Nullable @Override diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index b537e7a079497db428db405edfccde74f32f4208..c664021dbfffcf0db3247041270ce9a1ee6940de 100644 +index 5b73fcfe278f57de249f3a96da58dc08eda7aff6..25380a44e5cc94f3924cfee6a03c3091fea04ae2 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -116,6 +116,10 @@ public class LevelChunk extends ChunkAccess { @@ -5480,7 +5480,7 @@ index b537e7a079497db428db405edfccde74f32f4208..c664021dbfffcf0db3247041270ce9a1 @Override public FluidState getFluidState(BlockPos pos) { return this.getFluidState(pos.getX(), pos.getY(), pos.getZ()); -@@ -549,7 +582,11 @@ public class LevelChunk extends ChunkAccess { +@@ -554,7 +587,11 @@ public class LevelChunk extends ChunkAccess { // CraftBukkit start public void loadCallback() { @@ -5492,7 +5492,7 @@ index b537e7a079497db428db405edfccde74f32f4208..c664021dbfffcf0db3247041270ce9a1 if (server != null) { /* * If it's a new world, the first few chunks are generated inside -@@ -590,6 +627,10 @@ public class LevelChunk extends ChunkAccess { +@@ -595,6 +632,10 @@ public class LevelChunk extends ChunkAccess { server.getPluginManager().callEvent(unloadEvent); // note: saving can be prevented, but not forced if no saving is actually required this.mustNotSave = !unloadEvent.isSaveChunk(); @@ -5563,7 +5563,7 @@ index 34933c5324126f9afdc5cba9dea997ace8f01806..1cfc906317f07a44f06a4adf021c44e3 return false; } else { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index f04c0f8b3905b488aac221fedde335a54ad1ff58..7f8864da8a6f9c2410191851add1ba566b8c171c 100644 +index a094eb1348509fea0c3d253cddfe409998dcbf23..2ea3ad9ab43dec0555d6716bebefbc3bb6553f1a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2601,4 +2601,9 @@ public final class CraftServer implements Server { diff --git a/patches/server/0010-Adventure.patch b/patches/server/0010-Adventure.patch index 1352a5e435..bed3f0467a 100644 --- a/patches/server/0010-Adventure.patch +++ b/patches/server/0010-Adventure.patch @@ -2191,10 +2191,10 @@ index f30cdfa5fd294479e35680b2f758b3295f659b74..ec34e402104d7a696ea95e0b11ee7018 public CommandSourceStack(CommandSource output, Vec3 pos, Vec2 rot, ServerLevel world, int level, String name, Component displayName, MinecraftServer server, @Nullable Entity entity) { this(output, pos, rot, world, level, name, displayName, server, entity, false, CommandResultCallback.EMPTY, EntityAnchorArgument.Anchor.FEET, CommandSigningContext.ANONYMOUS, TaskChainer.immediate(server)); diff --git a/src/main/java/net/minecraft/commands/arguments/MessageArgument.java b/src/main/java/net/minecraft/commands/arguments/MessageArgument.java -index 0047fd758ad43cc7b13355b60c410a9bcc37bec0..982b2bab27e3d55d0ba07060862c0c3183ad91b0 100644 +index 8f03eed020a99b96189f4f5d42d806d06f4d6b5e..55484826fc5ddd04ae024e25a0251796d7fa9c28 100644 --- a/src/main/java/net/minecraft/commands/arguments/MessageArgument.java +++ b/src/main/java/net/minecraft/commands/arguments/MessageArgument.java -@@ -53,17 +53,21 @@ public class MessageArgument implements SignedArgument +@@ -54,17 +54,21 @@ public class MessageArgument implements SignedArgument private static void resolveSignedMessage(Consumer callback, CommandSourceStack source, PlayerChatMessage message) { MinecraftServer minecraftServer = source.getServer(); CompletableFuture completableFuture = filterPlainText(source, message); @@ -3327,7 +3327,7 @@ index 49c037e961c5ca5ba8d6a870cb32ffe8719adc91..2772c19f58a35713d61aab24f6f0d6f5 } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 7f8864da8a6f9c2410191851add1ba566b8c171c..bec1fdabbc3727c1f7297b2d23914a5179f4adcb 100644 +index 2ea3ad9ab43dec0555d6716bebefbc3bb6553f1a..be068650a568fc1d0d3b9c5acd040adafb2344e1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -644,8 +644,10 @@ public final class CraftServer implements Server { @@ -5589,7 +5589,7 @@ index ff040613083c015d9c52c0995591b64305fd5018..1b552b3f05ac7fc44450de4b1ec78907 boolean hadFormat = false; diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index aa6a9dcd5528df38dddc0c661334c35658a19cee..5a89b9ca6a62f0bfb5fe01ed4097870788cf5d83 100644 +index eeffc4be4ae7168c9f69edbbff6642fd4c214b3d..b64be3f292d88fa60746a3fe542740ef8ad2b41c 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -77,6 +77,43 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0023-Timings-v2.patch b/patches/server/0023-Timings-v2.patch index 0d0d81a7a8..2af23f8ad7 100644 --- a/patches/server/0023-Timings-v2.patch +++ b/patches/server/0023-Timings-v2.patch @@ -1526,7 +1526,7 @@ index d1cfcc8a36964f006f1af6764c52b5ca458b478d..def3e28edc206e0ba41111e26332db46 private String descriptionId; @Nullable diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -index e6c586eb85c6c477a3c130e1e1a37b41f17c30c8..6e35709f2a7c32050908e7e5af5529c9f342b787 100644 +index 6a4e5bfa70b31311a9076eb314c0a0146d5b08a5..17cda4c8b61efd99c1a43f921ed604827bb064f3 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java @@ -34,10 +34,12 @@ import org.bukkit.inventory.InventoryHolder; @@ -1544,10 +1544,10 @@ index e6c586eb85c6c477a3c130e1e1a37b41f17c30c8..6e35709f2a7c32050908e7e5af5529c9 private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry(); public CraftPersistentDataContainer persistentDataContainer; diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index c664021dbfffcf0db3247041270ce9a1ee6940de..332351b78fa22cd354b916c4a29bea5b4b223e40 100644 +index 25380a44e5cc94f3924cfee6a03c3091fea04ae2..418ba374886d93f69afd614e4be05f6561e1f897 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -597,6 +597,7 @@ public class LevelChunk extends ChunkAccess { +@@ -602,6 +602,7 @@ public class LevelChunk extends ChunkAccess { server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkLoadEvent(bukkitChunk, this.needsDecoration)); if (this.needsDecoration) { @@ -1555,7 +1555,7 @@ index c664021dbfffcf0db3247041270ce9a1ee6940de..332351b78fa22cd354b916c4a29bea5b this.needsDecoration = false; java.util.Random random = new java.util.Random(); random.setSeed(this.level.getSeed()); -@@ -616,6 +617,7 @@ public class LevelChunk extends ChunkAccess { +@@ -621,6 +622,7 @@ public class LevelChunk extends ChunkAccess { } } server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkPopulateEvent(bukkitChunk)); @@ -1590,7 +1590,7 @@ index 46a090123e205394791cdbde2af84c58ce55f7e1..47f5f3d58bb3bf85cf35f9baae77df7f }; } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 7839e34cbd42e1b77c533b0dede42e0a19daf2a4..f2355612b497079f1de84e953c36720794da51d8 100644 +index ee63b8134b8b3187a65d2b99962cfacbee18ff9f..29bb34e9207bd6c49cfbe58d4b598dcd35b7a65c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -376,7 +376,7 @@ public final class CraftServer implements Server { @@ -1985,7 +1985,7 @@ index f97eccb6a17c7876e1e002d798eb67bbe80571a0..76effc345d362047e64d064eb64a5222 + } // Paper } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index fa2e43020fafc283a9c063d10a82280158c7f93d..9576cabff99d154ef77595b074082adf9212698d 100644 +index 6aa5b1e05893bcf61a91cb4de578d8996ca0a868..9383bf47404fca8d008d5c401ed37ddaa7bef4f7 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -197,6 +197,12 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0037-Prevent-block-entity-and-entity-crashes.patch b/patches/server/0037-Prevent-block-entity-and-entity-crashes.patch index 8c0b53d52b..59cb59cc0f 100644 --- a/patches/server/0037-Prevent-block-entity-and-entity-crashes.patch +++ b/patches/server/0037-Prevent-block-entity-and-entity-crashes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent block entity and entity crashes diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 1702cd6aa8b4fc29b8f2539604f6e203bf95d020..e19ee11905417918c7ec142fd2016ab3f000e4e2 100644 +index 79d5423be919dfe4db75ad7dd0ce403ad0214462..e8b8475dd6fd7b89651f744da2cb9696c73ddc3e 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -731,11 +731,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -26,12 +26,12 @@ index 1702cd6aa8b4fc29b8f2539604f6e203bf95d020..e19ee11905417918c7ec142fd2016ab3 } diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -index 6e35709f2a7c32050908e7e5af5529c9f342b787..d20f71a2098b327423cbdbbc096aa9e358cb809d 100644 +index 17cda4c8b61efd99c1a43f921ed604827bb064f3..d6ad310d3b472c40c128cfb459171d9f48e50915 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -@@ -263,7 +263,12 @@ public abstract class BlockEntity { - return s + " // " + this.getClass().getCanonicalName(); - }); +@@ -272,7 +272,12 @@ public abstract class BlockEntity { + public void fillCrashReportCategory(CrashReportCategory crashReportSection) { + crashReportSection.setDetail("Name", this::getNameForReporting); if (this.level != null) { - CrashReportCategory.populateBlockDetails(crashReportSection, this.level, this.worldPosition, this.getBlockState()); + // Paper start - Prevent block entity and entity crashes @@ -44,10 +44,10 @@ index 6e35709f2a7c32050908e7e5af5529c9f342b787..d20f71a2098b327423cbdbbc096aa9e3 } } diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index 332351b78fa22cd354b916c4a29bea5b4b223e40..7bfe757b605f4e5a16b28214ac3b497e738b45b5 100644 +index 418ba374886d93f69afd614e4be05f6561e1f897..6889991885cc2075e0936b2c480befeef30d308c 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -948,11 +948,11 @@ public class LevelChunk extends ChunkAccess { +@@ -953,11 +953,11 @@ public class LevelChunk extends ChunkAccess { gameprofilerfiller.pop(); } catch (Throwable throwable) { diff --git a/patches/server/0062-Add-exception-reporting-event.patch b/patches/server/0062-Add-exception-reporting-event.patch index 3efe1b1f98..36051c1835 100644 --- a/patches/server/0062-Add-exception-reporting-event.patch +++ b/patches/server/0062-Add-exception-reporting-event.patch @@ -123,10 +123,10 @@ index 6a80479554f0c860a8dd6baa1a6506858fca83e3..6324689f52363f19501143c1649f0885 } diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index 7bfe757b605f4e5a16b28214ac3b497e738b45b5..fb953b2172c322e8abf5aa50060adbc00fe92832 100644 +index 6889991885cc2075e0936b2c480befeef30d308c..4495c5051b0c7a04d433c39d91f74cb7924d3ff2 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -466,8 +466,13 @@ public class LevelChunk extends ChunkAccess { +@@ -471,8 +471,13 @@ public class LevelChunk extends ChunkAccess { BlockState iblockdata = this.getBlockState(blockposition); if (!iblockdata.hasBlockEntity()) { @@ -142,7 +142,7 @@ index 7bfe757b605f4e5a16b28214ac3b497e738b45b5..fb953b2172c322e8abf5aa50060adbc0 } else { BlockState iblockdata1 = blockEntity.getBlockState(); -@@ -951,6 +956,7 @@ public class LevelChunk extends ChunkAccess { +@@ -956,6 +961,7 @@ public class LevelChunk extends ChunkAccess { // Paper start - Prevent block entity and entity crashes final String msg = String.format("BlockEntity threw exception at %s:%s,%s,%s", LevelChunk.this.getLevel().getWorld().getName(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ()); net.minecraft.server.MinecraftServer.LOGGER.error(msg, throwable); diff --git a/patches/server/0160-API-to-get-a-BlockState-without-a-snapshot.patch b/patches/server/0160-API-to-get-a-BlockState-without-a-snapshot.patch index c7fd071747..b2a5f27dd2 100644 --- a/patches/server/0160-API-to-get-a-BlockState-without-a-snapshot.patch +++ b/patches/server/0160-API-to-get-a-BlockState-without-a-snapshot.patch @@ -13,18 +13,18 @@ also Avoid NPE during CraftBlockEntityState load if could not get TE If Tile Entity was null, correct Sign to return empty lines instead of null diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -index d20f71a2098b327423cbdbbc096aa9e358cb809d..7147484eefad44ba67db03b6ef2090a596e278de 100644 +index d6ad310d3b472c40c128cfb459171d9f48e50915..48bee70ba4188a4a55beb6584224b0f23784dd88 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -@@ -58,6 +58,7 @@ public abstract class BlockEntity { - this.type = type; +@@ -59,6 +59,7 @@ public abstract class BlockEntity { this.worldPosition = pos.immutable(); + this.validateBlockState(state); this.blockState = state; + this.persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY); // Paper - always init } - public static BlockPos getPosFromTag(CompoundTag nbt) { -@@ -79,7 +80,7 @@ public abstract class BlockEntity { + private void validateBlockState(BlockState state) { +@@ -92,7 +93,7 @@ public abstract class BlockEntity { // CraftBukkit start - read container protected void loadAdditional(CompoundTag nbt, HolderLookup.Provider registryLookup) { @@ -33,7 +33,7 @@ index d20f71a2098b327423cbdbbc096aa9e358cb809d..7147484eefad44ba67db03b6ef2090a5 net.minecraft.nbt.Tag persistentDataTag = nbt.get("PublicBukkitValues"); if (persistentDataTag instanceof CompoundTag) { -@@ -363,8 +364,15 @@ public abstract class BlockEntity { +@@ -379,8 +380,15 @@ public abstract class BlockEntity { // CraftBukkit start - add method public InventoryHolder getOwner() { diff --git a/patches/server/0626-Fix-upstreams-block-state-factories.patch b/patches/server/0626-Fix-upstreams-block-state-factories.patch index a48a6b0d09..bfb0aa8f8a 100644 --- a/patches/server/0626-Fix-upstreams-block-state-factories.patch +++ b/patches/server/0626-Fix-upstreams-block-state-factories.patch @@ -13,10 +13,10 @@ the material type of the block at that location. public net.minecraft.world.level.block.entity.BlockEntityType validBlocks diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -index 7147484eefad44ba67db03b6ef2090a596e278de..6f6693456cf518b7bd9eb21ba681540a40c588ef 100644 +index 48bee70ba4188a4a55beb6584224b0f23784dd88..cbb777f499a4e8a447153c04d09c0c71321c663c 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -@@ -371,7 +371,7 @@ public abstract class BlockEntity { +@@ -387,7 +387,7 @@ public abstract class BlockEntity { // Paper end if (this.level == null) return null; org.bukkit.block.Block block = this.level.getWorld().getBlockAt(this.worldPosition.getX(), this.worldPosition.getY(), this.worldPosition.getZ()); diff --git a/patches/server/0707-Sanitize-sent-BlockEntity-NBT.patch b/patches/server/0707-Sanitize-sent-BlockEntity-NBT.patch index 0f97b535cc..152674ac06 100644 --- a/patches/server/0707-Sanitize-sent-BlockEntity-NBT.patch +++ b/patches/server/0707-Sanitize-sent-BlockEntity-NBT.patch @@ -30,10 +30,10 @@ index ac900dfdc5c90e9e60d47efa734be8f0a5b20dca..ec1cb034d840633240f2b379b09f7d2f } } diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -index 6f6693456cf518b7bd9eb21ba681540a40c588ef..6207c6063cd11ccb1177fe7016c49c02a3416990 100644 +index cbb777f499a4e8a447153c04d09c0c71321c663c..41f43d7d12a47563360f48a793e63db8cf92ac69 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -@@ -378,6 +378,14 @@ public abstract class BlockEntity { +@@ -394,6 +394,14 @@ public abstract class BlockEntity { } // CraftBukkit end diff --git a/patches/server/0764-Fix-EntityArgument-suggestion-permissions-to-align-w.patch b/patches/server/0764-Fix-EntityArgument-suggestion-permissions-to-align-w.patch index c42422ceca..6ec183532e 100644 --- a/patches/server/0764-Fix-EntityArgument-suggestion-permissions-to-align-w.patch +++ b/patches/server/0764-Fix-EntityArgument-suggestion-permissions-to-align-w.patch @@ -9,14 +9,14 @@ suggestions, which especially matters when we force suggestions to the server for this type diff --git a/src/main/java/net/minecraft/commands/arguments/EntityArgument.java b/src/main/java/net/minecraft/commands/arguments/EntityArgument.java -index 78eca3243a276260ff26c3587fb60e17e0439af0..2043001c16b3530c2d3f52efda10bcad424881c0 100644 +index a327939abe2cce22747366051b6b7aaa2db3a8cc..a8487c18d7ef28143a7750bf096d00bcf1e67113 100644 --- a/src/main/java/net/minecraft/commands/arguments/EntityArgument.java +++ b/src/main/java/net/minecraft/commands/arguments/EntityArgument.java -@@ -127,7 +127,12 @@ public class EntityArgument implements ArgumentType { +@@ -135,7 +135,12 @@ public class EntityArgument implements ArgumentType { StringReader stringreader = new StringReader(suggestionsbuilder.getInput()); stringreader.setCursor(suggestionsbuilder.getStart()); -- EntitySelectorParser argumentparserselector = new EntitySelectorParser(stringreader, icompletionprovider.hasPermission(2)); +- EntitySelectorParser argumentparserselector = new EntitySelectorParser(stringreader, EntitySelectorParser.allowSelectors(icompletionprovider)); + // Paper start - Fix EntityArgument suggestion permissions + final boolean permission = object instanceof CommandSourceStack stack + ? stack.bypassSelectorPermissions || stack.hasPermission(2, "minecraft.command.selector") diff --git a/patches/server/0948-Fix-creation-of-invalid-block-entity-during-world-ge.patch b/patches/server/0948-Fix-creation-of-invalid-block-entity-during-world-ge.patch index d810be487e..8e09c4fb05 100644 --- a/patches/server/0948-Fix-creation-of-invalid-block-entity-during-world-ge.patch +++ b/patches/server/0948-Fix-creation-of-invalid-block-entity-during-world-ge.patch @@ -36,10 +36,10 @@ index 682c8cfbd917c086072f1756861a340800ea40da..b26a4a38144ec1b171db911bbf949b53 nbttagcompound.putInt("x", pos.getX()); diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index c7be1f8fdca34bcc12ecbe40ee5f426e0cd068d7..7f8983a2102787b13e5d28d6981055da6acd1012 100644 +index 59f9ff720e92c69e11afe7f6ccecd81b0e54a74d..86eb9029969f4de3ada7be9e135e9764172b85f5 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -956,9 +956,14 @@ public class LevelChunk extends ChunkAccess { +@@ -961,9 +961,14 @@ public class LevelChunk extends ChunkAccess { if (this.blockEntity.getType().isValid(iblockdata)) { this.ticker.tick(LevelChunk.this.level, this.blockEntity.getBlockPos(), iblockdata, this.blockEntity); this.loggedInvalidBlockState = false; diff --git a/patches/server/0966-General-ItemMeta-fixes.patch b/patches/server/0966-General-ItemMeta-fixes.patch index 7730aa8d80..220ff9693e 100644 --- a/patches/server/0966-General-ItemMeta-fixes.patch +++ b/patches/server/0966-General-ItemMeta-fixes.patch @@ -28,10 +28,10 @@ index ebe470ca361ec5747a843b60d82f567d41d7c9fa..f9a4bebb321207abb00b1af1c17ebda6 // CraftBukkit end diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -index 6207c6063cd11ccb1177fe7016c49c02a3416990..cd3b952a228c09077c2e74183a34ddb32811280b 100644 +index 41f43d7d12a47563360f48a793e63db8cf92ac69..a1d7ae987327382d9566860b991dc361225c7938 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -@@ -139,6 +139,11 @@ public abstract class BlockEntity { +@@ -152,6 +152,11 @@ public abstract class BlockEntity { CompoundTag nbttagcompound = new CompoundTag(); this.saveAdditional(nbttagcompound, registryLookup); diff --git a/patches/server/0971-Brigadier-based-command-API.patch b/patches/server/0971-Brigadier-based-command-API.patch index ed16e97611..bc2d8d0321 100644 --- a/patches/server/0971-Brigadier-based-command-API.patch +++ b/patches/server/0971-Brigadier-based-command-API.patch @@ -2220,10 +2220,10 @@ index 7b86e064564d3a285e3971fd08ea6168bac0720e..e8dcbe7c6d6ed20ad19d2ba1893ad16d argumentbuilder.requires((icompletionprovider) -> { return true; diff --git a/src/main/java/net/minecraft/commands/arguments/MessageArgument.java b/src/main/java/net/minecraft/commands/arguments/MessageArgument.java -index 982b2bab27e3d55d0ba07060862c0c3183ad91b0..5fa8a3343ffc11e82c20b78a73205fd8a42d3c5d 100644 +index 55484826fc5ddd04ae024e25a0251796d7fa9c28..237e4f7b24908e9ade9a483eb7ae05fa3b7931d8 100644 --- a/src/main/java/net/minecraft/commands/arguments/MessageArgument.java +++ b/src/main/java/net/minecraft/commands/arguments/MessageArgument.java -@@ -39,6 +39,11 @@ public class MessageArgument implements SignedArgument +@@ -40,6 +40,11 @@ public class MessageArgument implements SignedArgument public static void resolveChatMessage(CommandContext context, String name, Consumer callback) throws CommandSyntaxException { MessageArgument.Message message = context.getArgument(name, MessageArgument.Message.class); @@ -2400,7 +2400,7 @@ index 134f31cce8d8eca669948a784e2766216fb91ab5..60c65af218d533d53b765ba2175fed16 // CraftBukkit end diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index b72a71d6a37956b0f4ca74c2ed8eaf044cac4b81..6321ae23f07bc3e07577914e6cf035e0c2cd4992 100644 +index 36997d8d15c23587317b4c115726892980a9086e..43a94a67b337f40522c25cc2252a6a5e1294ca0b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -272,11 +272,11 @@ public final class CraftServer implements Server { diff --git a/patches/server/0975-Prevent-sending-oversized-item-data-in-equipment-and.patch b/patches/server/0975-Prevent-sending-oversized-item-data-in-equipment-and.patch index 077dab00a8..6a21b1b7db 100644 --- a/patches/server/0975-Prevent-sending-oversized-item-data-in-equipment-and.patch +++ b/patches/server/0975-Prevent-sending-oversized-item-data-in-equipment-and.patch @@ -154,21 +154,21 @@ index 59c1c103545f04fd35e6932df64a9910a1d74cd7..56bde49e6b7790155b032d0be40961d5 buf.writeByte(255); } diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetEquipmentPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetEquipmentPacket.java -index e092a486c4041ab1cfe9e29c88d0d94528a6e9a6..3945ca04ede578121b370592482ac917f2d4cf96 100644 +index 2ea7e90d582866b4e29db80836e250163d811763..d152871142d3def2ac04f50037db53b0527f7894 100644 --- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetEquipmentPacket.java +++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetEquipmentPacket.java @@ -19,6 +19,13 @@ public class ClientboundSetEquipmentPacket implements Packet> slots; - public ClientboundSetEquipmentPacket(int id, List> equipmentList) { + public ClientboundSetEquipmentPacket(int entityId, List> equipmentList) { + // Paper start - data sanitization -+ this(id, equipmentList, false); ++ this(entityId, equipmentList, false); + } -+ private boolean sanitize = false; -+ public ClientboundSetEquipmentPacket(int id, List> equipmentList, boolean sanitize) { ++ private boolean sanitize; ++ public ClientboundSetEquipmentPacket(int entityId, List> equipmentList, boolean sanitize) { + this.sanitize = sanitize; + // Paper end - data sanitization - this.entity = id; + this.entity = entityId; this.slots = equipmentList; } @@ -41,6 +48,7 @@ public class ClientboundSetEquipmentPacket implements Packet { +@@ -139,7 +139,7 @@ public class EntityArgument implements ArgumentType { final boolean permission = object instanceof CommandSourceStack stack ? stack.bypassSelectorPermissions || stack.hasPermission(2, "minecraft.command.selector") : icompletionprovider.hasPermission(2); @@ -72,7 +72,7 @@ index 2043001c16b3530c2d3f52efda10bcad424881c0..7976885b902a6ce7d80f31e49448c994 // Paper end - Fix EntityArgument suggestion permissions try { -@@ -141,7 +141,19 @@ public class EntityArgument implements ArgumentType { +@@ -149,7 +149,19 @@ public class EntityArgument implements ArgumentType { } return argumentparserselector.fillSuggestions(suggestionsbuilder, (suggestionsbuilder1) -> { @@ -94,19 +94,15 @@ index 2043001c16b3530c2d3f52efda10bcad424881c0..7976885b902a6ce7d80f31e49448c994 SharedSuggestionProvider.suggest((Iterable) iterable, suggestionsbuilder1); 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 6b6756625f3fb1f36f940c6e31e97b84f32a9990..32b39803380456f40bafdb790eaa27efab5f06a6 100644 +index dd50a530439576f56f245ff0b7eb090f9f0c9180..1f05594d5f00b6d57ec189273edbd25f2d679d61 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 { +@@ -116,8 +116,15 @@ public class EntitySelectorParser { private boolean hasScores; private boolean hasAdvancements; private boolean usesSelectors; + public boolean parsingEntityArgumentSuggestions; // Paper - tell clients to ask server for suggestions for EntityArguments - public EntitySelectorParser(StringReader reader) { - this(reader, true); - } - public EntitySelectorParser(StringReader reader, boolean atAllowed) { + // Paper start - tell clients to ask server for suggestions for EntityArguments + this(reader, atAllowed, false); diff --git a/patches/server/1022-Improved-Watchdog-Support.patch b/patches/server/1022-Improved-Watchdog-Support.patch index be44d14993..3c17cbaba2 100644 --- a/patches/server/1022-Improved-Watchdog-Support.patch +++ b/patches/server/1022-Improved-Watchdog-Support.patch @@ -341,10 +341,10 @@ index 5c4eaa6bcf20b0fcec14bd5ef76ea6f29a8613a2..e2a0487089eb5a7bdc1433e4c75f69d8 final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level().getWorld().getName(), entity.getX(), entity.getY(), entity.getZ()); MinecraftServer.LOGGER.error(msg, throwable); diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index 8c865cd4e50ad55679a8bd89835caa40cc101f35..5453b7051337908ac1c8201827c1b5eec9e1608b 100644 +index b1a6dc25b04ab6a43e8d62378e14d88d1c60bbbe..7c11853c5090fbc4fa5b3e73a69acf166158fdec 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -1039,6 +1039,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -1044,6 +1044,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p gameprofilerfiller.pop(); } catch (Throwable throwable) { diff --git a/work/BuildData b/work/BuildData index ae1e7b1e31..533b02cd6b 160000 --- a/work/BuildData +++ b/work/BuildData @@ -1 +1 @@ -Subproject commit ae1e7b1e31cd3a3892bb05a6ccdcecc48c73c455 +Subproject commit 533b02cd6ba8dbf8c8607250b02bf2d8c36421e8 diff --git a/work/Bukkit b/work/Bukkit index 2ec53f498e..facd52d216 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 2ec53f498e32b3af989cb24672fc54dfab087154 +Subproject commit facd52d216243e2b7f90a9f4d5cc54a8f4bbcbf7 diff --git a/work/CraftBukkit b/work/CraftBukkit index 8ee6fd1b8d..b95736b13f 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 8ee6fd1b8db9896590aa321d0199453de1fc35db +Subproject commit b95736b13f776ba47322313f482c0520630c3533 diff --git a/work/Spigot b/work/Spigot index fb8fb722a3..5a6439b9ec 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit fb8fb722a327a2f9f097f2ded700ac5de8157408 +Subproject commit 5a6439b9eca2e28522873a0488e142cfc089c0fe