Skip to content

Instantly share code, notes, and snippets.

@deckerego
Last active November 2, 2016 14:29
Show Gist options
  • Save deckerego/7833068 to your computer and use it in GitHub Desktop.
Save deckerego/7833068 to your computer and use it in GitHub Desktop.
Script to generate Minecraft maps using Tectonicus
#!/bin/sh
FILENAME="$1"
BINARY="bin/Tectonicus_v2.15.jar"
if [[ -z $FILENAME ]]; then
echo "Usage: $0 FILENAME"
exit -1
fi
echo "Searching for level.dat, please wait..."
if [[ -z `tar tvjf "$FILENAME" | egrep ".*level\.dat$"` ]]; then
echo "Cannot find level.dat! Exiting..."
exit -2
fi
rm -r -f opt
tar xvjf "$1" opt
java -mx2048m -jar "$BINARY" config=mapConfig.xml
<?xml version="1.0" encoding="UTF-8"?>
<tectonicus version="2">
<config mode="cmd" outputDir="./Map" outputHtmlName="map.html" minecraftJar="/Users/username/Library/Application Support/minecraft/bin/minecraft.jar" texturePack="/Users/username/Library/Application Support/minecraft/bin/minecraft.jar" numZoomLevels="4" singlePlayerName="UserName" spawnInitiallyVisible="true" playersInitiallyVisible="true" bedsInitiallyVisible="false" signsInitiallyVisible="false" portalsInitiallyVisible="true" viewsInitiallyVisible="true" numDownsampleThreads="8" eraseOutputDir="false" useCache="true" logFile="./Shared/Minetographer/output/log.txt" />
<link title="" destination="" image="" />
<rasteriser type="lwjgl" colourDepth="16" alphaBits="8" numSamples="4" tileSize="512"/>
<map name="Terra" cameraAngle="45" cameraElevation="35" closestZoomSize="48" worldDir="./opt/minecraft/world/" dimension="terra" useBiomeColours="true">
<signs filter="special" />
<players filter="none" playerFilterFile="" />
<portals filter="all" />
<views filter="all" imageFormat="jpg" imageCompressionLevel="0.8" drawDistance="200" />
<spawn show="true" />
<layer name="Terra" lighting="day" imageFormat="jpg" imageCompressionLevel="0.75" />
<layer name="Caves" lighting="cave" renderStyle="cave" imageFormat="jpg" imageCompressionLevel="0.75" />
</map>
<map name="Nether" cameraAngle="45" cameraElevation="35" closestZoomSize="48" worldDir="./opt/minecraft/world/" dimension="nether" useBiomeColours="true">
<signs filter="special" />
<players filter="none" playerFilterFile="" />
<portals filter="all" />
<views filter="all" imageFormat="jpg" imageCompressionLevel="0.8" drawDistance="200" />
<spawn show="true" />
<layer name="Nether" lighting="cave" renderStyle="cave" imageFormat="jpg" imageCompressionLevel="0.75" />
</map>
<map name="The_End" cameraAngle="45" cameraElevation="35" closestZoomSize="48" worldDir="./opt/minecraft/world/" dimension="ender" useBiomeColours="true">
<signs filter="special" />
<players filter="none" playerFilterFile="" />
<portals filter="all" />
<views filter="all" imageFormat="jpg" imageCompressionLevel="0.8" drawDistance="200" />
<spawn show="true" />
<layer name="The End" lighting="day" imageFormat="jpg" imageCompressionLevel="0.75" />
</map>
<tweeks extractLwjglNatives="true" forceLoadAwt="false" force32BitNatives="false" force64BitNatives="false" />
<!-- Debug options, you shouldn't need to tinker with these -->
<debug maxTiles="-1" />
</tectonicus>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment