Skip to content

Instantly share code, notes, and snippets.

@fwenzel
Created September 10, 2011 20:34
Show Gist options
  • Save fwenzel/1208740 to your computer and use it in GitHub Desktop.
Save fwenzel/1208740 to your computer and use it in GitHub Desktop.
Some useful scripts for Minecraft servers: run server, and create server map with Tectonicus.
<!-- Minecraft Server property list for launchd -->
<!-- load with: `launchctl load minecraft_server.plist` or by putting it into ~/Library/LaunchAgents -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>OnDemand</key>
<false/>
<key>Label</key>
<string>net.minecraft.MinecraftServer</string>
<key>ProgramArguments</key>
<array>
<string>/Users/myself/dev/minecraft/runserver.sh</string>
</array>
</dict>
</plist>
#!/bin/bash
pushd `dirname $0`
`which screen` -dm -S minecraft -- `which java` -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
popd
<tectonicus version="2">
<config
mode = "cmd"
outputDir = './output'
>
<!-- general config options go here -->
</config>
<rasteriser>
<!-- rasteriser options go here -->
</rasteriser>
<tweeks
force64BitNatives = "true"
>
<!-- tweeks options go here -->
</tweeks>
<debug>
<!-- debug options go here -->
</debug>
<map
worldDir = "../world"
>
<!-- map options go here -->
<layer
imageFormat = "jpg"
imageCompressionLevel = "0.8"
>
<!-- layer options go here -->
</layer>
<!-- additional layers go here -->
</map>
<!-- additional maps go here -->
</tectonicus>
#!/bin/bash
pushd `dirname $0`
java -jar Tectonicus.jar config=config.xml
mv output/{map,index}.html
## Copy final product onto a webserver somewhere
# rsync -r --delete --rsh=ssh output/ myserver:public_html/map
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment