From c4e88fc332d107e050b8a3111b21e7f9fc04fad6 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Sat, 31 Mar 2018 16:32:17 +0100 Subject: [PATCH] added custom groups to register_plant food craftitem --- cotton.lua | 1 + init.lua | 1 + 2 files changed, 2 insertions(+) diff --git a/cotton.lua b/cotton.lua index bf0412e..7f893ec 100644 --- a/cotton.lua +++ b/cotton.lua @@ -146,5 +146,6 @@ minetest.register_node("farming:cotton_8", table.copy(crop_def)) farming.register_plant("farming:cotton", { description = "Cotton seed", inventory_image = "farming_cotton_seed.png", + groups = {flammable = 2}, steps = 8, })]] diff --git a/init.lua b/init.lua index 1bb33c9..6345841 100644 --- a/init.lua +++ b/init.lua @@ -513,6 +513,7 @@ farming.register_plant = function(name, def) minetest.register_craftitem(":" .. mname .. ":" .. pname, { description = pname:gsub("^%l", string.upper), inventory_image = mname .. "_" .. pname .. ".png", + groups = def.groups or {flammable = 2}, }) -- Register growing steps