Instead of line numbers i'll make this clearer.
There are two blocks of code to remove, one in the '-- chunk generation' section and one in the '-- overgeneration' section, each block looks like this:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
elseif y > YSAND
and ((not wood and density < 0 and under[si] ~= 0)
or (wood and densitybase > trsand * 2 and densitybase < trsand * 2 + 0.002))
and (((n_patha >= 0 and n_xprepatha < 0) or (n_patha < 0 and n_xprepatha >= 0)) -- patha
or ((n_patha >= 0 and n_zprepatha < 0) or (n_patha < 0 and n_zprepatha >= 0))
or ((n_pathb >= 0 and n_xprepathb < 0) or (n_pathb < 0 and n_xprepathb >= 0)) -- pathb
or ((n_pathb >= 0 and n_zprepathb < 0) or (n_pathb < 0 and n_zprepathb >= 0))) then
if wood and math.random() < 0.1 then
local vi = area:index(x, y-2, z)
for j = 1, 16 do
data[vi] = c_wood
vi = vi - emerlen
end
end
for k = -1, 1 do
local vi = area:index(x-1, y-1, z+k)
for i = -1, 1 do
if wood then
data[vi] = c_wood
else
data[vi] = c_path
end
vi = vi + 1
end
end
stable[si] = 0
under[si] = 0
Immediately after the second block is an 'elseif' statement which needs to be edited to 'if'. So the '-- overgeneration' section should look like this:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
elseif chunkxz and y == y1 + 1 then -- overgeneration
if density < 0 and under[si] ~= 0 then
if under[si] == 1 and nodid ~= c_path and nodidu ~= c_path
and nodid ~= c_wood and nodidu ~= c_wood then
data[viu] = c_grass
end
end
end
Finally, a new thing to mention, to remove the pathlike clearings through forests, which i suspect crazyginger72 will not like, the '-- air above surface' section should be edited to this:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
elseif density < 0 and under[si] ~= 0 then -- air above surface
if under[si] == 1 and nodid ~= c_path and nodidu ~= c_path
and nodid ~= c_wood and nodidu ~= c_wood then
if math.random() < APPCHA * n_tree and y < YPINE then
riverdev_appletree(x, y, z, area, data)
elseif math.random() < PINCHA * n_tree and y >= YPINE then
riverdev_pinetree(x, y, z, area, data)
else
data[viu] = c_grass
if math.random() < FLOCHA then
riverdev_flower(data, vi)
elseif math.random() < GRACHA * n_grass then -- grasses
data[vi] = c_grass5
end
end
end
stable[si] = 0
under[si] = 0