diff --git a/CHANGELOG.md b/CHANGELOG.md index 5cd860d..b8dd640 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,7 @@ Note to self: See the bottom of this file for the release template text. ### Bugfixes - - `//airapply`: Improve error handling + - `//airapply`: Improve error handling, fix safe_region node counter - `//floodfill`: Fix crash caused by internal refactoring of the `Queue` data structure - `//spop`: Fix wording in displayed message diff --git a/README.md b/README.md index 4735090..fcfc505 100644 --- a/README.md +++ b/README.md @@ -71,10 +71,10 @@ The detailed explanations have moved! Check them out [here](https://github.com/s - [`//spop`](https://worldeditadditions.mooncarrot.space/Reference/#spop) ### Measure - - [`//mface`](https://worldeditadditions.mooncarrot.space/Reference/#mface) - - [`//midpos`](https://worldeditadditions.mooncarrot.space/Reference/#midpos) - - [`//msize`](https://worldeditadditions.mooncarrot.space/Reference/#msize) - - [`//mtrig`](https://worldeditadditions.mooncarrot.space/Reference/#mtrig) + - [`//mface`](https://worldeditadditions.mooncarrot.space/Reference/#mface) _(new in v1.13)_ + - [`//midpos`](https://worldeditadditions.mooncarrot.space/Reference/#midpos) _(new in v1.13)_ + - [`//msize`](https://worldeditadditions.mooncarrot.space/Reference/#msize) _(new in v1.13)_ + - [`//mtrig`](https://worldeditadditions.mooncarrot.space/Reference/#mtrig) _(new in v1.13)_ ### Meta - [`//multi ....`](https://worldeditadditions.mooncarrot.space/Reference/#multi) @@ -82,6 +82,7 @@ The detailed explanations have moved! Check them out [here](https://github.com/s - [`//subdivide `](https://worldeditadditions.mooncarrot.space/Reference/#subdivide) - [`//ellipsoidapply `](https://worldeditadditions.mooncarrot.space/Reference/#ellipsoidapply) _(new in v1.9)_ - [`//airapply `](https://worldeditadditions.mooncarrot.space/Reference/#airapply) _(new in v1.9)_ + - [`//noiseapply2d `](https://worldeditadditions.mooncarrot.space/Reference/#noiseapply2d) _(new in v1.13)_ ### Extras - [`//y`](https://github.com/sbrl/Minetest-WorldEditAdditions/blob/main/Chat-Command-Reference.md#y) diff --git a/worldeditadditions_commands/commands/meta/airapply.lua b/worldeditadditions_commands/commands/meta/airapply.lua index c5e04df..d9478a5 100644 --- a/worldeditadditions_commands/commands/meta/airapply.lua +++ b/worldeditadditions_commands/commands/meta/airapply.lua @@ -38,8 +38,10 @@ worldedit.register_command("airapply", { return true, cmd_we, args_parsed end, nodes_needed = function(name) - local pos1, pos2 = worldedit.sort_pos(worldedit.pos1[name], worldedit.pos2[name]) - return math.ceil(4/3 * math.pi * (pos2.x - pos1.x)/2 * (pos2.y - pos1.y)/2 * (pos2.z - pos1.z)/2) + return worldedit.volume( + worldedit.pos1[name], + worldedit.pos2[name] + ) end, func = function(name, cmd, args_parsed) if not minetest.check_player_privs(name, cmd.privs) then