blob: 3dff43416c845b66aad58155f2e6a549966949bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
local function loop()
local item = minetest.get_wielded_item():get_name()
local pos = minetest.find_node_near(minetest.localplayer:get_pos(), 5, "mcl_farming:wheat", true)
if item == "mcl_farming:wheat_seeds" and pos then
minetest.dig_node(pos)
minetest.place_node(pos)
end
minetest.after(0.1, loop)
end
minetest.register_on_connect(loop)
|