見出し画像

統合版とJava版でワールドを双方向に変換したい

こんにちは。かけです。
マイクラサークルハマクラさん主催の2024年アドベントカレンダー17日目の記事です。他の記事もぜひご覧ください。




HiveGames/Chunker

Minecraft統合版で公式サーバーの一つHiveGamesがワールド変換ツールChunkerを公開しています。README.mdに記載されているように、現在統合版とJava版どちらとも最新バージョンまで対応しています。公式サーバーを運営しているだけあってMicrosoftがドキュメントを公開しています。

今回は統合版とJavaの相互変換するだけですが、その他にも多くの機能を持っています。ワールドのジェネレーターやゲームモード、実験的機能の操作も可能です。


使ってみる

ChunkerはJava 17以上で動作します。インストールしましょう。

Githubのreleaseにビルドがあるので、環境に合ったものをダウンロードしましょう。私はLinuxのCLI環境ですので、chunker-cli-linux-amd64.zipを使うことにします。

ダウンロードしたものはzipですので、unzipします

unzip chunker-cli-linux-amd64.zip

展開後はchunker-cliフォルダに中身があります。その中のbinフォルダに実行ファイルがあるので実行権限を付与します。

chmod +x chunker-cli

これで準備は完了ですので、実際に変更します。ヘルプは以下の通りです。
-i で変換したいワールドのディレクトリ、-f でformat、-o で変換後のワールドの出力ディレクトリが指定できるようです。

./chunker-cli --help                                                                                                                                                                         ymns-minecraft@venus
Usage: Chunker [-hkV] [-c=<converterSettings>] [-d=<dimensionMappings>]
               -f=<format> -i=<inputDirectory> [-m=<blockMappings>]
               -o=<outputDirectory> [-p=<pruningSettings>] [-s=<worldSettings>]
  -c, --converterSettings=<converterSettings>
                          A JSON file/object containing converter settings.
  -d, --dimensionMappings=<dimensionMappings>
                          A JSON file/object containing dimension mappings.
  -f, --outputFormat=<format>
                          The format to convert the world to.
  -h, --help              Show this help message and exit.
  -i, --inputDirectory=<inputDirectory>
                          Directory to read the world from.
  -k, --keepOriginalNBT   Whether original NBT should be kept and written to
                            the output world (only works if the output is the
                            same as the input).
  -m, --blockMappings=<blockMappings>
                          A JSON file/object containing block mappings.
  -o, --outputDirectory=<outputDirectory>
                          Directory to write the world to.
  -p, --pruning=<pruningSettings>
                          A JSON file/object containing pruning settings.
  -s, --worldSettings=<worldSettings>
                          A JSON file/object containing world settings.
  -V, --version           Print version information and exit.

今回はJavaのワールドを統合版の最新バージョンに変換します。

./chunker-cli -i /tmp/hoge_world -f BEDROCK_1_21_50 -o /tmp/fuga_world

ワールドが大きいこともあり20分程度かかりましたが変換完了です。

80.36%
80.37%
80.44%
99.01%
100.00%
Conversion complete! Took 19m 29s 236ms


いいなと思ったら応援しよう!