From 4ba59a6ec3d23a8c6c2e86776bf987b3433e36d0 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Tue, 23 Feb 2021 00:20:57 +0000 Subject: [PATCH] //conv, //erode: treat liquids as air --- CHANGELOG.md | 3 ++- worldeditadditions/utils/terrain.lua | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9bf1ec6..7f5ecd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,8 @@ It's about time I started a changelog! This will serve from now on as the main c - If you encounter any other issues with it over large areas (particularly 2000x150x2000 and larger), please let me know - Bugfix: Fix obscure crash in calls to `human_size` ("unknown" will now be returned if passed junk) - `//many` can now be used with commands with no arguments. - - `//fillcaves`: Treat liquids as air when filling caves in + - `//conv`, `//erode`, `//fillcaves`: Treat liquids as air + ## v1.10 (16th January 2021) - `//maze`: Fix some parts of generated mazes staying solid diff --git a/worldeditadditions/utils/terrain.lua b/worldeditadditions/utils/terrain.lua index 4032024..2875309 100644 --- a/worldeditadditions/utils/terrain.lua +++ b/worldeditadditions/utils/terrain.lua @@ -20,7 +20,7 @@ function worldeditadditions.make_heightmap(pos1, pos2, manip, area, data) -- Scan each column top to bottom for y = pos2.y+1, pos1.y, -1 do local i = area:index(x, y, z) - if not worldeditadditions.is_airlike(data[i]) then + if not (worldeditadditions.is_airlike(data[i]) or worldeditadditions.is_liquidlike(data[i])) then -- It's the first non-airlike node in this column -- Start heightmap values from 1 (i.e. there's at least 1 node in the column) heightmap[hi] = (y - pos1.y) + 1