summaryrefslogtreecommitdiff
path: root/farming/grass.lua
blob: 9644254ded4ec6f18c0ef6219422ab0c5ef15be9 (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43

for i = 4, 5 do

	-- Override default grass and have it drop Wheat Seeds

	minetest.override_item("default:grass_" .. i, {
		drop = {
			max_items = 1,
			items = {
				{items = {'farming:seed_wheat'}, rarity = 5},
				{items = {'default:grass_1'}},
			}
		},
	})

	-- Override default dry grass and have it drop Barley Seeds

	if minetest.registered_nodes["default:dry_grass_1"] then

		minetest.override_item("default:dry_grass_" .. i, {
			drop = {
				max_items = 1,
				items = {
					{items = {'farming:seed_barley'}, rarity = 6},
					{items = {'default:dry_grass_1'}},
				}
			},
		})
	end

end

-- Override default Jungle Grass and have it drop Cotton Seeds

minetest.override_item("default:junglegrass", {
	drop = {
		max_items = 1,
		items = {
			{items = {'farming:seed_cotton'}, rarity = 8},
			{items = {'default:junglegrass'}},
		}
	},
})