Tree analysis.
This commit is contained in:
parent
5dba3b99ec
commit
d5c3a8f971
2 changed files with 20 additions and 1 deletions
2
mobs.lua
2
mobs.lua
|
@ -456,7 +456,7 @@ if minetest.registered_entities["mobs:bee"] then
|
|||
run_velocity = 2,
|
||||
fall_speed = -3,
|
||||
jump = true,
|
||||
view_range = 15,
|
||||
view_range = 10,
|
||||
floats = 0,
|
||||
drops = {
|
||||
{name = "mobs:honey", chance = 2, min = 1, max = 2},
|
||||
|
|
19
treegen.lua
19
treegen.lua
|
@ -280,6 +280,16 @@ minetest.register_craft({
|
|||
local tree_noise_1 = {offset = 0, scale = 1, seed = 7227, spread = {x = 10, y = 10, z = 10}, octaves = 3, persist = 1, lacunarity = 2}
|
||||
local wood_noise = {offset = 0, scale = 1, seed = -4640, spread = {x = 32, y = 32, z = 32}, octaves = 4, persist = 0.7, lacunarity = 2}
|
||||
|
||||
--local totals = {}
|
||||
--local interest = {}
|
||||
--interest['fun_caves:tree'] = true
|
||||
--interest['fun_caves:ironwood'] = true
|
||||
--interest['fun_caves:diamondwood'] = true
|
||||
--interest['fun_caves:bark'] = true
|
||||
--interest['fun_caves:weightless_water'] = true
|
||||
--interest['fun_caves:sap'] = true
|
||||
--interest['fun_caves:tree_mineral'] = true
|
||||
|
||||
|
||||
fun_caves.treegen = function(minp, maxp, data, p2data, area, node)
|
||||
if not (minp and maxp and data and p2data and area and node and type(data) == 'table' and type(p2data) == 'table') then
|
||||
|
@ -381,11 +391,20 @@ fun_caves.treegen = function(minp, maxp, data, p2data, area, node)
|
|||
end
|
||||
end
|
||||
|
||||
--totals[data[ivm]] = totals[data[ivm]] and totals[data[ivm]] + 1 or 1
|
||||
|
||||
ivm = ivm + area.ystride
|
||||
index3d = index3d + csize.x
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--for key, total in pairs(totals) do
|
||||
-- local name = minetest.get_name_from_content_id(key)
|
||||
-- if interest[name] then
|
||||
-- print(name, total)
|
||||
-- end
|
||||
--end
|
||||
|
||||
return write
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue