forked from MineClone5/MineClone5
Fix layers
This commit is contained in:
parent
7868cf7dc5
commit
da8e92e071
|
@ -1731,10 +1731,12 @@ local function basic_safe(vm_context)
|
||||||
-- Nether block fixes:
|
-- Nether block fixes:
|
||||||
-- * Replace water with Nether lava.
|
-- * Replace water with Nether lava.
|
||||||
-- * Replace stone, sand dirt in v6 so the Nether works in v6.
|
-- * Replace stone, sand dirt in v6 so the Nether works in v6.
|
||||||
elseif emin.y <= mcl_mapgen.nether.max and emax.y >= mcl_mapgen.nether.min then
|
elseif minp.y <= mcl_mapgen.nether.max and maxp.y >= mcl_mapgen.nether.min then
|
||||||
|
-- elseif emin.y <= mcl_mapgen.nether.max and emax.y >= mcl_mapgen.nether.min then
|
||||||
if c_nether then
|
if c_nether then
|
||||||
if v6 then
|
if v6 then
|
||||||
local nodes = minetest.find_nodes_in_area(emin, emax, {"mcl_core:water_source", "mcl_core:stone", "mcl_core:sand", "mcl_core:dirt"})
|
-- local nodes = minetest.find_nodes_in_area(emin, emax, {"mcl_core:water_source", "mcl_core:stone", "mcl_core:sand", "mcl_core:dirt"})
|
||||||
|
local nodes = minetest.find_nodes_in_area(minp, maxp, {"mcl_core:water_source", "mcl_core:stone", "mcl_core:sand", "mcl_core:dirt"})
|
||||||
for n=1, #nodes do
|
for n=1, #nodes do
|
||||||
local p_pos = area:index(nodes[n].x, nodes[n].y, nodes[n].z)
|
local p_pos = area:index(nodes[n].x, nodes[n].y, nodes[n].z)
|
||||||
if data[p_pos] == c_water then
|
if data[p_pos] == c_water then
|
||||||
|
@ -1749,7 +1751,8 @@ local function basic_safe(vm_context)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local nodes = minetest.find_nodes_in_area(emin, emax, {"group:water"})
|
-- local nodes = minetest.find_nodes_in_area(emin, emax, {"group:water"})
|
||||||
|
local nodes = minetest.find_nodes_in_area(minp, maxp, {"group:water"})
|
||||||
for _, n in pairs(nodes) do
|
for _, n in pairs(nodes) do
|
||||||
data[area:index(n.x, n.y, n.z)] = c_nether.lava
|
data[area:index(n.x, n.y, n.z)] = c_nether.lava
|
||||||
end
|
end
|
||||||
|
@ -1763,9 +1766,11 @@ local function basic_safe(vm_context)
|
||||||
elseif minp.y <= mcl_mapgen.end_.max and maxp.y >= mcl_mapgen.end_.min then
|
elseif minp.y <= mcl_mapgen.end_.max and maxp.y >= mcl_mapgen.end_.min then
|
||||||
local nodes
|
local nodes
|
||||||
if v6 then
|
if v6 then
|
||||||
nodes = minetest.find_nodes_in_area(emin, emax, {"mcl_core:water_source", "mcl_core:stone", "mcl_core:sand", "mcl_core:dirt"})
|
nodes = minetest.find_nodes_in_area(minp, maxp, {"mcl_core:water_source", "mcl_core:stone", "mcl_core:sand", "mcl_core:dirt"})
|
||||||
|
-- nodes = minetest.find_nodes_in_area(emin, emax, {"mcl_core:water_source", "mcl_core:stone", "mcl_core:sand", "mcl_core:dirt"})
|
||||||
else
|
else
|
||||||
nodes = minetest.find_nodes_in_area(emin, emax, {"mcl_core:water_source"})
|
nodes = minetest.find_nodes_in_area(minp, maxp, {"mcl_core:water_source"})
|
||||||
|
-- nodes = minetest.find_nodes_in_area(emin, emax, {"mcl_core:water_source"})
|
||||||
end
|
end
|
||||||
if #nodes > 0 then
|
if #nodes > 0 then
|
||||||
lvm_used = true
|
lvm_used = true
|
||||||
|
@ -1817,6 +1822,8 @@ local function basic_safe(vm_context)
|
||||||
generate_nether_decorations(minp, maxp, blockseed)
|
generate_nether_decorations(minp, maxp, blockseed)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
vm_context.write = vm_context.write or lvm_used
|
||||||
|
|
||||||
return vm_context --, lvm_used, shadow
|
return vm_context --, lvm_used, shadow
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue