mirror of
https://github.com/mt-mods/plantlife_modpack.git
synced 2025-07-07 02:20:28 +02:00
fixes
This commit is contained in:
@ -58,17 +58,14 @@ minetest.register_abm({
|
|||||||
action = function(pos, node)
|
action = function(pos, node)
|
||||||
local p_top = {x = pos.x, y = pos.y + 1, z = pos.z}
|
local p_top = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||||
local n_top = minetest.get_node_or_nil(p_top)
|
local n_top = minetest.get_node_or_nil(p_top)
|
||||||
if not n_top then return end
|
if not n_top or n_top.name ~= "air" then return end
|
||||||
if n_top.name ~= "air" then return end
|
|
||||||
|
|
||||||
local perlin_fertile_area = minetest.get_perlin(545342534, 3, 0.6, 100)
|
local perlin_fertile_area = minetest.get_perlin(545342534, 3, 0.6, 100)
|
||||||
|
|
||||||
local fertility, temperature, humidity = get_biome_data(pos, perlin_fertile_area)
|
local fertility, temperature, humidity = get_biome_data(pos, perlin_fertile_area)
|
||||||
|
|
||||||
local pos_biome_ok = fertility > -0.1 and temperature <= 0.15 and temperature >= -0.15 and humidity <= 0 and humidity >= -1
|
local pos_biome_ok = fertility > -0.1 and temperature <= 0.15 and temperature >= -0.15 and humidity <= 0 and humidity >= -1
|
||||||
if not pos_biome_ok then
|
if not pos_biome_ok then return end
|
||||||
return -- Outside of biome
|
|
||||||
end
|
|
||||||
|
|
||||||
if minetest.find_node_near(p_top, 10 + math.random(-1.5,2), {"group:bush"}) then
|
if minetest.find_node_near(p_top, 10 + math.random(-1.5,2), {"group:bush"}) then
|
||||||
return -- Nodes to avoid are nearby
|
return -- Nodes to avoid are nearby
|
||||||
|
@ -94,8 +94,7 @@ if abstract_ferns.config.enable_horsetails_spawning == true then
|
|||||||
action = function(pos, node)
|
action = function(pos, node)
|
||||||
local p_top = {x = pos.x, y = pos.y + 1, z = pos.z}
|
local p_top = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||||
local n_top = minetest.get_node_or_nil(p_top)
|
local n_top = minetest.get_node_or_nil(p_top)
|
||||||
if not n_top then return end
|
if not n_top or n_top.name ~= "air" then return end
|
||||||
if n_top.name ~= "air" then return end
|
|
||||||
|
|
||||||
local NEAR_DST = 2
|
local NEAR_DST = 2
|
||||||
if #minetest.find_nodes_in_area(
|
if #minetest.find_nodes_in_area(
|
||||||
|
@ -7,7 +7,7 @@ local seaweed_max_count = tonumber(minetest.settings:get("pl_seaweed_max_count")
|
|||||||
local seaweed_rarity = tonumber(minetest.settings:get("pl_seaweed_rarity")) or 33
|
local seaweed_rarity = tonumber(minetest.settings:get("pl_seaweed_rarity")) or 33
|
||||||
|
|
||||||
local function get_ndef(name)
|
local function get_ndef(name)
|
||||||
return minetest.registered_noes[name] or {}
|
return minetest.registered_nodes[name] or {}
|
||||||
end
|
end
|
||||||
|
|
||||||
local algae_list = { {nil}, {2}, {3}, {4} }
|
local algae_list = { {nil}, {2}, {3}, {4} }
|
||||||
|
@ -7,7 +7,7 @@ local lilies_max_count = tonumber(minetest.settings:get("pl_waterlilies_max_coun
|
|||||||
local lilies_rarity = tonumber(minetest.settings:get("pl_waterlilies_rarity")) or 33
|
local lilies_rarity = tonumber(minetest.settings:get("pl_waterlilies_rarity")) or 33
|
||||||
|
|
||||||
local function get_ndef(name)
|
local function get_ndef(name)
|
||||||
return minetest.registered_noes[name] or {}
|
return minetest.registered_nodes[name] or {}
|
||||||
end
|
end
|
||||||
|
|
||||||
local lilies_list = {
|
local lilies_list = {
|
||||||
|
@ -85,8 +85,7 @@ minetest.register_abm({
|
|||||||
action = function(pos, node)
|
action = function(pos, node)
|
||||||
local p_top = {x = pos.x, y = pos.y + 1, z = pos.z}
|
local p_top = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||||
local n_top = minetest.get_node_or_nil(p_top)
|
local n_top = minetest.get_node_or_nil(p_top)
|
||||||
if not n_top then return end
|
if not n_top or n_top.name ~= "air" then return end
|
||||||
if n_top.name ~= "air" then return end
|
|
||||||
|
|
||||||
local n_light = minetest.get_node_light(p_top)
|
local n_light = minetest.get_node_light(p_top)
|
||||||
if n_light < 7 then
|
if n_light < 7 then
|
||||||
|
Reference in New Issue
Block a user