Skip to content

Instantly share code, notes, and snippets.

@jaseg
Created August 5, 2012 17:00
Show Gist options
  • Save jaseg/3265917 to your computer and use it in GitHub Desktop.
Save jaseg/3265917 to your computer and use it in GitHub Desktop.
Minecraft World Generator

This is a small line of bash to coax a Minecraft server into generating a large rectangular piece of the world. To use it, the Minecraft server first needs to be stopped and your inventory needs to be placed in some chest. That being done, start the server with the following line (after you replaced "jaseg" with your nick):

(sleep 3m;
  echo "/gamemode creative jaseg";
  for x in $(seq 0 192 3200); do
    for z in $(seq 0 192 3200); do
      echo "/tp jaseg $x 128 $z";
      sleep 60s;
    done;
  done;
  echo "/stop")|java -jar minecraft_server.jar nogui

Then log into the server using your minecraft client. After three minutes, the process will start and, after giving you creative mode rights, the server will begin to teleport you around, one point each minute. The 1-minute delay is possibly superfluous, I added it because, on my machine the generation of 25*25 chunks takes about half a minute.

When done, that temporary server will be stopped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment