Difference between revisions of "Minecraft"

From ArchWiki
Jump to: navigation, search
(Minecraft Server)
(Installation: Rewording)
 
(95 intermediate revisions by 32 users not shown)
Line 1: Line 1:
 +
[[Category:Gaming]]
 
[[ja:Minecraft]]
 
[[ja:Minecraft]]
Minecraft is a commercial game very popular with geeks. It's a game about blocks. You can build a computer out of the game thanks to logical switches. There is a parallel world. Zombies, pigs, spiders, sheeps, wolves that you can tame, etc...
+
[[zh-CN:Minecraft]]
This wiki page is here to help you install the game :)
+
Minecraft is a game about breaking and placing blocks. At first, people built structures to protect against nocturnal monsters, but as the game grew players worked together to create wonderful, imaginative things.
  
==Installation==
+
== Client ==
{{AUR|minecraft}} is available in the [[AUR]]. This package includes the official game plus a script for launching it.
+
  
==Setting Up Java==
+
=== Installation ===
Minecraft should work out-of-the-box with a couple of the various Java JREs.
+
  
===OpenJDK6===
+
{{Note|Minecraft requires {{pkg|xorg-xrandr}}.}}
Minecraft should 'just work' with OpenJDK6. Install it from community:  
+
{{AUR|minecraft}} includes the official game launcher, a script to launch it and a proper {{ic|.desktop}} file. Alternatively the plain minecraft launcher can be found at their [https://minecraft.net/download download page].
# pacman -S openjdk6
+
  
===OpenJDK7===
+
=== Running ===
OpenJDK7 works with Minecraft too:
+
# pacman -S jre7-openjdk
+
If Minecraft has issues (sticky keys, stuck on pause menu, etc.), you can force it to use the newest version of LWJGL:
+
 
+
*Download LWJGL 2.8.4 from [http://sourceforge.net/projects/java-game-lib/files/Official%20Releases/LWJGL%202.8.4/lwjgl-2.8.4.zip/download here]
+
*Replace the following files in .minecraft/bin/ with the corresponding versions in lwjgl-2.8.4/jar
+
 
+
jinput.jar
+
lwjgl.jar
+
lwjgl_util.jar
+
*Replace the following files in .minecraft/bin/natives/ with lwjgl-2.8.4/natives/linux
+
libjinput-linux.so
+
libjinput-linux64.so
+
liblwjgl.so
+
liblwjgl64.so
+
libopenal.so
+
libopenal64.so
+
 
+
==Running Minecraft==
+
  
 
If you installed Minecraft from the AUR, you can use the included script:
 
If you installed Minecraft from the AUR, you can use the included script:
Line 38: Line 17:
  
 
Otherwise, you will need to manually launch Minecraft:
 
Otherwise, you will need to manually launch Minecraft:
  $ java -jar $HOME/.minecraft/minecraft.jar
+
  $ java -jar Minecraft.jar
  
To allocate more RAM to the game, include Xms and Xmx arguments:
+
=== Extras ===
$ java -jar -Xms1024M -Xmx2048M $HOME/.minecraft/minecraft.jar
+
  
You can change these depending on the amount of RAM that you have. The Xms argument specifies the minimum amount of RAM to allocate to the program, and the Xmx argument specifies the maximum amount.
 
 
==Extras==
 
 
There are several [http://www.minecraftwiki.net/wiki/Programs_and_editors 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.
 
There are several [http://www.minecraftwiki.net/wiki/Programs_and_editors 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.
===Minutor===
 
Minutor is described as a minimalistic map generator for Minecraft. Don't let this mislead you, it generates maps of existing worlds, not the other way around. 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. {{aur|minutor}} is available in the [[AUR]].
 
  
==Minecraft Server==
+
* AMIDST (Advanced Minecraft Interface and Data/Structure Tracking) 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). {{AUR|amidst}} is available in the [[AUR]]. Bear in mind that AMIDST is currently unmaintained due to its main author being busy with work and other real life obligations. The primary fork is "Amidst Exporter" and has an AUR package at {{AUR|amidstexporter}}. This is notably updated to include a patch for calculating Ocean Monument locations in 1.8+ worlds.
There are two AUR packages for easy installation of a minecraft server.
+
For a server compatible with systemd, install {{ic|aur/minecraft-server-systemd}} and then enable the service:
+
$ systemctl enable minecraftd
+
$ systemctl start minecraftd
+
* Monitor the minecraft server by running the below command as root:
+
# screen -r
+
(Remember that one can exit screen sessions with {{ic|^A,D}})
+
{{Note|This creates a user called minecraft with a home directory at {{ic|/srv/minecraft}}. Add your user to the {{ic|minecraft}} group to modify minecraft settings.}}
+
  
For a server that uses the legacy rc scripts, install {{ic|aur/minecraft-server}}
+
* Mapcrafter is a high performance Minecraft map renderer which renders worlds to maps with an 3D-isometric perspective. You can view these maps in any webbrowser and you can host them with a webserver for example for the players of your 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. {{AUR|mapcrafter-git}} is available in the [[AUR]].
  
You can also run a dedicated Minecraft server:
+
* Minutor is described as a minimalistic map generator for Minecraft. Do not let this mislead you, it generates maps of existing worlds, not the other way around. 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. {{AUR|minutor}}{{Broken package link|{{aur-mirror|minutor}}}} is available in the [[AUR]].
* Follow the steps above to install [[Java]]
+
* [http://www.minecraft.net/download.jsp Download] the multiplayer server from the Minecraft site
+
* Run the server:
+
$ java -Xmx2048M -Xms2048M -jar minecraft_server.jar nogui
+
(You can sub the -Xmx and -Xms values for the amount of memory you want your server to use. A good rule of thumb is one GB per ten users.)
+
* To configure the server, take a look at this [http://www.minecraftwiki.net/wiki/Server.properties wiki page].
+
===Extras===
+
* Establishing a Minecraft-specific user is recommended for security. By running Minecraft under an unprivileged user account, anyone who successfully exploits your Minecraft server will only get access to that user account, and not yours.
+
* To leave the server running unattended, look into [[tmux]] or [[screen]].
+
* You may wish to modify your server, to provide additional features:
+
** [http://www.minecraftwiki.net/wiki/Programs_and_editors#Server_Wrappers Server Wrappers] are one way to add administrative capabilities.
+
** [http://bukkit.org/ Bukkit] is a powerful modding API, with a wide variety of plugins available.
+
*** If installing the Dynmap plugin, you will need to install fontconfig and libcups to get it to work.
+
* You might even set up a cron job with a [http://www.minecraftwiki.net/wiki/Programs_and_editors#Mappers mapper] to generate periodic maps of your world.
+
* ...or you could use [[rsync]] to perform routine backups.
+
  
==Mods==
+
== Server ==
  
* Terrafirmacraft : http://www.terrafirmacraft.com
+
=== Installation ===
* Technic pack / Tekkit : http://www.technicpack.net
+
* List of mods : http://www.minecraftforum.net/topic/1434593-list-of-mods-for-146147-and-from-132-onward/#t
+
  
 +
The simplest way to install the Minecraft server on an Arch Linux system is by using the {{aur|minecraft-server}} package. It provides additional systemd unit files and includes a small control script.
  
==Useful links==
+
{{Note|Except for [[#Cuberite|Cuberite]] which is written in C++ and Lua almost all Minecraft servers will require [[Java]] to run. Some people (apparently especially on ARMv7 machines) have reported that the server doesn't run well, if at all, using the OpenJDK packages and have reported success using the Oracle Java packages ({{aur|jdk-arm}}) instead. Your mileage may vary.}}
* Main site : http://www.minecraft.net/
+
* Community links: http://www.minecraft.net/community
+
* Crafting recipies : http://www.minecraftwiki.net/wiki/Crafting
+
* Data values (useful in multiplayer mode) : http://www.minecraftwiki.net/wiki/Data_values
+
* Reddit community : http://www.reddit.com/r/minecraft
+
* MineTest Tutorial : http://gotux.net/arch-linux/minetest-game-server/
+
  
[[Category:Gaming]]
+
=== Setup ===
 +
 
 +
==== Introduction ====
 +
 
 +
In the installation process the {{ic|minecraft}} user and group is introduced. Establishing a Minecraft-specific user is recommended for security reasons. By running Minecraft under an unprivileged user account, anyone who successfully exploits your Minecraft server will only get access to that user account, and not yours.
 +
However you may safely add your user to the {{ic|minecraft}} group and add group write permission to the directory {{ic|/srv/minecraft}} (default) to modify Minecraft server settings. Make sure that all files in the {{ic|/srv/minecraft}} directory are either owned by the {{ic|minecraft}} user, or that the user has by other means r/w permissions. The server will error out if it is unable to access certain files and might even have insufficient rights to write an according error message to the log.
 +
 
 +
The package provides a systemd service and timer to take automatic backups. The backups are located in the {{ic|backup}} folder under the server root directory by default. The related systemd files reside under {{ic|/usr/lib/systemd/system/minecraftd-backup.timer}}
 +
and {{ic|/usr/lib/systemd/system/minecraftd-backup.service}}. They may easily be adapted to your liking, e.g. a custom backup interval.
 +
 
 +
==== Starting the server ====
 +
 
 +
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 [[screen]] session which is owned by the {{ic|minecraft}} user. Using systemd you may [[start]] and enable the included {{ic|minecraftd.service}}. Alternatively run
 +
 
 +
# minecraftd start
 +
 
 +
{{Note|The first time you run the server, {{ic|/srv/minecraft/eula.txt}} will be created. You will need to edit this file to state that you have agreed to the EULA to run the server.}}
 +
 
 +
==== Server management script ====
 +
 
 +
To easily control the server you may use the provided {{ic|minecraftd}} script. It is capable of doing the basic commands like {{ic|start}}, {{ic|stop}}, {{ic|restart}} or attaching to the session with {{ic|console}}. Moreover it may be used to display status information with {{ic|status}}, backup the server world directory with {{ic|backup}}, restore world data from backups with {{ic|restore}} or run single commands in the server console with {{ic|command <server command>}}.
 +
 
 +
{{Note|Regarding the server {{ic|console}}, remember that you can exit any screen session with {{ic|ctrl+a}} {{ic|d}}.}}
 +
 
 +
==== Tweaking ====
 +
 
 +
To tweak the default settings (e.g. the maximum RAM, number of threads etc.) edit the file {{ic|/etc/conf.d/minecraft}}.
 +
 
 +
More advanced users may wish enable {{ic|IDLE_SERVER}} by setting it to true in {{ic|/etc/conf.d/minecraft}}. This will enable the management script to suspend the server if no player was online for at least {{ic|IDLE_IF_TIME}} (defaults to 20 minutes). When the server is suspended an {{ic|idle_server}} will listen on the minecraft port using {{ic|netcat}} and will immediately start the server at the first incoming connection. Though this obviously delays joining for the first time, it significantly decreases the CPU and memory usage, leading to more reasonably resource/power consumption.
 +
 
 +
=== Spigot (respectively Craftbukkit) ===
 +
 
 +
Spigot is the most widely-used '''modded''' Minecraft server in the world, hence there is a {{AUR|spigot}} package in the [[AUR]]. The spigot PKGBUILD builds on top of the files from the {{AUR|minecraft-server}} package. This means that the spigot server as well provides its own systemd unit files, spigot script and the corresponding script configuration file. The binary is called {{ic|spigot}} and is capable of fulfilling the same commands as {{ic|minecraftd}} and the configuration file resides under {{ic|/etc/conf.d/spigot}}.
 +
 
 +
Be sure read [[#Setup]] and replace {{ic|minecraftd}} with {{ic|spigot}} wherever you encounter it.
 +
 
 +
It is somewhat affiliated with [http://bukkit.org/ Bukkit] and has grown in popularity since Bukkit's demise.
 +
 
 +
=== Cuberite ===
 +
 
 +
[http://cuberite.org/ Cuberite] is a highly efficient minecraft compatible server written in C++ and Lua. It achieves better performances than the vanilla minecraft server plus it is extensively moddable. The {{AUR|cuberite}} package is available in the [[AUR]]. The program provides a simple web interface by default at {{ic|port 8080}} with which most server operations can easily be done through the browser. The cuberite PKGBUILD as well builds on top of the files from the {{AUR|minecraft-server}} package. This means that the cuberite server provides its own systemd unit files, cuberite script and the corresponding script configuration file. The binary is called {{ic|cuberite}} and is capable of fulfilling the same commands as {{ic|minecraftd}} and the configuration file resides under {{ic|/etc/conf.d/cuberite}}.
 +
 
 +
Be sure read [[#Setup]] and replace {{ic|minecraftd}} with {{ic|cuberite}} wherever you encounter it.
 +
 
 +
=== Additional notes ===
 +
 
 +
* There are several server wrappers available providing everything from automatic backup to managing dozens of servers in parallel, refer to [http://www.minecraftwiki.net/wiki/Programs_and_editors#Server_Wrappers Server Wrappers] for more information. However the management script provided by the AUR packages should suffice most needs.
 +
* You might want to set up a [[systemd/Timers|systemd timer]] with e.g. [http://www.minecraftwiki.net/wiki/Programs_and_editors#Mappers mapper] to generate periodic maps of your world.
 +
* Remember to take periodic backups, e.g. using [[rsync]] or the provided management script.
 +
 
 +
== Minecraft Mod Launchers ==
 +
 
 +
You can launch Minecraft from different "Launchers" that often include an array of Mod Packs to enchance one's gameplay and add [http://minecraft.gamepedia.com/Mods mods].
 +
 
 +
=== Feed The Beast ===
 +
 
 +
{{AUR|feedthebeast}} includes the Feed The Beast launcher. The official page for Feed The Beast is:
 +
[https://www.feed-the-beast.com/ feed-the-beast.com]
 +
 
 +
=== Technic Launcher ===
 +
 
 +
{{AUR|minecraft-technic-launcher}} includes the Technic Launcher. The official page for Technic Launcher is:
 +
[http://www.technicpack.net/ technicpack.net]
 +
 
 +
== See also ==
 +
 
 +
* [https://www.minecraft.net/ Official Minecraft site]
 +
* [https://www.minecraft.net/community Minecraft community links]
 +
* [https://minecraft.net/download Minecraft Client and Server download link]
 +
* [http://www.minecraftwiki.net/wiki/Crafting Crafting Recipes]
 +
* [http://www.minecraftwiki.net/wiki/Data_values Block and item data values]
 +
* [http://www.reddit.com/r/minecraft Reddit Minecraft community]
 +
* [http://www.minecraftskins.net Minecraft Skins]

Latest revision as of 09:28, 3 October 2016

Minecraft is a game about breaking and placing blocks. At first, people built structures to protect against nocturnal monsters, but as the game grew players worked together to create wonderful, imaginative things.

Client

Installation

Note: Minecraft requires xorg-xrandr.

minecraftAUR includes the official game launcher, a script to launch it and a proper .desktop file. Alternatively the plain minecraft launcher can be found at their download page.

Running

If you installed Minecraft from the AUR, you can use the included script:

$ minecraft

Otherwise, you will need to manually launch Minecraft:

$ java -jar Minecraft.jar

Extras

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) 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). amidstAUR is available in the AUR. Bear in mind that AMIDST is currently unmaintained due to its main author being busy with work and other real life obligations. The primary fork is "Amidst Exporter" and has an AUR package at amidstexporterAUR. This is notably updated to include a patch for calculating Ocean Monument locations in 1.8+ worlds.
  • Mapcrafter is a high performance Minecraft map renderer which renders worlds to maps with an 3D-isometric perspective. You can view these maps in any webbrowser and you can host them with a webserver for example for the players of your 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. mapcrafter-gitAUR is available in the AUR.
  • Minutor is described as a minimalistic map generator for Minecraft. Do not let this mislead you, it generates maps of existing worlds, not the other way around. 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. minutorAUR[broken link: archived in aur-mirror] is available in the AUR.

Server

Installation

The simplest way to install the Minecraft server on an Arch Linux system is by using the minecraft-serverAUR package. It provides additional systemd unit files and includes a small control script.

Note: Except for Cuberite which is written in C++ and Lua almost all Minecraft servers will require Java to run. Some people (apparently especially on ARMv7 machines) have reported that the server doesn't run well, if at all, using the OpenJDK packages and have reported success using the Oracle Java packages (jdk-armAUR) instead. Your mileage may vary.

Setup

Introduction

In the installation process the minecraft user and group is introduced. Establishing a Minecraft-specific user is recommended for security reasons. By running Minecraft under an unprivileged user account, anyone who successfully exploits your Minecraft server will only get access to that user account, and not yours. However you may safely add your user to the minecraft group and add group write permission to the directory /srv/minecraft (default) to modify Minecraft server settings. Make sure that all files in the /srv/minecraft directory are either owned by the minecraft user, or that the user has by other means r/w permissions. The server will error out if it is unable to access certain files and might even have insufficient rights to write an according error message to the log.

The package provides a systemd service and timer to take automatic backups. The backups are located in the backup folder under the server root directory by default. The related systemd files reside under /usr/lib/systemd/system/minecraftd-backup.timer and /usr/lib/systemd/system/minecraftd-backup.service. They may easily be adapted to your liking, e.g. a custom backup interval.

Starting the server

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 screen session which is owned by the minecraft user. Using systemd you may start and enable the included minecraftd.service. Alternatively run

# minecraftd start
Note: The first time you run the server, /srv/minecraft/eula.txt will be created. You will need to edit this file to state that you have agreed to the EULA to run the server.

Server management script

To easily control the server you may use the provided minecraftd script. It is capable of doing the basic commands like start, stop, restart or attaching to the session with console. Moreover it may be used to display status information with status, backup the server world directory with backup, restore world data from backups with restore or run single commands in the server console with command <server command>.

Note: Regarding the server console, remember that you can exit any screen session with ctrl+a d.

Tweaking

To tweak the default settings (e.g. the maximum RAM, number of threads etc.) edit the file /etc/conf.d/minecraft.

More advanced users may wish enable IDLE_SERVER by setting it to true in /etc/conf.d/minecraft. This will enable the management script to suspend the server if no player was online for at least IDLE_IF_TIME (defaults to 20 minutes). When the server is suspended an idle_server will listen on the minecraft port using netcat and will immediately start the server at the first incoming connection. Though this obviously delays joining for the first time, it significantly decreases the CPU and memory usage, leading to more reasonably resource/power consumption.

Spigot (respectively Craftbukkit)

Spigot is the most widely-used modded Minecraft server in the world, hence there is a spigotAUR package in the AUR. The spigot PKGBUILD builds on top of the files from the minecraft-serverAUR package. This means that the spigot server as well provides its own systemd unit files, spigot script and the corresponding script configuration file. The binary is called spigot and is capable of fulfilling the same commands as minecraftd and the configuration file resides under /etc/conf.d/spigot.

Be sure read #Setup and replace minecraftd with spigot wherever you encounter it.

It is somewhat affiliated with Bukkit and has grown in popularity since Bukkit's demise.

Cuberite

Cuberite is a highly efficient minecraft compatible server written in C++ and Lua. It achieves better performances than the vanilla minecraft server plus it is extensively moddable. The cuberiteAUR package is available in the AUR. The program provides a simple web interface by default at port 8080 with which most server operations can easily be done through the browser. The cuberite PKGBUILD as well builds on top of the files from the minecraft-serverAUR package. This means that the cuberite server provides its own systemd unit files, cuberite script and the corresponding script configuration file. The binary is called cuberite and is capable of fulfilling the same commands as minecraftd and the configuration file resides under /etc/conf.d/cuberite.

Be sure read #Setup and replace minecraftd with cuberite wherever you encounter it.

Additional notes

  • There are several server wrappers available providing everything from automatic backup to managing dozens of servers in parallel, refer to Server Wrappers for more information. However the management script provided by the AUR packages should suffice most needs.
  • You might want to set up a systemd timer with e.g. mapper to generate periodic maps of your world.
  • Remember to take periodic backups, e.g. using rsync or the provided management script.

Minecraft Mod Launchers

You can launch Minecraft from different "Launchers" that often include an array of Mod Packs to enchance one's gameplay and add mods.

Feed The Beast

feedthebeastAUR includes the Feed The Beast launcher. The official page for Feed The Beast is: feed-the-beast.com

Technic Launcher

minecraft-technic-launcherAUR includes the Technic Launcher. The official page for Technic Launcher is: technicpack.net

See also