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... This wiki page is here to help you install the game :)
Contents
Getting the Game
Buy your copy here: http://www.minecraft.net
Put the files in Template:Filename or wherever you want to. And make the game executable :
$ chmod u+x minecraft.jar
Setting Up Java
Minecraft should work out-of-the-box with a couple of the various Java JREs.
openJDK6
Minecraft should just work with openjdk6 in community.
# pacman -S openjdk6
openJDK7
Arguably the best future proof jre to use. Its in extra and Oracle has declared that openJDK7 is the reference implementation of java moving forwards. However minecraft gets stuck in the pause menu.
Fortunately minecraft can be made to work. Minecraft ships with LWJGL 1.8.2, but manually downgrading to LWJGL 1.8.1 solves the problem (and, as a bonus, fixes the sticky keys issue). Full credit for this solution goes to MrIso on reddit.
LWJGL 1.8.1 can be downloaded here:
Replace the following files in .minecraft/bin/ with the corresponding versions in lwjgl-2.8.1/jar
jinput.jar lwjgl.jar lwjgl_util.jar
And from .minecraft/bin/natives/ with lwjgl-2.8.1/natives/linux
libjinput-linux.so libjinput-linux64.so liblwjgl.so liblwjgl64.so libopenal.so libopenal64.so
Play the game
Run minecraft with :
$ java -jar $HOME/.minecraft/minecraft.jar
If you want to allocate it more ram, do like this :
$ java -jar -Xms1024M -Xmx2048M $HOME/.minecraft/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.
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. Minutor is available in the AUR.
Minecraft Server
Minecraft is also available as a server, which will allow you to share a world with other players over the Internet. Here's what you'll need to do:
- Follow the steps above to install Java (or OpenJDK)
- Download the multiplayer beta server jar from the Minecraft site
- Just run the jarfile:
(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.)
$ java -jar -Xmx2048M -Xms2048M -jar minecraft_server.jar nogui
- To configure the server, take a look at this wiki page.
Extras
- You may wish to create a specific folder for the server (/srv/minecraft, for example)
- Establishing a Minecraft-specific user is recommended for security. The reason for this is that Minecraft, being beta software, may still contain security holes. By setting it to a specific, unprivileged user account, anyone who successfully exploits your Minecraft server will have only gotten access to your unprivileged user. (Meaning, do not ever run the server as root!) Here's how:
- Use 'adduser' to add the user
- Disable that user's individual login by removing the password (you can still 'sudo su - mineserver' to open a shell as the user)
- Set the new user as owner of all the server files (generated on the first run) by running 'chown -R mineserver:nobody /path/to/server'
- To leave the server running unattended, take a look into tmux, nohup or screen
- Taking this a step further, you may even decide to create an init script for it, such as this one.
- (Please note that the script at that link doesn't quite work with Arch entirely. I haven't had the opportunity to troubleshoot it fully yet, but anyone with time and expertise to do so is encouraged to post one on my talk page and I'll find a proper place for it.)
- Finally, you may wish to modify your server, to provide additional features:
- Server Wrappers are one way to add administrative capabilities
- Bukkit is a powerful modding API, with a wide variety of plugins available
- You might even set up a cron job with a mapper to generate periodic maps of your world
- ...or you could use rsync to perform routine backups (though this is one function of the init script above)
Useful links
- Main site : http://www.minecraft.net/
- The recipes for crafting things : http://www.minecraftwiki.net/wiki/Crafting
- Data values (useful in multiplayer mode) : http://www.minecraftwiki.net/wiki/Data_values
- The reddit community : http://www.reddit.com/r/minecraft
- The main dev twitter : https://twitter.com/#!/notch
- The forum : http://www.minecraftforum.net/