diff options
Diffstat (limited to 'worldedit_commands')
-rw-r--r-- | worldedit_commands/init.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/worldedit_commands/init.lua b/worldedit_commands/init.lua index 3931df0..ad6dac8 100644 --- a/worldedit_commands/init.lua +++ b/worldedit_commands/init.lua @@ -663,7 +663,12 @@ minetest.register_chatcommand("/allocate", { local value = file:read("*a")
file:close()
- local nodepos1, nodepos2, count = worldedit.allocate(pos1, value)
+ local nodepos1, nodepos2, count
+ if value:find("{") then --old WorldEdit format
+ nodepos1, nodepos2, count = worldedit.allocate_old(pos1, value)
+ else --new WorldEdit format
+ nodepos1, nodepos2, count = worldedit.allocate(pos1, value)
+ end
worldedit.pos1[name] = nodepos1
worldedit.mark_pos1(name)
|