HansH
Posts: 212
Joined: Mon Sep 05, 2011 7:49 am

Re: Minecraft

Thu May 31, 2012 4:39 pm

Just compiled the MCServer on the RPi, no problems.
It just takes some time to build, but it runs...

Just follow the above instructions and you will get a working MCServer

Code: Select all

  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
   30 root      20   0     0    0    0 S   0.3  0.0   0:10.95 mmcqd/0
 5387 root      20   0  314m  57m 2248 S   0.3 26.5   5:13.76 MCServer
 5428 root      20   0 11376 3820 3052 S   0.3  1.7   0:00.68 sshd
 5443 root      20   0  4400 1332 1016 R   0.3  0.6   0:00.34 top
With 1 player:

Code: Select all

  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
 5387 root      20   0  357m  99m 2296 S  13.2 45.6   7:55.81 MCServer
 5443 root      20   0  4400 1332 1016 R   0.7  0.6   0:09.52 top
 1361 ntp       20   0  6984 2284 1740 S   0.3  1.0   0:01.73 ntpd
 5428 root      20   0 11376 3820 3052 S   0.3  1.7   0:03.49 sshd
fun to see...

tbar
Posts: 98
Joined: Thu Nov 24, 2011 6:10 am

Re: Minecraft

Thu May 31, 2012 7:05 pm

Cool! Does it perform?

ghans
Posts: 7871
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Minecraft

Thu May 31, 2012 8:09 pm

Show us some screenshots !
Is it better than in gadgetoids efforts ?

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

HansH
Posts: 212
Joined: Mon Sep 05, 2011 7:49 am

Re: Minecraft

Thu May 31, 2012 8:38 pm

Well I never played minecraft, but my son did, so he tried it out, worked ok
Performance was fine, first startup took a while, but after that it behaved well enough.

I used raspbian as OS, as a console based server (so no X)

phrasz
Posts: 46
Joined: Fri Jun 01, 2012 4:13 am

Re: Minecraft

Sat Jun 02, 2012 12:17 am

As an FYI to some of your guys' questions regarding a client version of minecraft:
The lwjgl does not support arm natives. In neither the prebuilt/sourceforge hosted files nor the apache maven repositories.

But hey! The RasPi can install maven2 ... if there are any java developers out there.

I don't have the screenshot, but OOB minecraft.jar will boot, with openjre, to the minecraft launcher. It will login, turn the screen black, and continue the boot process yelling at you all the way. Eventually the boot sequence stops after mc announces the achievements and recipes:

Code: Select all

#!/bin/bash
#MinecraftVentures.sh
#Install Openjdk:
apt-get install openjdk-6-jdk

#Grab Minecraft.jar from Minecraft.net
wget https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft.jar

#start Minecraft
java -Xms15M -Xmx50M -cp -jar minecraft.jar

#
#       May 28 Issues
#
#Exception in thread "main" java.lang.NoClassDefFoundError: minecraft/jar
#Caused by: java.lang.ClassNotFoundException: minecraft.jar
#       at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
#       at java.security.AccessController.doPrivileged(Native Method)
#       at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
#       at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
#       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
#       at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
#       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:334)
#Could not find the main class: minecraft.jar. Program will exit.
#[email protected]:~$ sudo java -Xms15M -Xmx50M -jar minecraft.jar
#java.io.IOException: Cannot run program "javaw": java.io.IOException: error=2, No such file or directory
#       at java.lang.ProcessBuilder.start(ProcessBuilder.java:475)
#       at net.minecraft.MinecraftLauncher.main(MinecraftLauncher.java:31)
#Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
#       at java.lang.UNIXProcess.<init>(UNIXProcess.java:164)
#       at java.lang.ProcessImpl.start(ProcessImpl.java:81)
#       at java.lang.ProcessBuilder.start(ProcessBuilder.java:468)
#       ... 1 more
#java.io.FileNotFoundException: /root/.minecraft/lastlogin (No such file or directory)
#       at java.io.FileInputStream.open(Native Method)
#       at java.io.FileInputStream.<init>(FileInputStream.java:137)
#       at net.minecraft.LoginForm.readUsername(LoginForm.java:131)
#       at net.minecraft.LoginForm.<init>(LoginForm.java:76)
#       at net.minecraft.LauncherFrame.<init>(LauncherFrame.java:24)
#       at net.minecraft.LauncherFrame.main(LauncherFrame.java:152)
#       at net.minecraft.MinecraftLauncher.main(MinecraftLauncher.java:36)
#27 achievements
#182 recipes
#Exception in thread "Minecraft main thread" java.lang.UnsatisfiedLinkError: /root/.minecraft/bin/natives/liblwjgl.so: /root/.minecraft/bin/natives/liblwjgl.so: cannot open shared object file: No such file or directory (Possible cause: can't load IA 32-bit .so on a ARM-bit platform)
#       at java.lang.ClassLoader$NativeLibrary.load(Native Method)
#       at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1750)
#       at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1646)
#       at java.lang.Runtime.load0(Runtime.java:787)
#       at java.lang.System.load(System.java:1022)
#       at org.lwjgl.Sys$1.run(Sys.java:69)
#       at java.security.AccessController.doPrivileged(Native Method)
#       at org.lwjgl.Sys.doLoadLibrary(Sys.java:65)
#       at org.lwjgl.Sys.loadLibrary(Sys.java:81)
#       at org.lwjgl.Sys.<clinit>(Sys.java:98)
#       at org.lwjgl.opengl.Display.<clinit>(Display.java:132)
#       at net.minecraft.client.Minecraft.a(SourceFile:184)
#       at net.minecraft.client.Minecraft.run(SourceFile:657)
#       at java.lang.Thread.run(Thread.java:636)
I went a bit further tried digging around for the lwjgl .so's (I seemingly ALWAYS need the sourceforge versions vs. what mojang has on ubuntu -_-), and that's where I tried pulling what is on maven's repositories, but no one has prebuilt arm lwjgl files....

SO if anyone knows how to rebuild lwjgl for arm I am listening :)

HansH
Posts: 212
Joined: Mon Sep 05, 2011 7:49 am

Re: Minecraft

Sat Jun 02, 2012 10:22 am

Code: Select all

[email protected]:/data/mc-server# ./MCServer
[12:06:51] --- Started Log ---
[12:06:51] Error (2) opening directory "world/player/"

[12:06:51] Creating new server instance...
[12:06:51] cSocketThreads startup
[12:06:51] Starting server...
/============================\
|   Custom Minecraft Server  |
|  Created by Kevin Bansberg |
|       A.K.A. FakeTruth     |
| Monsters by Alex Sonek     |
|       A.K.A. Duralex       |
| Stuff by Mattes D          |
|       A.K.A. _Xoft(o)      |
\============================/
More info: WWW.MC-SERVER.ORG
           WWW.AE-C.NET
           WWW.RBTHINKTANK.COM
email: [email protected]

[12:06:51] Starting up server.
[12:06:51] Compatible clients: 1.2.4, 1.2.5, protocol version 29
[12:06:51] Port 25565 has been bound, server is open for connections
[12:06:51] [Server].DefaultViewDistance not set, using a default of 9
[12:06:51] Creating WebAdmin...
[12:06:51] Starting WebAdmin on port 8080
[12:06:51] Loading settings...
[12:06:51] -- Loading Groups --
[12:06:51] Loading group: Admins
[12:06:51] Permission: *
[12:06:51] Loading group: Mods
[12:06:51] Permission: core.time
[12:06:51] Permission: core.item
[12:06:51] Loading group: Vips
[12:06:51] Permission: core.teleport
[12:06:51] Loading group: Default
[12:06:51] Permission: core.build
[12:06:51] Permission: core.help
[12:06:51] Permission: core.playerlist
[12:06:51] Permission: core.pluginlist
[12:06:51] Permission: core.spawn
[12:06:51] -- Done Loading Groups --
[12:06:51] --Loading recipes--
[12:06:51] --Done loading recipes, found 102 recipes
[12:06:51] --Loading furnace recipes--
[12:06:51] Got 9 furnace recipes, and 11 fuels.
[12:06:51] --Done loading furnace recipes--
[12:06:51] Loading worlds...
[12:06:51] cWorld::cWorld(world)
[12:06:51] [Generator]::BiomeGen value not found in world.ini, using "constant".
[12:06:51] [Generator]::HeightGen value not found in world.ini, using "classic".
[12:06:51] [Generator]::CompositionGen value not found in world.ini, using "classic".
[12:06:51] Preparing spawn area in world "world"...
[12:06:52] 399 chunks to load, 0 chunks to generate
[12:06:54] 265 chunks to load, 0 chunks to generate
[12:06:56] 135 chunks to load, 0 chunks to generate
[12:06:58] 5 chunks to load, 0 chunks to generate
[12:06:58] Lighting spawn area in world "world"...
[12:06:58] 9 chunks remaining to light
[12:06:59] Loading plugin manager...
[12:06:59] Loading plugins
[12:06:59] Binding /help (core.help)
[12:06:59] Binding /pluginlist (core.pluginlist)
[12:06:59] Binding /tp (core.teleport)
[12:06:59] Binding /item (core.item)
[12:06:59] Binding /i (core.item)
[12:06:59] Binding /list (core.playerlist)
[12:06:59] Binding /who (core.playerlist)
[12:06:59] Binding /playerlist (core.playerlist)
[12:06:59] Binding /motd (core.motd)
[12:06:59] Binding /reload (core.reload)
[12:06:59] Binding /time (core.time)
[12:06:59] Binding /spawn (core.spawn)
[12:06:59] Binding /home (core.spawn)
[12:06:59] Binding /kick (core.kick)
[12:06:59] Binding /ban (core.ban)
[12:06:59] Binding /unban (core.unban)
[12:06:59] Binding /top (core.top)
[12:06:59] Binding /gm (core.changegm)
[12:06:59] Binding /gotoworld (core.gotoworld)
[12:06:59] Binding /coords (core.coords)
[12:06:59] Binding /viewdistance (core.viewdistance)
[12:06:59] Binding /regeneratechunk (core.regeneratechunk)
[12:07:00] Core: loaded 219 item names.
[12:07:00] cWebPlugin::cWebPlugin()
[12:07:00] Initialized Core v.8
[12:07:00] Loaded 1 plugin(s)
[12:07:00] Loading MonsterConfig...
[12:07:00] Starting Authenticator...
[12:07:00] Starting server...
[12:07:00] ServerListenThread
[12:07:00] Starting InputThread...
[12:07:00] ServerTickThread
[12:07:00] Initialization done, server running now.
so, 10 second startup time...

ghans
Posts: 7871
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Minecraft

Sun Jun 10, 2012 11:19 am

Does anybody have news about the client version ?
Perhaps Minecraft Classic ?

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

CrysisLTU
Posts: 23
Joined: Tue May 29, 2012 11:43 am

Re: Minecraft

Sun Jun 10, 2012 7:43 pm

The easiest way to run Minecraft would be to wait for an Android port and run Minecraft: Pocket Edition.

Swiftek
Posts: 25
Joined: Fri May 25, 2012 12:10 am

Re: Minecraft

Fri Jun 29, 2012 4:27 pm

phrasz wrote:As an FYI to some of your guys' questions regarding a client version of minecraft:
The lwjgl does not support arm natives. In neither the prebuilt/sourceforge hosted files nor the apache maven repositories.
...
SO if anyone knows how to rebuild lwjgl for arm I am listening :)
I'm new to Linux, and I'm also interested in running the Minecraft client on a Pi. I'm using the standard Debian "Squeeze" distro d/l'd from here, and I found this (useful?):
http://packages.debian.org/search?suite ... ords=lwjgl

User avatar
kokakoda
Posts: 5
Joined: Sat Dec 24, 2011 5:37 pm
Location: Zero page
Contact: Website

Re: Minecraft

Sat Jun 30, 2012 8:51 am

CrysisLTU wrote:The easiest way to run Minecraft would be to wait for an Android port and run Minecraft: Pocket Edition.
I second this, but I'd rather see one of the numerous clones get to the point where it's a viable alternative. Bonus points if it's not Java-based. :D
less /dev/brain | tail > /dev/null

GizmoTheGreen
Posts: 27
Joined: Mon Jul 16, 2012 12:39 pm

Re: Minecraft

Mon Jul 16, 2012 1:14 pm

http://lwjgl.org/forum/index.php?topic=3440.0

thread about some work on lwjgl for arm devices using opengl es 2

GizmoTheGreen
Posts: 27
Joined: Mon Jul 16, 2012 12:39 pm

Re: Minecraft

Thu Jul 19, 2012 9:55 pm

compiled and ran... i get invalid codes and get kicked?

clean 1.2.5 mc

6677
Posts: 383
Joined: Wed Mar 14, 2012 9:23 pm

Re: Minecraft

Fri Jul 20, 2012 3:02 pm

No idea why people are even trying the minecraft client on the pi, its a bit of a resource hog on far more powerful systems than the pi.

Minetest is probably the most viable clone I can think of.

rotwhip3
Posts: 3
Joined: Wed Aug 01, 2012 9:14 pm

Re: Minecraft

Wed Aug 01, 2012 9:19 pm

question: will the raspberry pi evn RUN minecraft?
im ok with not being able to run a server, but i want to be able to run the game itself.
if it can run it, what FPS would i be expecting?

THANKS

rotwhip3
Posts: 3
Joined: Wed Aug 01, 2012 9:14 pm

Re: Minecraft

Wed Aug 01, 2012 9:24 pm

HansH wrote:Well I never played minecraft, but my son did, so he tried it out, worked ok
Performance was fine, first startup took a while, but after that it behaved well enough.

I used raspbian as OS, as a console based server (so no X)
was this just a standard game? single player or multiplayer joining a server or both?

thanks

rotwhip3
Posts: 3
Joined: Wed Aug 01, 2012 9:14 pm

Re: Minecraft

Wed Aug 01, 2012 9:31 pm

6677 wrote:No idea why people are even trying the minecraft client on the pi, its a bit of a resource hog on far more powerful systems than the pi.

Minetest is probably the most viable clone I can think of.
well I'm looking towards the pi for minecraft because my last computer broke and I'm a bit short on budget to buy a new one, (the cheapest one being $216). Plus, the pi looks very promising in a number of ways, price included.

CrysisLTU
Posts: 23
Joined: Tue May 29, 2012 11:43 am

Re: Minecraft

Thu Aug 02, 2012 6:49 am

rotwhip3 wrote:question: will the raspberry pi evn RUN minecraft?
im ok with not being able to run a server, but i want to be able to run the game itself.
if it can run it, what FPS would i be expecting?

THANKS
It wont run.

ryanteck
Posts: 77
Joined: Mon Apr 16, 2012 10:49 am
Location: Great Yarmouth , United Kingdom
Contact: Website

Re: Minecraft

Thu Aug 02, 2012 12:20 pm

I have a server fully working on it and will be posting the IP address later :)

CrysisLTU
Posts: 23
Joined: Tue May 29, 2012 11:43 am

Re: Minecraft

Thu Aug 02, 2012 1:09 pm

ryanteck wrote:I have a server fully working on it and will be posting the IP address later :)
I had a server running too. Only a few players can play though :/

tbar
Posts: 98
Joined: Thu Nov 24, 2011 6:10 am

Re: Minecraft

Thu Aug 02, 2012 2:39 pm

CrysisLTU wrote:
ryanteck wrote:I have a server fully working on it and will be posting the IP address later :)
I had a server running too. Only a few players can play though :/
Which server did you run? The official or MCServer (from mc-server.org)?

mccada
Posts: 1
Joined: Fri Aug 03, 2012 8:51 pm

Re: Minecraft

Fri Aug 03, 2012 9:05 pm

It took a little figuring out, but I have a Minecraft server running quite nicely. To be specific MBI'm runnng the Bukkit server, but it shouldn't make too much of a difference.

To get it running decently, there are a couple of things that will make a huge difference.

*Use a fast SD card. The first time I tried using a Class 4 which was way too slow, Class 10 works far better.
*Use an optimized image that takes advantage of the floating point unit in the ARM processor. I found the new Raspbian image with hard float worked a lot quicker.
*Use a 192/32MB RAM split, giving less memory to the GPU, and run the server from the command line. You're going to need all the memory you can get!
*Use the java command to limit the RAM usage. I used java -Xmx192M -Xms192M -jar craftbukkit.jar If you're using MCserver, change the name of the .jar file in the command. This allows the server to utilize up to 192MB of RAM.

I also used the NoSpawn plugin for Bukkit server to lower the block spawning. Any questions feel free to ask!

tbar
Posts: 98
Joined: Thu Nov 24, 2011 6:10 am

Re: Minecraft

Sat Aug 04, 2012 6:23 am

mccada wrote: *Use a 192/32MB RAM split, giving less memory to the GPU, and run the server from the command line. You're going to need all the memory you can get!
You can specify a 240/16MB RAM split using rpi-update: https://github.com/Hexxeh/rpi-update/
It could very well already be present in the Raspbian image you are using and you then just execute:

Code: Select all

rpi-update 240

shiroitaka
Posts: 4
Joined: Sat Aug 04, 2012 9:06 am

Re: Minecraft

Sat Aug 04, 2012 9:13 am

Sorry to be a total noob but do I type the svn commands at terminal to make this work?
Thanks for all your work on this it sounds like a fantastic idea for a cheap server :)
tbar wrote:
qlobthehorse wrote:I'd love to have a copy of the compiled server -- I'm receiving my Pi tonight. I can test performance with 2 people.
It's not that hard to compile from source. To pull the latest revision from the repository do the following:
This will retrieve the latest source to the directory mc-server-read-only. Cd to this directory and execute:
  • make release=1
This will produce the executable MCServer which you can run like so:
  • ./MCServer
You might need to edit world.ini and other .ini-files to get it to work. Check out the wiki at http://www.mc-server.org/wiki or the forums at http://forum.mc-server.org if you are having problems.

Also remember that the RPi is only equipped with 256 MB RAM so you need to use a firmware file which dedicates as much RAM as possible to the CPU. MCServer seems to require approx 180 MB RAM for one user (and approx 50 MB per additional user)...

shiroitaka
Posts: 4
Joined: Sat Aug 04, 2012 9:06 am

Re: Minecraft

Sat Aug 04, 2012 9:27 am

Would it be possible to have a step by step guide or a download link to a preconfigured version?
Sorry to be a pest.
mccada wrote:It took a little figuring out, but I have a Minecraft server running quite nicely. To be specific MBI'm runnng the Bukkit server, but it shouldn't make too much of a difference.

To get it running decently, there are a couple of things that will make a huge difference.

*Use a fast SD card. The first time I tried using a Class 4 which was way too slow, Class 10 works far better.
*Use an optimized image that takes advantage of the floating point unit in the ARM processor. I found the new Raspbian image with hard float worked a lot quicker.
*Use a 192/32MB RAM split, giving less memory to the GPU, and run the server from the command line. You're going to need all the memory you can get!
*Use the java command to limit the RAM usage. I used java -Xmx192M -Xms192M -jar craftbukkit.jar If you're using MCserver, change the name of the .jar file in the command. This allows the server to utilize up to 192MB of RAM.

I also used the NoSpawn plugin for Bukkit server to lower the block spawning. Any questions feel free to ask!

CrysisLTU
Posts: 23
Joined: Tue May 29, 2012 11:43 am

Re: Minecraft

Sat Aug 04, 2012 1:44 pm

tbar wrote:
CrysisLTU wrote:
ryanteck wrote:I have a server fully working on it and will be posting the IP address later :)
I had a server running too. Only a few players can play though :/
Which server did you run? The official or MCServer (from mc-server.org)?
MCServer.

Return to “Gaming”