Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

Can i automatically generate chunks in an area?


  • Please log in to reply
95 replies to this topic

#1

Corrodias

Posted 05 November 2010 - 01:10 AM

Minecraft Land Generator version 1.2.0
This thread is the current home of the Minecraft Land Generator program. The post for the current version is here:
viewtopic.php?f=1012&t=76563&p=1299186#p1299186

ORIGINAL POST
I would like to have all of the chunks within, say, 200 blocks of the spawn filled in on my world, so i can make a nice map. Is there any way to do this without walking around manually? I didn't see anything in a search that looked likely.

Register or log in to remove.

#2

Kane_Hart
    Kane_Hart

    Forum/Wiki Sponsor

  • Curse Premium
  • Curse Premium
  • 1674 posts
  • Location: Barrie Ontario Canada

Posted 05 November 2010 - 03:42 AM

not sure but it would be nice if you could. Give a example I have a 16000x16000 world map but with 50+ online exploring new terrain you should see what the cpu usage is like lol.
xxxxxx

#3

Corrodias

Posted 05 November 2010 - 04:13 AM

Hm. Such a thing might require a server mod. Given the response so far, i don't have much hope of there being such a one yet.

edit: Trying to fix typos...

#4

ledhead900
  • Location: Australia
  • Minecraft: ledhead900

Posted 05 November 2010 - 06:06 AM

I'm awear that hey0's server mod support plugins and I  currently use. I'm also awear that some of these plugins do similar as to what your asking for example the Wordledit plugin basicly brings in basic MCedit tools into live servers.

#5

Corrodias

Posted 05 November 2010 - 06:19 AM

Well, that is pretty neat, but does MCEdit or this plugin let you force the generation of chunks? Jury's out. I'll take a look, though!

#6

ledhead900
  • Location: Australia
  • Minecraft: ledhead900

Posted 05 November 2010 - 06:51 AM

I actually have not dewlled to far into Worldedit so so you might want to check them both out for your self, I know it allows me to say punch in //hsphere   and it will generate a hollow sphere of the the givin perammeters.

The same can be done for replacing massive amonts of land or generating smooth land/Towers

#7

Corrodias

Posted 05 November 2010 - 07:30 AM

I have checked both now. They look quite powerful, but neither of them lets you direct the server to generate chunks using the terrain generator, from what i can tell. MCEdit lets you build empty chunks, but that's not really what i'm after. Thanks for the ideas, though.

#8

ziggo0
    ziggo0

    Forum/Wiki Sponsor

  • Members
  • 388 posts
  • Location: Indiana

Posted 05 November 2010 - 09:27 AM

The ability to force the server to generate terrain would make managing a server 100x easier. No more random RAM usage and CPU usage spikes, fked up chunks from random crashes/power outtages etc.
sigh...

#9

ledhead900
  • Location: Australia
  • Minecraft: ledhead900

Posted 05 November 2010 - 01:59 PM

ziggo0 said:

The ability to force the server to generate terrain would make managing a server 100x easier. No more random RAM usage and CPU usage spikes, fked up chunks from random crashes/power outtages etc.

Totaly agree, to be able to deceide upon first login as admin decide how big the map is and adjust a set of guildlines suchs as amount of trees,lakes,hills ect and then hit a generate map button,m POOF that is your map it does not get any biggger and its chunks are pre generated.

#10

idgarad
    idgarad

    Gold Miner

  • Members
  • 397 posts

Posted 05 November 2010 - 10:59 PM

viewtopic.php?f=1&t=75433 I'm getting closer to it.

#11

ratty
    ratty

    Forum/Wiki Sponsor

  • Members
  • 187 posts
  • Minecraft: kilorat

Posted 06 November 2010 - 01:52 AM

Just 200 blocks of the spawn? By default it draws about 300 already, so there's nothing you need to do.

For my own uses, I made a shell script in linux to:

1. Move the spawn 300 blocks over with mce
2. Start the server
3. Stop the server
4. goto 1

I was able to generate a 3000x3000 map after letting it run for awhile. Minecraft server will generate about 300 blocks or so in an area around the spawn when it starts up. And by default it will have save-on set, so you can safely just do a "stop" and it will write all of that out reliably.

I found this handy for making a better decision on starting new servers, I let people choose what area to "settle" on. Its like your in a spaceship crash landing, and you can steer the ship as its crashing. When they choose the area, I trim it to about 2000x2000 and prevent it from growing with a buffer of air, thats usually big enough for anybody. There's more, but I'm already getting way off topic.

#12

Corrodias

Posted 06 November 2010 - 05:30 AM

It is not my experience that the server generates land nearly that far out. Alpha Vespucci yet shows plenty of ungenerated area within a 150-block distance. Still, yes, that's a potential method...

#13

ratty
    ratty

    Forum/Wiki Sponsor

  • Members
  • 187 posts
  • Minecraft: kilorat

Posted 06 November 2010 - 05:45 AM

I wanted to make sure I got my facts straight, it generates an area of 336x336 around the spawn. So that's 168 blocks in each direction.

Nobody even has to even connect to the server for it to do this. I'm letting it run right now to make a 6000x6000 map to see what that looks like. And there are no gaps when I move the spawn 300 blocks at a time in a grid pattern.

Note that spawn location, and locations players are while exploring are different concepts that shouldn't be confused with each other. When the server starts up, we've all seen this message:

2010-11-05 22:34:16 [INFO] Preparing start region
Preparing spawn area: 0%
Preparing spawn area: 4%
Preparing spawn area: 9%
Preparing spawn area: 14%
Preparing spawn area: 19%
Preparing spawn area: 23%
Preparing spawn area: 28%

and so on.
It is that feature I am exploiting to make it generate huge areas of terrain.

#14

rush
    rush

    Tree Puncher

  • Members
  • 33 posts

Posted 06 November 2010 - 09:39 AM

Are you able to give some more detail on how you are doing this with mce, I haven't been able to work out how to move the spawn with it.

#15

ratty
    ratty

    Forum/Wiki Sponsor

  • Members
  • 187 posts
  • Minecraft: kilorat

Posted 06 November 2010 - 09:57 AM

for example:
python mce.py /home/minecraft/world spawn -300 64 -200

Here's my 6000x6000 (not exact, its a little over) I made with it, took a few hours, but I ran it on one of my slower servers.
http://minecraft.nom...p/world6000.png
I could post a shell script to do it, but its really customized for my setup and would need some cleanup. Hopefully someone else just takes my idea of updating level.dat with new spawn coordinates and looping the server and makes a proper polished program to just do it for people. I'll post mine if there's interest though, it is smart but its not pretty.

#16

rush
    rush

    Tree Puncher

  • Members
  • 33 posts

Posted 06 November 2010 - 11:01 AM

ratty said:

I'll post mine if there's interest though, it is smart but its not pretty.

I'd love to see it to get some ideas, I've got it going abit now but the result isn't coming out too well.

#17

ratty
    ratty

    Forum/Wiki Sponsor

  • Members
  • 187 posts
  • Minecraft: kilorat

Posted 06 November 2010 - 04:33 PM

Here's what I did, and this is all in linux.

Start the server manually, then quit it.

Copy the level.dat to another directory, I called that world2.
Reason: If you point mce at a directory with just level.dat, it can change the spawn location without having to enumerate all the chunk files, which it will ignore anyway. It saves a lot of time.

my paths:

~/data/world2 - directory with just a copy of the level.dat
~/testserver/world - world directory of our new world we're making
~/pymclevel - where mce is installed
~/testserver - install of minecraft. I recommend no mods at all. I also have multiplexer installed in this directory.
/usr/bin/python26 - that is where I have python 2.6, so if you see "python26" in my script, rename that to your python binary name.

seq -50 300 10000 > /tmp/x.txt
seq -50 300 10000 > /tmp/y.txt

for x in `cat /tmp/x.txt`
do
  for y in `cat /tmp/y.txt`
  do

cd ~/pymclevel
python26 mce.py ~/data/world2 spawn $x 128 $y
cp ~/data/world2/level.dat ~/testserver/world/level.dat
cd ~/testserver
echo stop | ./multiplexer.py
echo sleeping for 1
sleep 1
done
echo syncing
sync
done
rm -f /tmp/x.txt /tmp/y.txt

Multiplexer is here

viewtopic.php?f=1012&t=25194

Tip:

python26 mce.py ~/data/world worldsize

#18

ratty
    ratty

    Forum/Wiki Sponsor

  • Members
  • 187 posts
  • Minecraft: kilorat

Posted 07 November 2010 - 12:56 AM

Just to see what it would look like, here is a 20000x20000 world, scaled to 10% size for the image since I dont think you want to view a 130MB image that's 20k height/width.

http://www.reddit.co... ... minecraft/

#19

Koitenshin
    Koitenshin

    Lapis Lazuli Collector

  • Members
  • 1128 posts
  • Minecraft: Koitenshin

Posted 07 November 2010 - 04:56 AM

Much better title, "Notch forgot the ocean"

Thanks for the picture ratty, very informative.
Read me if you just can't build something

maplestory23 said:

I'm scared....I read the above post and understood more than half of it.....
Posted Image

#20

Kane_Hart
    Kane_Hart

    Forum/Wiki Sponsor

  • Curse Premium
  • Curse Premium
  • 1674 posts
  • Location: Barrie Ontario Canada

Posted 07 November 2010 - 06:47 AM

would this be possible then also replace the new chunks with my old world (same level.dat) and should have everything perfect?
xxxxxx