From 34608238290068f3493b5e025f999837fc8ebb9d Mon Sep 17 00:00:00 2001 From: Telesphoreo Date: Sun, 12 Jun 2022 01:01:55 -0500 Subject: [PATCH] Add missing patch --- build-data/dev-imports.txt | 3 ++- ...ery-player-data-in-the-nbt-component.patch | 27 +++++++++++++++++++ ...019-Limit-ListTags-to-1024-elements.patch} | 0 ...lling-potion-effects-and-certain-po.patch} | 0 ...ch => 0021-Fix-negative-death-times.patch} | 0 ...Add-custom-classes-used-by-Scissors.patch} | 0 ...tes-before-attempting-to-get-block-.patch} | 0 ...tags.patch => 0024-Reset-large-tags.patch} | 0 ...Account-for-items-inside-containers.patch} | 0 ...ehicle-collision-checks-to-3-and-di.patch} | 0 ...-Don-t-log-invalid-teams-to-console.patch} | 0 ...handling-of-invalid-JSON-components.patch} | 0 ...-oversized-components-from-updating.patch} | 0 13 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 patches/server/0018-Don-t-query-player-data-in-the-nbt-component.patch rename patches/server/{0018-Limit-ListTags-to-1024-elements.patch => 0019-Limit-ListTags-to-1024-elements.patch} (100%) rename patches/server/{0019-Fixes-creative-killing-potion-effects-and-certain-po.patch => 0020-Fixes-creative-killing-potion-effects-and-certain-po.patch} (100%) rename patches/server/{0020-Fix-negative-death-times.patch => 0021-Fix-negative-death-times.patch} (100%) rename patches/server/{0021-Add-custom-classes-used-by-Scissors.patch => 0022-Add-custom-classes-used-by-Scissors.patch} (100%) rename patches/server/{0022-Validate-coordinates-before-attempting-to-get-block-.patch => 0023-Validate-coordinates-before-attempting-to-get-block-.patch} (100%) rename patches/server/{0023-Reset-large-tags.patch => 0024-Reset-large-tags.patch} (100%) rename patches/server/{0024-Account-for-items-inside-containers.patch => 0025-Account-for-items-inside-containers.patch} (100%) rename patches/server/{0025-Limit-amount-of-vehicle-collision-checks-to-3-and-di.patch => 0026-Limit-amount-of-vehicle-collision-checks-to-3-and-di.patch} (100%) rename patches/server/{0026-Don-t-log-invalid-teams-to-console.patch => 0027-Don-t-log-invalid-teams-to-console.patch} (100%) rename patches/server/{0027-Better-handling-of-invalid-JSON-components.patch => 0028-Better-handling-of-invalid-JSON-components.patch} (100%) rename patches/server/{0028-Reject-oversized-components-from-updating.patch => 0029-Reject-oversized-components-from-updating.patch} (100%) 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