Remove stone layers generated in the Nether

Stone layers seem to be created by a Minetest bug:
<https://github.com/minetest/minetest/issues/9357>
This commit is contained in:
Nils Dagsson Moskopp 2022-02-12 08:44:36 +01:00
parent d6741a5e4a
commit dca72c7d97
No known key found for this signature in database
GPG Key ID: A3BC671C35191080
1 changed files with 8 additions and 2 deletions

View File

@ -2159,7 +2159,7 @@ local function basic(vm, data, data2, emin, emax, area, minp, maxp, blockseed)
if mg_name == "v6" then
nodes = minetest.find_nodes_in_area(emin, emax, {"mcl_core:water_source", "mcl_core:stone", "mcl_core:sand", "mcl_core:dirt"})
else
nodes = minetest.find_nodes_in_area(emin, emax, {"mcl_core:water_source"})
nodes = minetest.find_nodes_in_area(emin, emax, {"mcl_core:water_source", "mcl_core:stone"})
end
for n=1, #nodes do
local p_pos = area:index(nodes[n].x, nodes[n].y, nodes[n].z)
@ -2167,7 +2167,13 @@ local function basic(vm, data, data2, emin, emax, area, minp, maxp, blockseed)
data[p_pos] = c_nether_lava
lvm_used = true
elseif data[p_pos] == c_stone then
data[p_pos] = c_netherrack
-- this deals with random stone layers Minetest creates
-- see https://github.com/minetest/minetest/issues/9357
if nodes[n].y > mcl_vars.mg_bedrock_nether_top_max then
data[p_pos] = c_air -- remove stone clouds
else
data[p_pos] = c_netherrack -- remove stone
end
lvm_used = true
elseif data[p_pos] == c_sand or data[p_pos] == c_dirt then
data[p_pos] = c_soul_sand