Difference between revisions of "Minecraft"

From Got Opinion Wiki
Jump to navigation Jump to search
Line 58: Line 58:
Minecraft should now work correctly!
Minecraft should now work correctly!


== Linux Mint 14 ==
== Linux Mint ==
 
=== Mint 16 with KDE Desktop ===
 
'''Setup current Oracle Java 64-bit (Java version 7 update 51 as of this writing):'''
# [http://java.com/en/download/linux_manual.jsp?locale=en Download latest version of Linux x64]
# Create directory you want to install Java. As root <code>mkdir /usr/java/</code>
# Change to directory <code>cd /usr/java</code>
# Move the jre-7u51-linux-x64.tar.gz file to the /usr/java directory.
# Uncompress and unpack the tarball to install Java. <code>tar zxvf jre-7u51-linux-x64.tar.gz</code>
#* The Java files are installed in a directory called /usr/java/jre1.7.0_51/
# Delete .tar.gz file <code>rm /usr/java/jre-7u9-linux-64.tar.gz</code>
 
'''Setup minecraft server:'''
# Create minecraft directory. As root <code>mkdir /minecraft</code>
# Change ownership to user. As root <code>chown username:username /minecraft</code>
# Swith to username then download [http://minecraft.net/download minecraft_server.jar] to /minecraft directory
# Launch minecraft server using Oracle's 64-bit Java: <code>/usr/java/jre1.7.0_51/bin/java -Xmx1024m -Xms1024M -jar minecraft_server.jar nogui</code>
# Type /help at Minecraft prompt to get a list of server commands.
# I stop server here and customize the server.properties folder to what you want. Then restart server.
 
'''After you setup your directories change the ownership of the directories and all files in /usr/java & /minecraft to non-privileged user.'''
 
Example with user and group named "bigfoot".
<pre>chown -R bigfoot:bigfoot /minecraft
chown -R bigfoot:bigfoot /usr/java</pre>
 
'''Using the minecraft_server.jar in nogui mode does not require any changes to your video card drivers'''
 
==== Example start up of first Minecraft server ====
This example I used an existing server.properties file and simply changed the name of test world to "wildlands".
<pre>
bigfoot@sweetcandy:/minecraft > /usr/java/jre1.7.0_51/bin/java -Xmx1024m -Xms1024M -jar minecraft_server.jar nogui
[11:59:12] [Server thread/INFO]: Starting minecraft server version 1.7.4
[11:59:12] [Server thread/INFO]: Loading properties
[11:59:12] [Server thread/INFO]: Default game type: SURVIVAL
[11:59:12] [Server thread/INFO]: Generating keypair
[11:59:12] [Server thread/INFO]: Starting Minecraft server on *:25565
[11:59:12] [Server thread/INFO]: Preparing level "wildlands"
[11:59:13] [Server thread/INFO]: Preparing start region for level 0
[11:59:14] [Server thread/INFO]: Preparing spawn area: 5%
[11:59:15] [Server thread/INFO]: Preparing spawn area: 12%
[11:59:16] [Server thread/INFO]: Preparing spawn area: 20%
[11:59:17] [Server thread/INFO]: Preparing spawn area: 29%
[11:59:18] [Server thread/INFO]: Preparing spawn area: 38%
[11:59:19] [Server thread/INFO]: Preparing spawn area: 47%
[11:59:20] [Server thread/INFO]: Preparing spawn area: 57%
[11:59:21] [Server thread/INFO]: Preparing spawn area: 67%
[11:59:22] [Server thread/INFO]: Preparing spawn area: 77%
[11:59:23] [Server thread/INFO]: Preparing spawn area: 86%
[11:59:24] [Server thread/INFO]: Preparing spawn area: 96%
[11:59:24] [Server thread/INFO]: Done (12.118s)! For help, type "help" or "?"
</pre>
Type "help or ?" at prompt to show commands
<pre>
?
[11:59:30] [Server thread/INFO]: --- Showing help page 1 of 7 (/help <page>) ---
[11:59:30] [Server thread/INFO]: /achievement give <stat_name> [player]
[11:59:30] [Server thread/INFO]: /ban <name> [reason ...]
[11:59:30] [Server thread/INFO]: /ban-ip <address|name> [reason ...]
[11:59:30] [Server thread/INFO]: /banlist [ips|players]
[11:59:30] [Server thread/INFO]: /clear <player> [item] [data]
[11:59:30] [Server thread/INFO]: /debug <start|stop>
[11:59:30] [Server thread/INFO]: /defaultgamemode <mode>
</pre>
I always issue "save-all" then "stop" command when taking server offline.
<pre>
save-all
[11:59:36] [Server thread/INFO]: Saving...
[11:59:36] [Server thread/INFO]: Saved the world
stop
[11:59:38] [Server thread/INFO]: Stopping the server
[11:59:38] [Server thread/INFO]: Stopping server
[11:59:38] [Server thread/INFO]: Saving players
[11:59:38] [Server thread/INFO]: Saving worlds
[11:59:38] [Server thread/INFO]: Saving chunks for level 'wildlands'/Overworld
[11:59:38] [Server thread/INFO]: Saving chunks for level 'wildlands'/Nether
[11:59:38] [Server thread/INFO]: Saving chunks for level 'wildlands'/The End
</pre>


=== MATE Desktop ===
=== MATE Desktop ===
Line 72: Line 150:
# Uncompress and unpack the tarball to install Java. <code>tar zxvf jre-7u9-linux-x64.tar.gz</code>
# Uncompress and unpack the tarball to install Java. <code>tar zxvf jre-7u9-linux-x64.tar.gz</code>
#* The Java files are installed in a directory called /usr/java/jre1.7.0_09/
#* The Java files are installed in a directory called /usr/java/jre1.7.0_09/
# Delete .tar.gz file <code>rm /usr/java/jre-7u9-linux-64.tar.gz</code>
# Delete .tar.gz file <code>rm /usr/java/jre-7u51-linux-x64.tar.gz</code>


'''Setup minecraft server:'''
'''Setup minecraft server:'''

Revision as of 11:18, 26 January 2014

Windows Operating System

My tips for running Minecraft on Windows machines.

  • Update video driver
  • Update Java software at Java website
  • Allocate more memory only if you get "out of memory errors"

Allocate More Memory to Minecraft

Thought I'd share my success at memory allocation changes with those who are interested.

Note: I only changed my memory allocations on my machine due to in-game memory crashes every 90 to 120 seconds when exploring outside. Once I allocated 768m I haven't had a memory crash. This memory allocation started happening to my machine since 1.7 beta.

I was trying various configurations to allocate memory but my command window would open up then immediately close or Java Virtual Machine (JVM) would not launch, etc.

I have Win7 Ultimate 64-bit, 12 GB RAM, with current version of Java installed.

I created a batch file & updated my PATH variable with directory of current Java version.

Batch file contains (use your own c:\path2minecraft.exe here):

javaw -Xms768m -jar "c:\minecraft\Minecraft.exe"

Added this to PATH (don't forget the semi-colon to separate this path from previous one):

;C:\Program Files (x86)\Java\jre7\bin

Add to PATH steps: For Win7 Ultimate I right click Computer > Properties > Advanced System Settings > Advanced Tab > Environmental Variables > System Variables > highlight PATH then click EDIT. Add semi-colon then PATH to current version of Java then press Okay.

Side Note: The same machine runs minecraft flawless in Fedora Core 15 & 16 without memory modifications. Only the lack of Ventrilo support on Linux causes me to use Windows to run minecraft.

I've read about other people starting minecraft.exe with -Xmx parameter but I could not get various options to work, even though I have 12 GB RAM.

Fedora Core Linux Operating System

My tips for running Minecraft on Fedora Core 14, 15 & 16 systems.

  • Update video driver
    • I use NVidia video cards. See my Linux NVidia driver installation page
  • Update Java software at Java website
    • Launch Java from command line by pointing to current version of Java (or update your PATH variable)
    • Example [client start]: /usr/java/latest/bin/java -jar minecraft.jar
    • Example [server start]: /usr/java/latest/bin/java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui

Note: Above commands assume you are in same directory as minecraft .jar files, otherwise, specify path to .jar files

Ubuntu Operating System

If you launch minecraft client and see an error message with ".minecraft/bin/natives/liblwjgl.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)" then follow these steps:

Install Lightweight Java Game Library

  1. Go to http://lwjgl.org/download.php
  2. Click the link to download the newest stable release
  3. Download lwjgl-x.x.x.zip (lwjgl-2.8.4.zip was latested on 8-21-2012)
  4. In your home directory Ctrl + H to show hidden files
  5. Go to .minecraft/bin directory and copy matching .jar files from the jar folder in the lwjgl directory. I copied jinput.jar, lwjgl.jar, and lwjgl_util.jar.
  6. Go to .minecraft/bin/native directory and copy matching .so files from the native/linux folder in the lwjgl directory. I copied all six files libjinput-linux64.so, liblwjgl64.so, libopenal64.so, libjinput-linux.so, liblwjgl.so, and libopenal.so.

Minecraft should now work correctly!

Linux Mint

Mint 16 with KDE Desktop

Setup current Oracle Java 64-bit (Java version 7 update 51 as of this writing):

  1. Download latest version of Linux x64
  2. Create directory you want to install Java. As root mkdir /usr/java/
  3. Change to directory cd /usr/java
  4. Move the jre-7u51-linux-x64.tar.gz file to the /usr/java directory.
  5. Uncompress and unpack the tarball to install Java. tar zxvf jre-7u51-linux-x64.tar.gz
    • The Java files are installed in a directory called /usr/java/jre1.7.0_51/
  6. Delete .tar.gz file rm /usr/java/jre-7u9-linux-64.tar.gz

Setup minecraft server:

  1. Create minecraft directory. As root mkdir /minecraft
  2. Change ownership to user. As root chown username:username /minecraft
  3. Swith to username then download minecraft_server.jar to /minecraft directory
  4. Launch minecraft server using Oracle's 64-bit Java: /usr/java/jre1.7.0_51/bin/java -Xmx1024m -Xms1024M -jar minecraft_server.jar nogui
  5. Type /help at Minecraft prompt to get a list of server commands.
  6. I stop server here and customize the server.properties folder to what you want. Then restart server.

After you setup your directories change the ownership of the directories and all files in /usr/java & /minecraft to non-privileged user.

Example with user and group named "bigfoot".

chown -R bigfoot:bigfoot /minecraft
chown -R bigfoot:bigfoot /usr/java

Using the minecraft_server.jar in nogui mode does not require any changes to your video card drivers

Example start up of first Minecraft server

This example I used an existing server.properties file and simply changed the name of test world to "wildlands".

bigfoot@sweetcandy:/minecraft > /usr/java/jre1.7.0_51/bin/java -Xmx1024m -Xms1024M -jar minecraft_server.jar nogui
[11:59:12] [Server thread/INFO]: Starting minecraft server version 1.7.4
[11:59:12] [Server thread/INFO]: Loading properties
[11:59:12] [Server thread/INFO]: Default game type: SURVIVAL
[11:59:12] [Server thread/INFO]: Generating keypair
[11:59:12] [Server thread/INFO]: Starting Minecraft server on *:25565
[11:59:12] [Server thread/INFO]: Preparing level "wildlands"
[11:59:13] [Server thread/INFO]: Preparing start region for level 0
[11:59:14] [Server thread/INFO]: Preparing spawn area: 5%
[11:59:15] [Server thread/INFO]: Preparing spawn area: 12%
[11:59:16] [Server thread/INFO]: Preparing spawn area: 20%
[11:59:17] [Server thread/INFO]: Preparing spawn area: 29%
[11:59:18] [Server thread/INFO]: Preparing spawn area: 38%
[11:59:19] [Server thread/INFO]: Preparing spawn area: 47%
[11:59:20] [Server thread/INFO]: Preparing spawn area: 57%
[11:59:21] [Server thread/INFO]: Preparing spawn area: 67%
[11:59:22] [Server thread/INFO]: Preparing spawn area: 77%
[11:59:23] [Server thread/INFO]: Preparing spawn area: 86%
[11:59:24] [Server thread/INFO]: Preparing spawn area: 96%
[11:59:24] [Server thread/INFO]: Done (12.118s)! For help, type "help" or "?"

Type "help or ?" at prompt to show commands

?
[11:59:30] [Server thread/INFO]: --- Showing help page 1 of 7 (/help <page>) ---
[11:59:30] [Server thread/INFO]: /achievement give <stat_name> [player]
[11:59:30] [Server thread/INFO]: /ban <name> [reason ...]
[11:59:30] [Server thread/INFO]: /ban-ip <address|name> [reason ...]
[11:59:30] [Server thread/INFO]: /banlist [ips|players]
[11:59:30] [Server thread/INFO]: /clear <player> [item] [data]
[11:59:30] [Server thread/INFO]: /debug <start|stop>
[11:59:30] [Server thread/INFO]: /defaultgamemode <mode>

I always issue "save-all" then "stop" command when taking server offline.

save-all
[11:59:36] [Server thread/INFO]: Saving...
[11:59:36] [Server thread/INFO]: Saved the world
stop
[11:59:38] [Server thread/INFO]: Stopping the server
[11:59:38] [Server thread/INFO]: Stopping server
[11:59:38] [Server thread/INFO]: Saving players
[11:59:38] [Server thread/INFO]: Saving worlds
[11:59:38] [Server thread/INFO]: Saving chunks for level 'wildlands'/Overworld
[11:59:38] [Server thread/INFO]: Saving chunks for level 'wildlands'/Nether
[11:59:38] [Server thread/INFO]: Saving chunks for level 'wildlands'/The End

MATE Desktop

Cinnamon Desktop (with Mint 14 & 15)

Setup current Oracle Java 64-bit (Java version 7 update 9 as of this writing):

  1. Download latest version of Linux x64
  2. Create directory you want to install Java. As root mkdir /usr/java/
  3. Change to directory cd /usr/java
  4. Move the jre-7u9-linux-64.tar.gz file to the /usr/java directory.
  5. Uncompress and unpack the tarball to install Java. tar zxvf jre-7u9-linux-x64.tar.gz
    • The Java files are installed in a directory called /usr/java/jre1.7.0_09/
  6. Delete .tar.gz file rm /usr/java/jre-7u51-linux-x64.tar.gz

Setup minecraft server:

  1. Create minecraft directory. As root mkdir /minecraft
  2. Change ownership to user. As root chown username:username /minecraft
  3. Swith to username then download minecraft_server.jar to /minecraft directory
  4. Launch minecraft server using Oracle's 64-bit Java: /usr/java/jre1.7.0_09/bin/java -Xmx1024m -Xms1024M -jar minecraft_server.jar nogui
  5. Type /help at Minecraft prompt to get a list of server commands.
  6. I stop server here and customize the server.properties folder to what you want. Then restart server.

Using the minecraft_server.jar in nogui mode does not require any changes to your video card drivers

Example of successful start:

/minecraft $ /usr/java/jre1.7.0_09/bin/java -Xmx1024m -Xms1024M -jar minecraft_server.jar nogui
208 recipes
27 achievements
2012-12-01 13:16:34 [INFO] Starting minecraft server version 1.4.5
2012-12-01 13:16:34 [INFO] Loading properties
2012-12-01 13:16:34 [INFO] Default game type: SURVIVAL
2012-12-01 13:16:34 [INFO] Generating keypair
2012-12-01 13:16:35 [INFO] Starting Minecraft server on *:25565
2012-12-01 13:16:35 [INFO] Preparing level "hillville"
2012-12-01 13:16:35 [INFO] Preparing start region for level 0
2012-12-01 13:16:36 [INFO] Preparing spawn area: 54%
2012-12-01 13:16:36 [INFO] Done (1.499s)! For help, type "help" or "?"

Other Linux Links

Setting up server on Linux from Minecraft wiki

Mods

Tale of Kingdoms I'm researching


To Gaming