update biome_lib

master
Vanessa Dannenberg 2021-03-30 02:25:15 -04:00
parent 7469248ae6
commit 94276be314
4 changed files with 20 additions and 7 deletions

View File

@ -1,3 +0,0 @@
default
intllib?

View File

@ -1,4 +1,4 @@
-- Biome library mod by Vanessa Ezekowitz
-- Biome library mod by VanessaE
--
-- I got the temperature map idea from "hmmmm", values used for it came from
-- Splizard's snow mod.

View File

@ -1,2 +1,4 @@
name = biome_lib
min_minetest_version = 5.2.0
depends = default
optional_depends = intllib

View File

@ -52,9 +52,23 @@ function biome_lib:find_open_side(pos)
return nil
end
-- "Record" the chunks being generated by the core mapgen
-- "Record" the map chunks being generated by the core mapgen,
-- split into individual mapblocks to reduce lag
minetest.register_on_generated(function(minp, maxp, blockseed)
biome_lib.blocklist_aircheck[#biome_lib.blocklist_aircheck + 1] = { minp, maxp }
biome_lib.blocklist_no_aircheck[#biome_lib.blocklist_no_aircheck + 1] = { minp, maxp }
for x = 0, 5 do
local minx = minp.x + x*16
for y = 0, 5 do
local miny = minp.y + y*16
for z = 0, 5 do
local minz = minp.z + z*16
local bmin = {x=minx, y=miny, z=minz}
local bmax = {x=minx + 15, y=miny + 15, z=minz + 15}
biome_lib.blocklist_aircheck[#biome_lib.blocklist_aircheck + 1] = { bmin, bmax }
biome_lib.blocklist_no_aircheck[#biome_lib.blocklist_no_aircheck + 1] = { bmin, bmax }
end
end
end
end)