Extra tools and commands to extend WorldEdit for Minetest
Go to file
2020-05-03 17:02:28 +01:00
worldeditadditions Patch maze3d to support the path dimennsion settings, but there's some weirdness going on 2020-05-03 17:02:28 +01:00
worldeditadditions_commands Patch maze3d to support the path dimennsion settings, but there's some weirdness going on 2020-05-03 17:02:28 +01:00
.gitignore Initial commit 2018-05-20 14:19:21 +01:00
FUNDING.yml add funding.yml 2020-05-01 23:48:05 +01:00
LICENSE Initial commit 2018-05-20 14:19:21 +01:00
modpack.txt It doesn't have any syntax errors, so I guess there's only one way to find out if it actually works :P 2018-05-20 11:52:16 +01:00
README.md //maze: add path_length and path_width support 2020-05-03 16:19:42 +01:00
screenshot.png Add screenshot 2019-05-30 11:44:33 +01:00

Minetest-WorldEditAdditions

Extra tools and commands to extend WorldEdit for Minetest

If you can dream of it, it probably belongs here!

Screenshot

Current commands:

Quick Reference:

//floodfill [<replace_node> [<radius>]]

Floods all connected nodes of the same type starting at pos1 with <replace_node> (which defaults to water_source), in a sphere with a radius of (which defaults to 50).

//floodfill
//floodfill water_source 50
//floodfill glass 25

//overlay <node_name>

Places <replace_node> in the last contiguous air space encountered above the first non-air node. In other words, overlays all top-most nodes in the specified area with <replace_node>.

Will also work in caves, as it scans columns of nodes from top to bottom, skipping every non-air node until it finds one - and only then will it start searching for a node to place the target node on top of.

Note that all-air columns are skipped - so if you experience issues with it not overlaying correctly, try //expand down 1 to add an extra node's space to your defined region.

//overlay grass
//overlay glass
//overlay grass_with_dirt

//ellipsoid <rx> <ry> <rz> <node_name>

Creates a solid ellipsoid at position 1 with the radius (rx, ry, rz).

//ellipsoid 10 5 15 ice
//ellipsoid 3 5 10 dirt
//ellipsoid 20 10 40 air

//hollowellipsoid <rx> <ry> <rz> <node_name>

Creates a hollow ellipsoid at position 1 with the radius (rx, ry, rz). Works the same way as //ellipsoid does.

//hollowellipsoid 10 5 15 glass
//hollowellipsoid 21 11 41 stone

//torus <major_radius> <minor_radius> <node_name>

Creates a solid torus at position 1 with the specified major and minor radii. The major radius is the distance from the centre of the torus to the centre of the circle bit, and the minor radius is the radius of the circle bit.

//torus 15 5 stone
//torus 5 3 meselamp

//hollowtorus <major_radius> <minor_radius> <node_name>

Creates a hollow torus at position 1 with the radius major and minor radii. Works the same way as //torus does.

//hollowtorus 10 5 glass
//hollowtorus 21 11 stone

//maze <replace_node> [<path_length> [<path_width> [<seed>]]]

Generates a maze using replace_node as the walls and air as the paths. Uses an algorithm of my own devising. It is guaranteed that you can get from every point to every other point in generated mazes, and there are no loops.

Requires the currently selected area to be at least 3x3x3.

The optional path_length and path_width arguments require additional explanation. When generating a maze, a multi-headed random walk is performed. When the generator decides to move forwards from a point, it does so path_length nodes at a time.

path_width is easier to explain. It's basically the number of nodes wide the path generated is.

Note that path_width must always be at least 1 less than the path_height in order to operate normally.

The last example below shows how to set the path length and width:

//maze ice
//maze stone 1234
//maze dirt 56789 4 2

//maze3d <replace_node> [<seed>]

Same as //maze, but adapted for 3d - has all the same properties. Note that currently there's no way to adjust the height of the passageways generated (you'll need to scale the generated maze afterwards).

Requires the currently selected area to be at least 3x3 on the x and z axes.

//maze glass
//maze bush_leaves 12345

//multi <command_a> <command_b> <command_c> .....

Executes multi chat commands in sequence. Intended for WorldEdit commands, but does work with others too. Don't forget a space between commands!

//multi //1 //2 //shift z -10 //sphere 5 sand //shift z 20 //ellipsoid 5 3 5 ice
//multi //1 //hollowtorus 30 5 stone //hollowtorus 20 3 dirt //torus 10 2 dirt_with_grass
//multi /time 7:00 //1 //outset h 20 //outset v 5 //overlay dirt_with_grass //1 //2 //sphere 8 air //shift down 1 //floodfill //reset

//yy

Confirms the execution of a command if it could potentially affect a large number of nodes and take a while. Equivalent to WorldEdit's //y, but because of security sandboxing issues it's not really possible to hook into WorldEdit's existing command.

//yy

//nn

Prevents the execution of a command if it could potentially affect a large number of nodes and take a while. Equivalent to WorldEdit's //y, but because of security sandboxing issues it's not really possible to hook into WorldEdit's existing command.

//nn

Contributing

Contributions are welcome! Please state in your pull request(s) that you release your contribution under the Mozilla Public License 2.0.

Please also make sure that the logic for every new command has it's own file. For example, the logic for //floodfill goes in worldeditadditions/floodfill.lua, the logic for //overlay goes in worldeditadditions/overlay.lua, etc.

License

This mod is licensed under the Mozilla Public License 2.0, a copy of which (along with a helpful summary as to what you can and can't do with it) can be found in the LICENSE file in this repository.

If you'd like to do something that the license prohibits, please get in touch as it's possible we can negotiate something.