Workaround for plantlife bug.

This commit is contained in:
Splizard 2014-06-05 15:49:24 +12:00
parent 848f30543d
commit 1cc2c6758b
1 changed files with 19 additions and 13 deletions

View File

@ -121,6 +121,8 @@ minetest.register_on_generated(function(minp, maxp, seed)
end
end]]
local write_to_map = false
--Loop through chunk.
for x = minp.x, maxp.x do
for z = minp.z, maxp.z do
@ -135,6 +137,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
end
if in_biome then
write_to_map = true
local perlin2 = env:get_perlin(322345,3, 0.5, 80)
local icetype = perlin2:get2d({x=x, y=z})
@ -259,6 +262,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
end
end
if write_to_map then
vm:set_data(data)
vm:calc_lighting(
@ -267,6 +271,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
)
vm:write_to_map(data)
vm:update_map()
if debug then
@ -274,5 +279,6 @@ minetest.register_on_generated(function(minp, maxp, seed)
print(biome_string.." and "..biome2_string..": Snow Biome Genarated near x"..minp.x.." z"..minp.z)
print(string.format("elapsed time: %.2fms", (os.clock() - t1) * 1000))
end
end
--end
end)