-- Global farming namespace
+
farming = {}
farming.path = minetest.get_modpath("farming")
+
-- Load files
+
dofile(farming.path .. "/api.lua")
dofile(farming.path .. "/nodes.lua")
dofile(farming.path .. "/hoes.lua")
+
-- WHEAT
+
farming.register_plant("farming:wheat", {
description = "Wheat Seed",
paramtype2 = "meshoptions",
groups = {flammable = 4},
place_param2 = 3,
})
+
minetest.register_craftitem("farming:flour", {
description = "Flour",
inventory_image = "farming_flour.png",
recipe = "farming:flour"
})
+
-- Cotton
+
farming.register_plant("farming:cotton", {
description = "Cotton Seed",
inventory_image = "farming_cotton_seed.png",
groups = {flammable = 4},
})
-minetest.register_alias("farming:string", "farming:cotton")
+minetest.register_craftitem("farming:string", {
+ description = "String",
+ inventory_image = "farming_string.png",
+ groups = {flammable = 2},
+})
minetest.register_craft({
output = "wool:white",
}
})
+minetest.register_craft({
+ output = "farming:string 2",
+ recipe = {
+ {"farming:cotton"},
+ {"farming:cotton"},
+ }
+})
+
+
-- Straw
+
minetest.register_craft({
output = "farming:straw 3",
recipe = {
}
})
+
-- Fuels
+
minetest.register_craft({
type = "fuel",
recipe = "farming:straw",
burntime = 1,
})
+minetest.register_craft({
+ type = "fuel",
+ recipe = "farming:string",
+ burntime = 1,
+})
+
minetest.register_craft({
type = "fuel",
recipe = "farming:hoe_wood",