Add missing patch

This commit is contained in:
Telesphoreo 2022-06-12 01:01:55 -05:00
parent 49d65f1c1c
commit 3460823829
13 changed files with 29 additions and 1 deletions

View File

@ -12,4 +12,5 @@
## Used in Scissors 1.19 ## Used in Scissors 1.19
#minecraft net/minecraft/world/ContainerHelper #minecraft net/minecraft/world/ContainerHelper
#minecraft net/minecraft/network/chat/contents/NbtContents #minecraft net/minecraft/network/chat/contents/NbtContents
#minecraft net/minecraft/network/chat/ComponentUtils #minecraft net/minecraft/network/chat/ComponentUtils
#minecraft net/minecraft/network/chat/contents/EntityDataSource

View File

@ -0,0 +1,27 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Video <videogamesm12@gmail.com>
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<CompoundTag> getData(CommandSourceStack source) throws CommandSyntaxException {
if (this.compiledSelector != null) {
List<? extends Entity> 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();
}