forked from VoxeLibre/VoxeLibre
Don't gen top snow anymore for performance reasons
This commit is contained in:
parent
58383c9db1
commit
ae3721cbc8
|
@ -940,21 +940,12 @@ minetest.register_on_generated(function(minp, maxp)
|
|||
local area = VoxelArea:new({MinEdge=emin, MaxEdge=emax})
|
||||
|
||||
-- Generate bedrock layers
|
||||
if minp.y <= BEDROCK_MAX or mg_name == "v6" then
|
||||
if minp.y <= BEDROCK_MAX then
|
||||
lvm = true
|
||||
local c_bedrock = minetest.get_content_id("mcl_core:bedrock")
|
||||
local c_void = minetest.get_content_id("mcl_core:void")
|
||||
|
||||
local max_y
|
||||
if mg_name == "v6" then
|
||||
local c_grass_block_snow = minetest.get_content_id("mcl_core:dirt_with_grass_snow")
|
||||
local c_grass_block = minetest.get_content_id("mcl_core:dirt_with_grass")
|
||||
local c_snow = minetest.get_content_id("mcl_core:snow")
|
||||
local c_air = minetest.get_content_id("air")
|
||||
max_y = maxp.y
|
||||
else
|
||||
max_y = math.min(maxp.y, BEDROCK_MAX)
|
||||
end
|
||||
local max_y = math.min(maxp.y, BEDROCK_MAX)
|
||||
|
||||
for y = minp.y, max_y do
|
||||
for x = minp.x, maxp.x do
|
||||
|
@ -994,15 +985,6 @@ minetest.register_on_generated(function(minp, maxp)
|
|||
if setdata then
|
||||
data[p_pos] = setdata
|
||||
end
|
||||
|
||||
-- Add top snow on exposed snowy grass blocks generated by the v6 mapgen
|
||||
-- FIXME: Does this work on chunk borders?
|
||||
if mg_name == "v6" then
|
||||
local p_pos_above = area:index(x, y+1, z)
|
||||
if p_pos_above and data[p_pos] == c_grass_block_snow and data[p_pos_above] == c_air then
|
||||
data[p_pos_above] = c_snow
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Reference in New Issue