Minecraft

提供: ArchWiki
ナビゲーションに移動 検索に移動

Minecraft はブロックを壊したり配置するゲームです。夜行性のモンスターから身を守るために建物を建てるだけでなく、ゲームが成長するにつれて様々な素晴らしい想像力溢れるものが作られてきました。

クライアント

インストール

ノート: Minecraft は xorg-xrandr を必要とします。

minecraft-launcherAUR もしくは minecraftAUR パッケージをインストールしてください。前者はtar.gz、後者はdebファイルからインストールされます。公式ダウンロードサイト からランチャーを取得することもできます。

起動

以下のコマンドでランチャーを立ち上げることができます:

$ minecraft-launcher

補助プログラム

Minecraft をより便利にするプログラムとエディタ がいくつかあります。一番よく使われるプログラムはマップジェネレータです。このプログラムを使えば Minecraft ワールドファイルをロードして 2D イメージとしてレンダリングでき、全体から細部に至るまでワールドマップを編集できます。

  • AMIDST (Advanced Minecraft Interface and Data/Structure Tracking) は Minecraft ワールドの構造物・バイオーム・プレイヤーを探すのを助けるプログラムです。ワールドからバイオームを引き抜いたり、シードを与えたりランダムシードを作成したり既存のワールドのシードを読み込むことで、特定の場所がどうなっているか表示することができます (ワールド上のプレイヤーの位置も表示します)。amidstAURAUR からインストールできます。メインの開発者が多忙のため、AMIDST は現在メンテナンスがされていない状態なので注意してください。AMIDST のフォークとして "Amidst Exporter" が存在し、AUR パッケージは amidstexporterAUR です。特筆すべき点として、1.8 以上のワールドで存在する海の要塞を計算するパッチが含まれています。
  • Mapcrafter は 3D 等角投影法でワールドをマップにレンダリングする高パフォーマンスな Minecraft マップレンダラーです。ウェブブラウザでマップを表示することができ、サーバーのプレイヤーのためにウェブサーバーでホストすることができます。Mapcrafter にはレンダリングするワールドや、day/night/cave などのレンダリングモードを指定するためのシンプルな設定ファイルフォーマットがあります。mapcrafter-gitAURAUR からインストールできます。
  • Minutor は最小主義の Minecraft マップジェネレータです。最小主義だからといって作れるワールドに制限があるわけではありません。シンプルな GTK+ ベースのインターフェースでワールドを見ることができます。いくつかのレンダリングモードがあり、カスタムカラーモードや Z レベルでスライスできる機能もあります。minutorAUR[リンク切れ: アーカイブ: aur-mirror]AUR から入手可能です。

Bedrock Edition サーバ

このバージョンでは、Bedrock Edition Minecraftのホスティングが可能で、現在は、Windows 10 とモバイル、Amazon FireOS、FireTV、Anroid、iOS、Xbox One、Playstation 4、Nintendo Switch、Samsung Gear VR デバイスがサポートされています。

インストール

Bedrock マインクラフトサーバーは、minecraft-bedrock-serverAUR パッケージでインストールできます。 これは、systemd ユニットファイルを提供します。このパッケージは 独立した minecraft-bedrock アカウントを作成します。

サーバーの起動

To start the server you may either use systemd or run it directly from the command line. Either way the server is encapsulated in a GNU Screen session which is owned by the minecraft-bedrock user. Using systemd you may start and enable the included minecraft-bedrock-server.service. Alternatively run the following as the minecraft-bedrock user inside the /opt/minecraft-bedrock-server directory:

$ LD_LIBRARY_PATH=. ./bedrock_server

サーバー設定

Open server.properties with your favorite text editor and you may edit your server settings. The file has explanations under each option to guide you through configuring the server to your needs.

Most importantly, server-port determines the UDP port at which the server will listen for incoming connections. Default port is 19132 for IPv4, and 19133 for IPv6. UDP ports 43351 for IPv4 and 51885 for IPv6 are also required to be forwarded for authentication.

Java Edition サーバー

インストール

Arch Linux で Minecraft サーバーをインストールする一番簡単な方法は minecraft-serverAUR パッケージを使うことです。パッケージには systemd のユニットファイルや小さな制御スクリプトが付属しています。

ノート: C++ と Lua で書かれている Cuberite を除いて、ほとんどの全ての Minecraft サーバーは実行するのに Java を必要とします。OpenJDK パッケージを使用した場合、サーバーが上手く動作しない、あるいは全く動作しないという報告、また、Oracle の Java パッケージ (jdk-armAUR) を使用したら上手く動作したという報告があります (特に ARMv7 マシンの場合)。

セットアップ

イントロダクション

パッケージのインストール時に minecraft ユーザーとグループが作成されます。Minecraft 専用のユーザーを作成することはセキュリティを確保するために奨励されていることです。非特権ユーザーのアカウントで Minecraft を動作させることで、Minecraft サーバーの脆弱性を突かれたとしても、他のユーザーに影響ありません。ただし、Minecraft サーバーの設定を変更するために、あなたの使用しているユーザーを minecraft グループに追加して、/srv/minecraft ディレクトリにグループの書き込み権限を追加することは問題ありません。/srv/minecraft ディレクトリの全てのファイルの所有者が minecraft ユーザーになっていること、または他の方法でユーザーが読み書き権限を持てるようにしてください。特定のファイルにアクセスできないとサーバーはエラーを吐き出します。もしくは、ログにエラーメッセージを書き込むことすらできない可能性もあります。

サーバーには自動的にバックアップを取るための systemd のサービスとタイマーが付いています。バックアップはサーバーのルートディレクトリ直下のbackup フォルダに保存されます。使用する systemd ファイルは /usr/lib/systemd/system/minecraftd-backup.timer/usr/lib/systemd/system/minecraftd-backup.service です。ユニットファイルは簡単に修正することができ、バックアップの間隔などをカスタマイズできます。

サーバーの起動

サーバーを起動するときは systemd を使用するかコマンドラインから直接起動します。どちらの方法でもサーバーは minecraft ユーザーによって所有される screen セッションでカプセル化されます。systemd を使用する場合、パッケージに含まれている minecraftd.service起動・有効化します。あるいは次のコマンドを実行:

# minecraftd start
ノート: サーバーを初めて実行したとき、/srv/minecraft/eula.txt が作成されます。サーバーを起動するには、このファイルを編集して EULA に同意したことを示さなければなりません。

サーバー管理スクリプト

パッケージに含まれている minecraftd スクリプトを使うことでサーバーを簡単に制御できます。start, stop, restart などの基本的なコマンドを使えるだけでなく console でセッションにアタッチすることも可能です。さらに、status でステータス情報を表示したり、backup でサーバーのワールドディレクトリをバックアップしたり、restore でバックアップからワールドデータを復旧したり、あるいは command <server command> のようにしてサーバーコンソールでコマンドを実行できます。

ノート: サーバーの console については、ctrl+a d で全ての screen セッションを終了することができます。

設定

デフォルト設定 (最大使用メモリやスレッド数など) を変更したい場合、/etc/conf.d/minecraft ファイルを編集してください。

上級ユーザーは /etc/conf.d/minecraftIDLE_SERVER を有効 (true) にすると良いでしょう。オンラインのプライヤーがいなくなった場合に IDLE_IF_TIME に指定された時間 (デフォルトでは20分) 経過すると管理スクリプトによってサーバーが停止されます。サーバーが停止されると idle_servernetcat を使って Minecraft のポートを監視して、接続があったらすぐにサーバーを起動します。初めてゲームに参加するときのロード時間が長くなりますが、CPU やメモリの使用量を大幅に減らすことができ、リソースの無駄使いがなくなります。

Spigot (Craftbukkit)

Spigot は世界で最も使われている mod 適用済みの Minecraft サーバーです。AURspigotAUR パッケージでインストールできます。spigot の PKGBUILD は minecraft-serverAUR パッケージのファイルを使ってビルドします。 spigot サーバーは systemd ユニットファイルと spigot スクリプト、そしてスクリプトの設定ファイルから成ります。バイナリの名前は spigot で、minecraftd と全く同じコマンドが使えます。設定ファイルの場所は /etc/conf.d/spigot です。

minecraftdspigot に置き換えてセットアップを読んでください。

Spigot は Bukkit の系列であり、Bukkit の活動停止によって人気が増しています。

Cuberite

Cuberite は C++ と Lua で書かれている高速な Minecraft 互換サーバーです。標準の Minecraft サーバーよりも高い性能を発揮することができ、様々な mod を適用できます。cuberiteAUR パッケージが AUR からインストールできます。プログラムにはシンプルなウェブインターフェイスが存在し、デフォルトでは port 8080 からアクセスします。ブラウザからほとんどのサーバー制御を簡単に行うことが可能です。そのため、管理スクリプトは必要ありません。さらに、パッケージにはサーバーを起動 (cuberite.service) したりバックアップ (cuberite-backup.service) するための systemd ファイルが付属しています。

minecraftdcuberite に置き換えてセットアップを読んでください。

ヒントとテクニック

Minecraft Mod Launcher

Minecraft のゲームプレイを強化したり Mod を追加する Mod パックが含まれた様々なランチャーで起動することができます。

Feed The Beast

feedthebeastAUR[リンク切れ: パッケージが存在しません] には Feed The Beast ランチャーが含まれています。Feed The Beast の公式ページは: feed-the-beast.com

Technic Launcher

minecraft-technic-launcherAUR には Technic Launcher が含まれています。Technic Launcher の公式ページは: technicpack.net

Other programs and editors

There are several programs and editors which can make your Minecraft experience a little easier to navigate. The most common of these programs are map generators. Using one of these programs will allow you to load up a Minecraft world file and render it as a 2D image, providing you with a top-down map of the world.

  • AMIDST (Advanced Minecraft Interface and Data/Structure Tracking) (amidstAUR) is a program that aids in the process of finding structures, biomes, and players in Minecraft worlds. It can draw the biomes of a world out and show where points of interest are likely to be by either giving it a seed, telling it to make a random seed, or having it read the seed from an existing world (in which case it can also show where players in that world are). The project has been forked in the past, of which the most notable one is "Amidst Exporter" (amidstexporterAUR) which includes a patch for calculating Ocean Monument locations in 1.8+ worlds.
  • Mapcrafter (mapcrafter-gitAUR) is a high performance Minecraft map renderer written in C++ which renders worlds to maps with an 3D-isometric perspective. You can view these maps in any webbrowser hence they are easily deployed on one's server. Mapcrafter has a simple configuration file format to specify worlds to render, different rendermodes such as day/night/cave and can also render worlds from different rotations.
  • Minutor (minutor-gitAUR) is a minimalistic map generator for Minecraft. You are provided with a simple GTK based interface for viewing your world. Several rendering modes are available, as well as custom coloring modes and the ability to slice through z-levels.

Troubleshooting

Server on ARM devices

Minecraft server should run without any issues on ARM devices with latest Java, such as jre-openjdk-headless. However, if you encounter any issues, try using jdk-armAUR instead. Also consider #Cuberite server as an alternative.

Client Wayland support

Wayland and other window managers are currently not supported with Minecraft, as Minecraft has the prerequisite of xorg-xrandr and should be opened with xorg.

Client or server does not start

It might be the problem with Java version. Java version 8 is guaranteed to work well in all cases.

Both Minecraft server and the actual game work perfectly fine with the latest version of Java, such as jre-openjdk, but the Minecraft game launcher (and possibly all other mods) might only work with the Java version 8.

Broken fonts with MinecraftForge

Force Unicode fonts from the language menu.

Since you cannot read any of the menu options: in the main menu, choose the bottom-left most button is Options, second-from-the-bottom on the left side is the Language Button. From there, the Force Unicode Font button is on the bottom, on the left side.

MultiMC unable to build

If you are trying to install multimc5AUR and get an error similar to:

No CMAKE_Java_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "JAVA_COMPILER" or the CMake cache entry CMAKE_Java_COMPILER to
the full path to the compiler, or to the compiler name if it is in the
PATH.

The error could be caused by Java missing, which can be fixed by installing jdk8-openjdk. If the error is not fixed by that or Java was properly installed in the first place, the wrong version could still be the default environment:

$ archlinux-java status
Available Java environments:
  java-13-openjdk (default)
  java-8-openjdk

You can set the default java version using archlinux-java set <version>.

Cannot change pulseaudio sink

If you are unable to switch audio output device (indicated by DONT_MOVE flag in the output of pacmd list-sink-inputs) then the following openalsoft config may help

~/.alsoftrc
[pulse]
allow-moves=yes

参照