diff --git a/mods/biome_lib/depends.txt b/mods/biome_lib/depends.txt deleted file mode 100644 index c48fe0d0..00000000 --- a/mods/biome_lib/depends.txt +++ /dev/null @@ -1,3 +0,0 @@ -default -intllib? - diff --git a/mods/biome_lib/init.lua b/mods/biome_lib/init.lua index ec57bc29..aefc9f1b 100644 --- a/mods/biome_lib/init.lua +++ b/mods/biome_lib/init.lua @@ -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. diff --git a/mods/biome_lib/mod.conf b/mods/biome_lib/mod.conf index 033b72e9..b3312f63 100644 --- a/mods/biome_lib/mod.conf +++ b/mods/biome_lib/mod.conf @@ -1,2 +1,4 @@ name = biome_lib min_minetest_version = 5.2.0 +depends = default +optional_depends = intllib diff --git a/mods/biome_lib/search_functions.lua b/mods/biome_lib/search_functions.lua index d665b5fe..1f11476d 100644 --- a/mods/biome_lib/search_functions.lua +++ b/mods/biome_lib/search_functions.lua @@ -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)