summaryrefslogtreecommitdiff
path: root/lucky_block.lua
blob: d335d35f0598f5d48eb9dae823c92531c5847219 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

-- add lucky blocks

local function growy(pos, player)

	local dpos = minetest.find_node_near(pos, 1, "group:soil")

	if dpos then
		bonemeal:on_use(dpos, 5)
	end
end


if minetest.get_modpath("lucky_block") then

	lucky_block:add_blocks({
		{"lig"},
		{"dro", {"bonemeal:mulch"}, 10},
		{"dro", {"bonemeal:bonemeal"}, 10},
		{"dro", {"bonemeal:fertiliser"}, 10},
		{"cus", growy},
		{"nod", "default:chest", 0, {
			{name = "bonemeal:mulch", max = 20},
			{name = "bonemeal:bonemeal", max = 15},
			{name = "bonemeal:fertiliser", max = 10},
		}},
	})

end