diff --git a/build-data/dev-imports.txt b/build-data/dev-imports.txt index e30e73f..5f9e22a 100644 --- a/build-data/dev-imports.txt +++ b/build-data/dev-imports.txt @@ -12,4 +12,5 @@ ## Used in Scissors 1.19 #minecraft net/minecraft/world/ContainerHelper #minecraft net/minecraft/network/chat/contents/NbtContents -#minecraft net/minecraft/network/chat/ComponentUtils \ No newline at end of file +#minecraft net/minecraft/network/chat/ComponentUtils +#minecraft net/minecraft/network/chat/contents/EntityDataSource \ No newline at end of file diff --git a/patches/server/0018-Don-t-query-player-data-in-the-nbt-component.patch b/patches/server/0018-Don-t-query-player-data-in-the-nbt-component.patch new file mode 100644 index 0000000..b96ac8b --- /dev/null +++ b/patches/server/0018-Don-t-query-player-data-in-the-nbt-component.patch @@ -0,0 +1,27 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Video +Date: Sat, 9 Apr 2022 13:00:27 -0600 +Subject: [PATCH] Don't query player data in the `nbt` component + + +diff --git a/src/main/java/net/minecraft/network/chat/contents/EntityDataSource.java b/src/main/java/net/minecraft/network/chat/contents/EntityDataSource.java +index 8a6799b50062c1b7b141ee1568dc523f9ee7ecfd..e5a2bb129100f0f935c8f10682204e7cb6277142 100644 +--- a/src/main/java/net/minecraft/network/chat/contents/EntityDataSource.java ++++ b/src/main/java/net/minecraft/network/chat/contents/EntityDataSource.java +@@ -11,6 +11,7 @@ import net.minecraft.commands.arguments.selector.EntitySelector; + import net.minecraft.commands.arguments.selector.EntitySelectorParser; + import net.minecraft.nbt.CompoundTag; + import net.minecraft.world.entity.Entity; ++import net.minecraft.world.entity.player.Player; + + public record EntityDataSource(String selectorPattern, @Nullable EntitySelector compiledSelector) implements DataSource { + public EntityDataSource(String rawPath) { +@@ -31,7 +32,7 @@ public record EntityDataSource(String selectorPattern, @Nullable EntitySelector + public Stream getData(CommandSourceStack source) throws CommandSyntaxException { + if (this.compiledSelector != null) { + List list = this.compiledSelector.findEntities(source); +- return list.stream().map(NbtPredicate::getEntityTagToCompare); ++ return list.stream().filter((entity) -> !(entity instanceof Player)).map(NbtPredicate::getEntityTagToCompare); // Scissors - Don't query NBT from players + } else { + return Stream.empty(); + } diff --git a/patches/server/0018-Limit-ListTags-to-1024-elements.patch b/patches/server/0019-Limit-ListTags-to-1024-elements.patch similarity index 100% rename from patches/server/0018-Limit-ListTags-to-1024-elements.patch rename to patches/server/0019-Limit-ListTags-to-1024-elements.patch diff --git a/patches/server/0019-Fixes-creative-killing-potion-effects-and-certain-po.patch b/patches/server/0020-Fixes-creative-killing-potion-effects-and-certain-po.patch similarity index 100% rename from patches/server/0019-Fixes-creative-killing-potion-effects-and-certain-po.patch rename to patches/server/0020-Fixes-creative-killing-potion-effects-and-certain-po.patch diff --git a/patches/server/0020-Fix-negative-death-times.patch b/patches/server/0021-Fix-negative-death-times.patch similarity index 100% rename from patches/server/0020-Fix-negative-death-times.patch rename to patches/server/0021-Fix-negative-death-times.patch diff --git a/patches/server/0021-Add-custom-classes-used-by-Scissors.patch b/patches/server/0022-Add-custom-classes-used-by-Scissors.patch similarity index 100% rename from patches/server/0021-Add-custom-classes-used-by-Scissors.patch rename to patches/server/0022-Add-custom-classes-used-by-Scissors.patch diff --git a/patches/server/0022-Validate-coordinates-before-attempting-to-get-block-.patch b/patches/server/0023-Validate-coordinates-before-attempting-to-get-block-.patch similarity index 100% rename from patches/server/0022-Validate-coordinates-before-attempting-to-get-block-.patch rename to patches/server/0023-Validate-coordinates-before-attempting-to-get-block-.patch diff --git a/patches/server/0023-Reset-large-tags.patch b/patches/server/0024-Reset-large-tags.patch similarity index 100% rename from patches/server/0023-Reset-large-tags.patch rename to patches/server/0024-Reset-large-tags.patch diff --git a/patches/server/0024-Account-for-items-inside-containers.patch b/patches/server/0025-Account-for-items-inside-containers.patch similarity index 100% rename from patches/server/0024-Account-for-items-inside-containers.patch rename to patches/server/0025-Account-for-items-inside-containers.patch diff --git a/patches/server/0025-Limit-amount-of-vehicle-collision-checks-to-3-and-di.patch b/patches/server/0026-Limit-amount-of-vehicle-collision-checks-to-3-and-di.patch similarity index 100% rename from patches/server/0025-Limit-amount-of-vehicle-collision-checks-to-3-and-di.patch rename to patches/server/0026-Limit-amount-of-vehicle-collision-checks-to-3-and-di.patch diff --git a/patches/server/0026-Don-t-log-invalid-teams-to-console.patch b/patches/server/0027-Don-t-log-invalid-teams-to-console.patch similarity index 100% rename from patches/server/0026-Don-t-log-invalid-teams-to-console.patch rename to patches/server/0027-Don-t-log-invalid-teams-to-console.patch diff --git a/patches/server/0027-Better-handling-of-invalid-JSON-components.patch b/patches/server/0028-Better-handling-of-invalid-JSON-components.patch similarity index 100% rename from patches/server/0027-Better-handling-of-invalid-JSON-components.patch rename to patches/server/0028-Better-handling-of-invalid-JSON-components.patch diff --git a/patches/server/0028-Reject-oversized-components-from-updating.patch b/patches/server/0029-Reject-oversized-components-from-updating.patch similarity index 100% rename from patches/server/0028-Reject-oversized-components-from-updating.patch rename to patches/server/0029-Reject-oversized-components-from-updating.patch