Package: mccq
Minecraft Command QueryMinecraft command query program. Inspired by the in-game help command, with added features like multiple version support and expandable regex search.InstallationRequires Python 3.6+, recommended withvirtualenvor the like. Just install withpip:pip install mccqDatabase setupMCCQ requires access to generated server files (namelycommands.json), and so is compatible withMinecraft snapshot 18w01aand up.Each version directory must remain as generated by the server, and all version directories should be in the same root database directory:database_root/
  18w01a/
    generated/
      reports/
        commands.json
  18w02a/
    generated/
      reports/
        commands.jsonThese files can be loaded either from the local filesystem orthe internet.Basic usageEnter the CLI (command line interface) by providing it a default version-sto query and a database location-dwhere version directories are located:python-mmccq-s18w01a-d"https://raw.githubusercontent.com/Arcensoth/mcdata"Start with a basic command:>sayThis produces some output:# 18w01asay<message>Which will generally outline all possible variations of the command for the specified version(s).Try something a little more involved:>effect# 18w01aeffectclear|give...The command is rolled out until a choice can be made, which saves on vertical space and is often more readable than assigning a separate line to each possibility.Program optionsVarious flags and options can be writtenbefore the command queryto augment behaviour.Normally several subcommands/arguments are condensed to one line, but-ecan be used to forcibly expand the command:>-eeffect# 18w01aeffectclear<targets>
effectclear<targets><effect>
effectgive<targets><effect>
effectgive<targets><effect><seconds>
effectgive<targets><effect><seconds><amplifier>
effectgive<targets><effect><seconds><amplifier><hideParticles>Be warned that this can cause a large amount of output for commands with many subcommands/arguments.Search for specific subcommands/arguments:>tagtargetsadd# 18w01atag<targets>add<name>Notice how arguments are shown between<>but can be searched by name just like subcommands.Speaking of arguments, use-tto render their types:>-ttagtargetsadd# 18w01atag<targets:entity>add<name:string>Use-v VERSIONto query a particular version:>-v18w02aexecute# 18w02aexecutealign|anchored|as|at|facing|if|in|positioned|rotated|run|store|unless...Repeat-v VERSIONto query several versions at once:>-v18w01a-v18w02aexecute# 18w01aexecutealign|as|at|if|offset|run|store|unless...# 18w02aexecutealign|anchored|as|at|facing|if|in|positioned|rotated|run|store|unless...For more precise control than-ecan offer, provide-c CAPACITYto define a threshold for expansion:>-c5timeset# 18w01atimesetdaytimesetmidnighttimesetnighttimesetnoontimeset<time>
>-c4timeset# 18w01atimesetday|midnight|night|noon|<time>This allows a command to expand so long as the total number of subcommands/arguments it contains does not exceed the given threshold.Dynamic searchEach whitespace-separated search term of the provided query is treated as a regex pattern:>executea.*# 18w01aexecutealign<axes>->execute
executeas<targets>->execute
executeat<targets>->executeAnd so any combination of subcommands/arguments can be flexibly queried:>t.*targets# 18w01atag<targets>add<name>
tag<targets>list
tag<targets>remove<name>
teleport<targets><destination>|<location>...
tellraw<targets><message>
title<targets>actionbar|clear|reset|subtitle|times|title...Search terms are case-insensitive:>gamerule.*mob.*# 18w01agameruledoMobLoot
gameruledoMobLoot<value>
gameruledoMobSpawning
gameruledoMobSpawning<value>
gamerulemobGriefing
gamerulemobGriefing<value>Special case: a single.is treated as a wildcard and will match any term:>clone...masked# 18w01aclone<begin><end><destination>masked
clone<begin><end><destination>maskedforce|move|normalWhich is a convenient way of quickly diving into the command.