1 -- Global farming namespace
3 farming.path = minetest.get_modpath("farming")
6 dofile(farming.path .. "/api.lua")
7 dofile(farming.path .. "/nodes.lua")
8 dofile(farming.path .. "/hoes.lua")
11 farming.register_plant("farming:wheat", {
12 description = "Wheat seed",
13 inventory_image = "farming_wheat_seed.png",
16 maxlight = default.LIGHT_MAX,
17 fertility = {"grassland"}
19 minetest.register_craftitem("farming:flour", {
20 description = "Flour",
21 inventory_image = "farming_flour.png",
24 minetest.register_craftitem("farming:bread", {
25 description = "Bread",
26 inventory_image = "farming_bread.png",
27 on_use = minetest.item_eat(5),
30 minetest.register_craft({
32 output = "farming:flour",
33 recipe = {"farming:wheat", "farming:wheat", "farming:wheat", "farming:wheat"}
36 minetest.register_craft({
39 output = "farming:bread",
40 recipe = "farming:flour"
44 farming.register_plant("farming:cotton", {
45 description = "Cotton seed",
46 inventory_image = "farming_cotton_seed.png",
49 maxlight = default.LIGHT_MAX,
50 fertility = {"grassland", "desert"}
53 minetest.register_alias("farming:string", "farming:cotton")
55 minetest.register_craft({
56 output = "wool:white",
58 {"farming:cotton", "farming:cotton"},
59 {"farming:cotton", "farming:cotton"},
64 minetest.register_craft({
65 output = "farming:straw 3",
67 {"farming:wheat", "farming:wheat", "farming:wheat"},
68 {"farming:wheat", "farming:wheat", "farming:wheat"},
69 {"farming:wheat", "farming:wheat", "farming:wheat"},
73 minetest.register_craft({
74 output = "farming:wheat 3",