Skip to content

Commit

Permalink
tools: added a wrapper for all BedrockData generation tools
Browse files Browse the repository at this point in the history
this way it takes 1 command to do all that crap instead of 4
  • Loading branch information
dktapps committed Oct 26, 2024
1 parent 68d8180 commit f98f21e
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tools/update-from-bedrock-data.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

/*
* This file is part of BedrockProtocol.
* Copyright (C) 2014-2022 PocketMine Team <https://github.com/pmmp/BedrockProtocol>
*
* 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'));

0 comments on commit f98f21e

Please sign in to comment.