-
Notifications
You must be signed in to change notification settings - Fork 34
selectorSortKeys
SPGoding edited this page Apr 26, 2020
·
1 revision
🔧 Fixable: violations of this rule can be fixed by Code Actions.
Enforce the values in an entity selector to be sorted by the keys.
- (string[]): sorted by the specific order. Values ending with
Neg
will be used to sort the negative version of that type. e.g.type
representstype=xxx
, whiletypeNeg
representstype=!xxx
. Please make sure that all the possible keys are mentioned in the setting, or they might lose after you perform code actions!
{
"selectorSortKeys": null
}
kill @e[type=minecraft:zombie, tag=foo]
kill @e[tag=foo, type=minecraft:zombie]
This is partially based on the research by vdvman1 at https://minecraftcommands.github.io/commanders-handbook/selector-argument-order.
{
"selectorSortKeys": [
"warning",
[
"sort", "limit",
"type", "gamemode", "gamemodeNeg", "level", "team", "teamNeg",
"typeNeg", "tag", "tagNeg", "name", "nameNeg", "predicate", "predicateNeg",
"scores", "advancements", "nbt", "nbtNeg",
"x", "y", "z", "dx", "dy", "dz", "distance", "x_rotation", "y_rotation"
]
]
}
kill @e[type=minecraft:zombie, tag=foo]
kill @e[tag=foo, type=minecraft:zombie]
This rule was introduced in DHP 2.0.0.