Nephyrin / WorldGenerationControl

A Minecraft Bukkit tool to generate regions of your world at will
http://forums.bukkit.org/threads/admn-misc-worldgenerationcontrol-v2-6-generate-areas-of-your-world-at-will-1-0-1-r1-1-1dev.30238/
7 stars 4 forks source link

WorldGenerationControl 2.6

Formerly ForceGenChunks

Which is a dumb name so I changed it

This is a very simple plugin to allow you to pre-generate a region of your world. It does not affect already generated regions. As of 2.0, it can also repair lighting of existing regions.

Features

Bugs/Quirks

Commands

The /genregion (or /generateregion) command can be entered by any server op, the server console, or anyone with the appropriate permission (see below).

The syntax is:

/genregion WorldName StartX StartZ EndX EndZ

For circles (/generatecircularregion or /gencircle):

/gencircle Radius [WorldName xCenter zCenter]

The world and center coordinates for the circle command are [optional] if you are a player (not the console). It will default to your current/world position.

All coordinates are in normal, in-game coordinates - but will be adjusted to the nearest chunk boundary (inclusive).

Options

All commands can have options applied to them like so:

/gencircle 1600 MyWorld 0 0 /fast /lighting

Options are not case sensitive. The available options are:

Permissions

Permissions are optional. Server ops and the server console can always use generation commands. However, if you have permissions installed, the following permissions are used:

Examples

/genregion OurBeautifulWorld -50 -50 50 50

Would generate from -50,-50 to 50,50 in game coordinates. Simple!

/genregion "Bob and Sam's \"Awesome\" World" -50 -50 50 50

The same command for world: Bob and Sam's "Awesome" World. Quotes can be placed around world names with spaces, world names with actual quotes in them can be escaped with backlashes.

/gencircle 1000 /fast /verbose /lighting

Would generate a 1000 block radius circle around the issuing player, using the /fast speed setting, with verbose output, with lighting!

/gencircle 1000 MyWorld 100 100 /veryslow

Would generate a 1000 block radius centered in MyWorld at 100x, 100z, using the veryslow speed setting so as not to cause lag.

/gencircle 10000 MyWorld 100 100 /allAtOnce /onlyWhenEmpty

Would generate a HEUG circle centered at MyWorld 100,100 at max possible speed, but pause the generation when players join. Useful if you want your server to use 100% on generating when it would otherwise be idle.

Notes on Lighting

By default, minecraft only generates lighting info for a chunk when it is first approached by a player. This is fine, but if you want to generate an external map with something like Minecraft Overviewer, it means the areas players haven't visited will only have 'fast' lighting, with pitch black shadows.

To fix this, by default, WorldGenerationControl forces new chunks to have lighting info, as if a player were nearby. This shouldn't cause any problems, but takes about 8% more CPU-time. You can skip this step with /lighting:none -- the chunks will still be lit when a player wanders by, so this is only an issue for external tools as mentioned above.

There is also /lighting:force, which will force-generate lighting for all chunks it passes over (even those already generated and with proper lighting), which is useful for making Minecraft recalculate the lighting in areas with glitched shadows.

Using in a Script

The /quitAfter option lets this plugin be used as part of a script. For example, some users like to generate maps for a lot of random seeds to share with the community or post on /r/minecraft for delicious karma. Because Bukkit/java freaks out when EOF is encountered in input, the proper way to do this would be something like:

echo "gencircle 1000 TestWorld 0 0 /allatonce /quitafter" | cat - /dev/full | java -jar craftbukkit-0.0.1-SNAPSHOT.jar --nojline

Download

https://github.com/downloads/Nephyrin/WorldGenerationControl/WorldGenerationControl_v2.6.jar

Source

https://github.com/Nephyrin/WorldGenerationControl

ChangeLog

Compiling

cd src

javac -cp .:/path/to/bukkit net/pointysoftware/worldgenerationcontrol/WorldGenerationControl.java

zip -r WorldGenerationControl_build.jar .

My apologies for not having a proper build/ant/whatever script.

Contact

john@pointysoftware.net

License

WorldGenerationControl - Bukkit chunk preloader Copyright (C) 2011 john@pointysoftware.net

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA