1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-06-28 14:16:06 +02:00

Optimize darkage with VoxelManip

This commit is contained in:
Gael-de-Sailly
2015-10-18 18:09:13 +02:00
parent 10220ae09d
commit b29f824f46
2 changed files with 132 additions and 83 deletions

View File

@ -244,6 +244,7 @@ dofile(minetest.get_modpath("watershed").."/functions.lua")
-- Mapchunk generation function
local global_seed
function watershed_chunkgen(x0, y0, z0, x1, y1, z1, area, data)
local c_air = minetest.get_content_id("air")
local c_ignore = minetest.get_content_id("ignore")
@ -698,6 +699,8 @@ function watershed_chunkgen(x0, y0, z0, x1, y1, z1, area, data)
end
nixz = nixz + sidelen
end
darkage_mapgen(data, area, {x=x0, y=y0, z=z0}, {x=x1, y=y1, z=z1}, global_seed) -- Generate darkage ores
end
@ -753,6 +756,7 @@ minetest.register_chatcommand("regen",{
-- On generated function
minetest.register_on_generated(function(minp, maxp, seed)
global_seed = seed
if minp.y < YMIN or maxp.y > YMAX then
return
end