mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2024-11-26 22:55:39 +00:00
Add missing patch
This commit is contained in:
parent
49d65f1c1c
commit
3460823829
@ -13,3 +13,4 @@
|
||||
#minecraft net/minecraft/world/ContainerHelper
|
||||
#minecraft net/minecraft/network/chat/contents/NbtContents
|
||||
#minecraft net/minecraft/network/chat/ComponentUtils
|
||||
#minecraft net/minecraft/network/chat/contents/EntityDataSource
|
@ -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();
|
||||
}
|
Loading…
Reference in New Issue
Block a user