Skip to content
Browse files

Merge pull request #74 from est31/deleteblocks

Add //deleteblocks command
  • Loading branch information
Uberi committed Feb 21, 2015
2 parents 4336e7c + bea38a1 commit c1bd4986b040d1943a8b5f93a44db72f55dd152d
Showing with 21 additions and 0 deletions.
  1. +6 −0
  2. +15 −0 worldedit_commands/init.lua
@@ -98,6 +98,12 @@ Display the volume of the current WorldEdit region.


### `//deleteblocks`

Delete the MapBlocks (16x16x16 units) that contain the selected region. This means that mapgen will be invoked for that area. As only whole MapBlocks get removed, the deleted area is usually larger than the selected one. Also, mapgen can trigger mechanisms like mud reflow or cavegen, which affects nodes (up to 112 nodes away) outside the MapBlock, so dont use this near buildings.


### `//set <node>`

Set the current WorldEdit region to `<node>`.
@@ -277,6 +277,21 @@ minetest.register_chatcommand("/volume", {

minetest.register_chatcommand("/deleteblocks", {
params = "",
description = "remove all MapBlocks (16x16x16) containing the selected area from the map",
privs = {worldedit=true},
func = safe_region(function(name, param)
local pos1, pos2 = worldedit.pos1[name], worldedit.pos2[name]
local success = minetest.delete_area(pos1, pos2)
if success then
worldedit.player_notify(name, "Area deleted.")
worldedit.player_notify(name, "There was an error during deletion of the area.")

minetest.register_chatcommand("/set", {
params = "<node>",
description = "Set the current WorldEdit region to <node>",

0 comments on commit c1bd498

Please sign in to comment.