Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

I want to create a new world on our Minecraft server, but exploring a new map and generating terrain causes massive lag.

Is there a way to pre generate the chunks (with the default map generator) in a specific radius around the spawn?

I'm looking for a Bukkit plugin or tool I can use on our Linux machine. An offline tool I can run on my local machine is ok, too.

share|improve this question

5 Answers 5

up vote 27 down vote accepted

In this thread on Reddit, I found a command line script that will generate terrain by repeatedly restarting a server with varying spawn points until the area you specify is filled. This seems like just what you're looking for.

There's also a Bukkit plugin named WorldGenerationControl which can do it on a live server.

share|improve this answer
1  
for future readers, command line script (gist) doesn't exist and WGC is outdated –  dmnc May 8 '13 at 18:03
    
Boo. That's disappointing. –  Brant May 8 '13 at 19:04

A totally vanilla way would be to generate a world in singleplayer and explore that manually. This will be a lot of work of course :)

I am not aware of any other methods.

share|improve this answer
8  
If you do that it's much faster to do so in Creative mode, where you can fly and make maps at any points to keep track of your progress. Filling in a map takes about 10 minutes in flight for ~25 MB of chunks. –  badp Oct 12 '11 at 15:54
1  
This can be combined with Single Player Commands' teleport commands to dramatically lower the time needed. –  Ben Blank Oct 12 '11 at 16:47

Minecraft Land Generator:

expands your current vanilla (or modded if you have the server mods) world.

http://www.minecraftforum.net/topic/187737-minecraft-land-generator/

share|improve this answer
    

It's slow, but you can automatically teleport yourself across all the chunks in a specific area of the map to have them generated using Python and the pexpect module (which I've used to send the teleport commands).

First, make a copy of your game data for testing purposes, then open a command prompt at that directory and do the following:

$ virtualenv venv

$ source venv/bin/activate

$ pip install pexpect

Paste this code into teleport-expect.py (adjust playername and the xcoord and zcoord ranges):

#!/usr/bin/python

import sys
import pexpect

# set this to your minecraft username
playername='yourplayername'

child = pexpect.spawn('java -Xms2048M -Xmx2048M -jar minecraft_server.jar nogui')
child.logfile = sys.stdout
child.expect('%s joined the game' % playername)
child.sendline('gamemode 1 %s' % playername)

for xcoord in range(1000000, 1005000, 16):
    for zcoord in range(1000000, 1005000, 16):
        child.sendline('tp %s %i 255 %i' % (playername, xcoord, zcoord))
        child.expect('Teleported %s' % playername)
child.sendline('say all done!')

$ python teleport-expect.py

Once the server starts, login to the game. You should see your player automatically being teleported one chunk at a time across the area of interest. Visiting a 5000x5000 area will take multiple hours to run.

It's not a fast way to generate a map, but neat to see the scenery fly by. I mainly wanted to test running the Minecraft server inside a pexpect session. Lots of potential for other automation (say, watching for user-created commands on a vanilla server)!

share|improve this answer

The WorldBorder plugin for Bukkit lets you set a predefined map size (measured in radius from spawn), and optionally autogenerate the terrain within your borders.

It automatically generates terrain in the background while the server is running. It took about 24 hours to generate my 3000 block radius round world on a quad core server with 4GB allocated to Minecraft. It seemed like memory was the limiting factor - it would chug along faster than Java's GC routines and have to pause periodically to wait for memory to free up again. Forcing a server restart when memory usage got high did speed it up, but in the end I just ignored it and it managed to finish on it's own.

share|improve this answer
1  
I recommend to use WorldGenerationControl, it is much faster! We combined booth plugins on our server, WorldGenerationControl to generate the world and WorldBorder to keep it in size. –  Fox32 Dec 10 '11 at 13:04
    
@Fox32 I'll have to check that out, thanks. –  Saiboogu Dec 10 '11 at 22:37
    
WorldBorder plugin is now outdated –  dmnc May 8 '13 at 18:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.