Querz / mcaselector

A tool to select chunks from Minecraft worlds for deletion or export.
MIT License
3.18k stars 177 forks source link

"sections" argument is not being parsed in CLI #384

Open arvitus opened 2 years ago

arvitus commented 2 years ago

Describe the bug MCA CLI doesn't process the sections argument in import mode. When running this command in the windows command line mca imports the whole chunk instead of just the specified sections: java -jar <path_to_mcaselector.jar> --mode import --world <path_to_world> --source-world <path_to_world> --sections "-4:-1"

This is because the sections argument actually never gets parsed as it's not even a valid option. When running mca with the --help argument, the sections argument is not in the list of the valid arguments. In the responsible source file is simply a section like this missing:

options.addOption(Option.builder()
    .longOpt("sections")
    .desc("One or a range of section indices.")
    .hasArg()
    .build());

So adding this would fix the bug.

To Reproduce Steps to reproduce the behavior: Run MCA CLI in import mode and specify a selection using --sections <range>. Check if only the specified sections were imported.

Expected behavior MCA CLI does process the sections argument in import mode.

Environment (please complete the following information):

arvitus commented 1 year ago

should be fixed in #386