From c610db4fea1a066a5ce47fa8a887e7479649539c Mon Sep 17 00:00:00 2001 From: Pedro Date: Tue, 23 Jan 2024 16:24:53 -0300 Subject: [PATCH] Entity selector now accepts NBT as well --- .../exceptions/CommanderExceptions.class | Bin 3974 -> 5467 bytes .../content/helpers/ArgumentParser.class | Bin 5562 -> 5080 bytes .../EntitySelectorOptions$Option.class | Bin 1430 -> 1430 bytes .../helpers/EntitySelectorOptions.class | Bin 21242 -> 22842 bytes .../content/helpers/ArgumentParser.java | 15 ------------ .../helpers/EntitySelectorOptions.java | 23 ++++++++++++++++++ .../content/helpers/EntitySelectorParser.java | 18 ++++++++++++++ src/main/resources/lang/commander/en_US.lang | 1 + 8 files changed, 42 insertions(+), 15 deletions(-) diff --git a/output/production/commander-bta.main/net/pedroricardo/commander/content/exceptions/CommanderExceptions.class b/output/production/commander-bta.main/net/pedroricardo/commander/content/exceptions/CommanderExceptions.class index ce0c9bc6521a29b7f0e04be0467141433665676f..174d336c267bcffa4831774260e2bf892adb0512 100644 GIT binary patch literal 5467 zcmbtXiGLHv75>&3WQ(yaWFSBYU;>E^#R`ycL=IGu1yPYL7Yh?7ZPc~2HVdm=MOqQu z`$&2>z0&(W()&n43Mn+{m0oFj-}isgU%%O1%kp|KCDHGvo%!DTX6DVzoA+j(`|qV^ z0NjfIMA3$25wr^|#|jOx)B0IGVd?fvB0qK7D7hL|44Jm+9@4O^e_)~$9q5c8DzFkl zL&`SXMAazQoSIqEYh@=xuN7GSif4=*^C%^CM%q zOd(TD9Y10XY{hkPFp$~H!D@k2)b-`SeUIENoi%bK#w$0 zjOGi)>}c_1{&;R!Dpm=^rJ_4CGFF%@j%RY2bRmCSs#XiEk*ZjBbRw0@4lht%C$LT` zM$Vr6x1So9Y_`Hc9o$kbH|kpOmi)dJWW`wavyi z3T%_4wIe5Tg{+ctlfccA5}U~9xP-+*K3~jnIWy9>0f8M-*_*k0jFZg_)A-?H{z$Qq zIx6)q5!mG!5!R1n3aQ~#Atgx(fm^VfMl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zbk*z ziP>v(is&k7zfnZUTqrw*oC;-J$cIDOE97)2`-IGga)XeCQ1%OXCX@q0&V+KSkY_`= zohK5J40a)d5gu6G*#2f*;XTk3$Y`gLR?bl;zQ2nuq4zSy@ku_|7Fwhw)bk)O!uCA9 ufPc|?xz>8E)_SAXdb`$ouh#mo*7~H@x>9R>iPkq*D~8>EOW)IvwBdi?WVlHH diff --git a/output/production/commander-bta.main/net/pedroricardo/commander/content/helpers/ArgumentParser.class b/output/production/commander-bta.main/net/pedroricardo/commander/content/helpers/ArgumentParser.class index 6648a5746662b87937ed1b916c6e9bc8320f5518..851064b04533990cabf57c834ab8f65a2625579c 100644 GIT binary patch delta 206 zcmdm`eM6n=)W2Q(7#J8#7&dI=D&Z9sDK1S*%{VM_T$%LS;xpAH#v}BZt^UC6GryU=lR>1nVA@-Pc9IVo6IC4GkKD* yzbP}r44{*k7-lle0@7kY)@%l5hD8jE8J0m=%Ym#_Kshc3Muyc4YZ=xvNCE(Fh&Cet delta 309 zcmXxfyGz4R6bA6`HiniF00n1Hd$rE{)8RBes2?i^y&8V1-9)i$zTC znB_66f2h>zf_uy-_^+yEjW<}xqIxK$IX8GlagK{TE)87aI{7gRWa^HhfO`W?#6`rG zj;9o!4ICgQFcyP=hm{%=f{Q#}Wzm`-UAbUY2~GB`Skne@DEI79vMD?Eu=E^P%b}Ty zoOMQY7bUF9FMF9BWv$(`rF%-NnI304pXs{N4W&yn8d~b}9NIWhb4aCAXt=>G9{TA~ PrH;B$5WL_G?H&USqKLE{R+S2y}P_~&prD& z_q}}gvz{l3XqxLGA4zg~$gL=cas?Hh9@rEpZwrLimoI5PJ=hW#lsh{V4#npRa*Zop zkw;$2^N>$bJ}E)-!ohfXN3b;-iH2GN(bhyj9osd|!M(Lfp`$g^Z=Q|*$5MnV0}#LjrAt-L9N z_>VFB@KF&R!6Ymebp5!xFATLl(i&Qa-B&u0Ue_6JVVadMjRspm?Rcl*i0o3{+KpmY0RF((xK(w)nj;3QE1ucQ_@>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_(y0x`PaO~A@)KcN*6))o;Qve+W>*8vc*LP{cnLlqlD zkhrEJGR77WobT8o^7jD{u|i5Bg0mhQME;S9NP#UPI9jqrNk@p8c#0tqo1V>~)WEtbSJN`HTC2{K!TGG-lP=+`tKD>|S>ZXJo>gH;r ziPTg#A2gb9klYjnMiZHjZnho~zB)UpvoLrVGf8J`{ha=K+>icUmbtqjDA_m19j#=ef){Kez}$h z&NK%a<4-jA%k@04!5r8aAK26{&*p)1%z<;`1LyTiKM%B;18v3t8$iQE^&t-?8ja+k z0Otr}&>D-#xe$@zINF4sAPR6%6hkjY8geDBU!ZwN70YNpu3yJ#LocGnBe*_H6{y-S zMS-OPmD$tjbwrZy;QCkm4>BLnO5wsMf!RpnMpBEIfa_%1Buc3jDcUAcL2Y6+J{>y~ z*Jk{eMSi+oY{#{eZVIrn8TU4b0_Y+iMt`@-HVRgI21>oapxH6808pgVCop-7{_<$8=vT#l<1q9=$oGC zD^B#4B>GNG^vz53l_mNXCHfX8`c6;uEl>1SC;C<=`qm`+>JxouCi&IU!{@Pt0B)4N70avz&IJP*pQMM!K*x~4;g8u^s7euH4 diff --git a/src/main/java/net/pedroricardo/commander/content/helpers/ArgumentParser.java b/src/main/java/net/pedroricardo/commander/content/helpers/ArgumentParser.java index a2261a6..5bd9689 100644 --- a/src/main/java/net/pedroricardo/commander/content/helpers/ArgumentParser.java +++ b/src/main/java/net/pedroricardo/commander/content/helpers/ArgumentParser.java @@ -70,23 +70,8 @@ protected CompletableFuture suggestOpenTag(SuggestionsBuilder sugge return suggestionsBuilder.buildFuture(); } - protected CompletableFuture suggestOpenMetadata(SuggestionsBuilder suggestionsBuilder, Consumer consumer) { - if (!this.reader.canRead()) suggestionsBuilder.suggest(String.valueOf('[')); - return suggestionsBuilder.buildFuture(); - } - private CompletableFuture suggestCloseMetadata(SuggestionsBuilder suggestionsBuilder, Consumer consumer) { if (!this.reader.canRead()) suggestionsBuilder.suggest(String.valueOf(']')); return suggestionsBuilder.buildFuture(); } - - private CompletableFuture suggestCloseTag(SuggestionsBuilder suggestionsBuilder, Consumer consumer) { - if (!this.reader.canRead()) suggestionsBuilder.suggest(String.valueOf('}')); - return suggestionsBuilder.buildFuture(); - } - - private CompletableFuture suggestTagSeparator(SuggestionsBuilder suggestionsBuilder, Consumer consumer) { - if (!this.reader.canRead()) suggestionsBuilder.suggest(String.valueOf(':')); - return suggestionsBuilder.buildFuture(); - } } diff --git a/src/main/java/net/pedroricardo/commander/content/helpers/EntitySelectorOptions.java b/src/main/java/net/pedroricardo/commander/content/helpers/EntitySelectorOptions.java index 22b0270..e501034 100644 --- a/src/main/java/net/pedroricardo/commander/content/helpers/EntitySelectorOptions.java +++ b/src/main/java/net/pedroricardo/commander/content/helpers/EntitySelectorOptions.java @@ -5,6 +5,8 @@ import com.mojang.brigadier.exceptions.DynamicCommandExceptionType; import com.mojang.brigadier.exceptions.SimpleCommandExceptionType; import com.mojang.brigadier.suggestion.SuggestionsBuilder; +import com.mojang.nbt.CompoundTag; +import com.mojang.nbt.Tag; import net.minecraft.client.lang.text.ChainText; import net.minecraft.client.lang.text.Text; import net.minecraft.core.entity.Entity; @@ -16,6 +18,7 @@ import net.minecraft.core.player.gamemode.Gamemode; import net.minecraft.core.util.helper.LogPrintStream; import net.pedroricardo.commander.CommanderHelper; +import net.pedroricardo.commander.NbtHelper; import java.util.*; import java.util.function.BiConsumer; @@ -224,6 +227,26 @@ public static void register(String key, Modifier modifier, Predicate !parser.hasGamemodeEquals(), ChainText.text().trans("argument_types.commander.entity.selector.options.gamemode.description")); + register("nbt", (parser) -> { + boolean invert = parser.shouldInvertValue(); + CompoundTag nbt = NbtHelper.parseNbt(parser.getReader()); + parser.addPredicate((entity) -> { + if (nbt.getValue().isEmpty()) return !invert; + CompoundTag entityNbt = new CompoundTag(); + entity.addAdditionalSaveData(entityNbt); + for (Map.Entry> entry : nbt.getValue().entrySet()) { + if (!entityNbt.getValue().containsKey(entry.getKey()) || (entityNbt.getValue().get(entry.getKey()) != entry.getValue() && !entityNbt.getValue().get(entry.getKey()).equals(entry.getValue()) && !entityNbt.getValue().get(entry.getKey()).getValue().equals(entry.getValue().getValue()))) { + if (!invert) return false; + } + } + return true; + }); + if (invert) { + parser.setHasNotNbt(true); + } else { + parser.setHasNbt(true); + } + }, parser -> !parser.hasNbt(), ChainText.text().trans("argument_types.commander.entity.selector.options.nbt.description")); } public static Modifier get(EntitySelectorParser entitySelectorParser, String string, int i) throws CommandSyntaxException { diff --git a/src/main/java/net/pedroricardo/commander/content/helpers/EntitySelectorParser.java b/src/main/java/net/pedroricardo/commander/content/helpers/EntitySelectorParser.java index a21ac4b..c60a120 100644 --- a/src/main/java/net/pedroricardo/commander/content/helpers/EntitySelectorParser.java +++ b/src/main/java/net/pedroricardo/commander/content/helpers/EntitySelectorParser.java @@ -298,6 +298,8 @@ public BiFunction, CompletableF private boolean hasType = false; private boolean hasNameEquals = false; private boolean hasNameNotEquals = false; + private boolean hasNbt = false; + private boolean hasNotNbt = false; public boolean hasGamemodeEquals() { return this.hasGamemodeEquals; @@ -387,6 +389,22 @@ public void setCurrentEntity(boolean currentEntity) { this.currentEntity = currentEntity; } + public boolean hasNbt() { + return this.hasNbt; + } + + public void setHasNbt(boolean bl) { + this.hasNbt = bl; + } + + public boolean hasNotNbt() { + return this.hasNotNbt; + } + + public void setHasNotNbt(boolean bl) { + this.hasNotNbt = bl; + } + public void setX(double x) { this.x = x; } diff --git a/src/main/resources/lang/commander/en_US.lang b/src/main/resources/lang/commander/en_US.lang index bc4b816..befdc10 100644 --- a/src/main/resources/lang/commander/en_US.lang +++ b/src/main/resources/lang/commander/en_US.lang @@ -23,6 +23,7 @@ argument_types.commander.entity.selector.options.unterminated=Expected end of op argument_types.commander.entity.selector.options.valueless=Expected value for option '%s' argument_types.commander.entity.selector.options.gamemode.invalid=Invalid or unknown game mode '%s' argument_types.commander.entity.selector.options.gamemode.description=Players with game mode +argument_types.commander.entity.selector.options.nbt.description=Entities with NBT argument_types.commander.entity.selector.options.sort.description=Sort the entities argument_types.commander.entity.selector.options.sort.invalid=Invalid or unknown sort type '%s' argument_types.commander.entity.selector.options.limit.description=Maximum number of entities to return