Isocraft is a tool which creates an isometric map of a minecraft map file.
This guide will show you how you can use it to periodically make pictures of your servermap. This is usefull if you want to make short timelapse movies which shows the progress of your map or to provide a live view into your server from the web. The guide will also show you how to avoid making images if no one is on the server.
Here is sample how such a timelapse movie could look like:
So, lets start:
I assume the minecraft server is already running. If not, take a look at my guide for this.
So, first you need to get isocraft. Latest should be here.
The package contains two JAR files. We will use the timelapse.jar. If you take a look into the readme file, it will tell you that you have to include the com folder from the server.jar file into the timelapse.jar.
To do this, go to minecraft.net and download the server software. Please note: a JAR file is nothing other than a packed zip file with a different file extension. So your first task is to extract the timelapse.jar and minecraft-server.jar. Then copy the COM folder from minecraft-server.jar into the extracted folder of timelapse.jar. At last, you need to compress the folder again and name it timelapse.jar. If you did everything right, the following should work. If not, try again 😉
Now copy your modified timelapse.jar + the tileset files into the directory of your minecraft server. To test if everything worked, type the following:
java -Xms128M -Xmx1024M -cp /yourpath/timelapse.jar timelapse
If you did everything right, you should find a bmp file (which is indeed a png file) in your directory.
Our goal is that this timelapse.jar is automatically called every x-minutes. To do this, we’ll use the cron deamon. I’ve written a small bash script which takes care that the timelapse is only called when there are people on the server, otherwise it would create thousands of images which are the same. The script also copies the latest image to a seperate directory and renames the suffix to png since the file is a png file (I think the author just forget this).
The script follows:
#!/bin/bashcd /home/minecraft/server1# this checks the server.log if there are people on the serverif tail server.log -n2 | grep -c “0/” > 0thenecho “Server1 is empty”elseecho “Server1 is growded. Doing timelapse stuff”# run timelapsejava -Xms128M -Xmx1024M -cp /home/minecraft/server1/timelapse.jar timelapse# copy latest filefind /home/minecraft/server1/ -mmin -1 -type f -name “*.bmp” -exec cp “{}” /home/minecraft/isocraft/latest.png “;”fi
Save it as a textfile, name it cronscript.sh or something. Don’t forget to change the path to your needs!
Finally we need to add the script to our cronscripts. Type:
crontab -e
Add the following line if you want to run the script every minute:
*/1 * * * * /home/minecraft/cronscript.sh >/dev/null 2>&1
And thats it. I finally did a softlink from my webserver’s public directory into the directory where the latest image gets copied to:
ln -s /home/minecraft/isocraft/latest.png /var/www/public/minecraft
Any questions?