From f98f21e4b3b9190d907954844f8994f242bdfa86 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 26 Oct 2024 18:25:14 +0100 Subject: [PATCH] tools: added a wrapper for all BedrockData generation tools this way it takes 1 command to do all that crap instead of 4 --- tools/update-from-bedrock-data.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tools/update-from-bedrock-data.php diff --git a/tools/update-from-bedrock-data.php b/tools/update-from-bedrock-data.php new file mode 100644 index 00000000..ba1f09f4 --- /dev/null +++ b/tools/update-from-bedrock-data.php @@ -0,0 +1,23 @@ + + * + * BedrockProtocol is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + */ + +declare(strict_types=1); + +if(count($argv) < 2){ + fwrite(STDERR, "Required args: path to BedrockData" . PHP_EOL); + exit(1); +} + +passthru(PHP_BINARY . " " . __DIR__ . '/generate-protocol-info.php ' . escapeshellarg($argv[1] . '/protocol_info.json')); +passthru(PHP_BINARY . " " . __DIR__ . '/generate-entity-ids.php ' . escapeshellarg($argv[1] . '/entity_id_map.json')); +passthru(PHP_BINARY . " " . __DIR__ . '/generate-level-sound-ids.php ' . escapeshellarg($argv[1] . '/level_sound_id_map.json')); +passthru(PHP_BINARY . " " . __DIR__ . '/generate-command-parameter-types.php ' . escapeshellarg($argv[1] . '/command_arg_types.json'));