Skip to content
Snippets Groups Projects
Commit 9032385b authored by Vanessa Ezekowitz's avatar Vanessa Ezekowitz
Browse files

don't spawn apples too close together.

parent 7b9aac91
No related branches found
No related tags found
No related merge requests found
-- Blossom
local BLOSSOM_CHANCE = 15
local APPLE_CHANCE = 10
local BLOSSOM_DELAY = 3600
local BLOSSOM_NODE = "nature:blossom"
local APPLE_CHANCE = 10
local APPLE_SPREAD = 2
local function spawn_apple_under(pos)
local below = {
x = pos.x,
......@@ -65,6 +66,8 @@ minetest.register_abm({
chance = APPLE_CHANCE,
action = function(pos, node, active_object_count, active_object_count_wider)
spawn_apple_under(pos)
if not minetest.find_node_near(pos, APPLE_SPREAD, { "default:apple" }) then
spawn_apple_under(pos)
end
end
})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment