Skip to content

Commit

Permalink
- New /execute syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Xterionix committed Oct 20, 2023
1 parent dac9bdf commit 3811972
Show file tree
Hide file tree
Showing 3 changed files with 177 additions and 11 deletions.
154 changes: 153 additions & 1 deletion packages/auto_completions/function/general.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,5 +182,157 @@
"recipe_options": [
"give",
"take"
]
],
"axes": [
"x",
"y",
"z",
"xy",
"xz",
"yz",
"xyz"
],
"anchors": [
"eyes",
"feet"
],
"scan_mode": [
"masked",
"all"
],
"score_compare_operators": [
"<",
"<=",
"=",
">",
">="
],
"execute_subcommands": {
"align": {
"$function.general.axes": {
"$load": "$function.general.execute_subcommands"
}
},
"anchored": {
"$function.general.anchors": {
"$load": "$function.general.execute_subcommands"
}
},
"as": {
"$function.general.target_selector": {
"$load": "$function.general.execute_subcommands"
}
},
"at": {
"$function.general.target_selector": {
"$load": "$function.general.execute_subcommands"
}
},
"facing": {
"$function.general.location": {
"$function.general.location": {
"$function.general.location": {
"$load": "$function.general.execute_subcommands"
}
}
},
"entity": {
"$function.general.target_selector": {
"$function.general.anchors": {
"$load": "$function.general.execute_subcommands"
}
}
}
},
"if": {
"block": {
"$function.general.location": {
"$function.general.location": {
"$function.general.location": {
"$function.general.block_identifier": {
"$load": "$function.general.execute_subcommands"
}
}
}
}
},
"blocks": {
"$function.general.location": {
"$function.general.location": {
"$function.general.location": {
"$function.general.location": {
"$function.general.location": {
"$function.general.location": {
"$function.general.location": {
"$function.general.location": {
"$function.general.location": {
"$function.general.scan_mode": {
"$load": "$function.general.execute_subcommands"
}
}
}
}
}
}
}
}
}
}
},
"entity": {
"$function.general.target_selector": {
"$load": "$function.general.execute_subcommands"
}
},
"score": {
"$function.general.target_selector": {
"$general.translatable_text": {
"$function.general.score_compare_operators": {
"$function.general.target_selector": {
"$general.translatable_text": {
"$load": "$function.general.execute_subcommands"
}
}
},
"matches": {
"$general.number": {
"$load": "$function.general.execute_subcommands"
}
}
}
}
}
},
"in": {
"$general.dimensions": {
"$load": "$function.general.execute_subcommands"
}
},
"positioned": {
"$function.general.location": {
"$function.general.location": {
"$function.general.location": {
"$load": "$function.general.execute_subcommands"
}
}
},
"as": {
"$load": "$function.general.execute_subcommands.as"
}
},
"rotated": {
"$general.number": {
"$general.number": {
"$load": "$function.general.execute_subcommands"
}
},
"as": {
"$load": "$function.general.execute_subcommands.as"
}
},
"run": "$function.main",
"unless": {
"$load": "$function.general.execute_subcommands.if"
}
}
}
29 changes: 19 additions & 10 deletions packages/auto_completions/function/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,18 +162,23 @@
"$general.enchantment_name": "$general.number"
}
},
"execute": {
"$function.general.target_selector": {
"$function.general.location": {
"$function.general.location": {
"$versioned_template.execute": [
{
"$if": "$project_target_version < 1.19.50",
"$data": {
"$function.general.target_selector": {
"$function.general.location": {
"$load": "$function.main",
"detect": {
"$function.general.location": {
"$function.general.location": {
"$function.general.location": {
"$load": "$function.main",
"detect": {
"$function.general.location": {
"$function.general.block_identifier": {
"$general.number": "$function.main"
"$function.general.location": {
"$function.general.location": {
"$function.general.block_identifier": {
"$general.number": "$function.main"
}
}
}
}
}
Expand All @@ -182,8 +187,12 @@
}
}
}
},
{
"$if": "$project_target_version >= 1.19.50",
"$data": "$function.general.execute_subcommands"
}
},
],
"fill": {
"$function.general.location": {
"$function.general.location": {
Expand Down
5 changes: 5 additions & 0 deletions packages/auto_completions/general.json
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,11 @@
"peaceful",
"p"
],
"dimensions": [
"nether",
"overworld",
"the_end"
],
"gamemode": [
"adventure",
"creative",
Expand Down

0 comments on commit 3811972

Please sign in to comment.