1
0
mirror of https://codeberg.org/tenplus1/farming.git synced 2025-06-29 23:01:00 +02:00

add weed and weed bale

This commit is contained in:
tenplus1
2025-02-14 13:23:41 +00:00
parent 08cdf0ef52
commit 2752ad259c
9 changed files with 89 additions and 20 deletions

View File

@ -194,3 +194,26 @@ minetest.register_abm({
end
end
})
-- those darn weeds
minetest.register_abm({
nodenames = {"group:field"},
neighbors = {"air"},
interval = 50,
chance = 15,
catch_up = false,
action = function(pos, node)
if minetest.find_node_near(pos, 4, {"farming:scarecrow_bottom"}) then
return
end
pos.y = pos.y + 1
if minetest.get_node(pos).name == "air" then
minetest.set_node(pos, {name = "farming:weed", param2 = 2})
end
end
})