From 607105ed37d976d2dc597af1b527f0505e5913fb Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Fri, 28 Apr 2023 09:18:54 +0100 Subject: [PATCH] re-add rice seeds and recipe to dry into edible rice --- crops/rice.lua | 42 +++++++++++++++++++++++++-------- textures/farming_rice_seed.png | Bin 0 -> 165 bytes 2 files changed, 32 insertions(+), 10 deletions(-) create mode 100644 textures/farming_rice_seed.png diff --git a/crops/rice.lua b/crops/rice.lua index 44a451b..2323e86 100644 --- a/crops/rice.lua +++ b/crops/rice.lua @@ -1,19 +1,41 @@ local S = farming.intllib +-- rice seed +minetest.register_node("farming:seed_rice", { + description = S("Rice Seed"), + tiles = {"farming_rice_seed.png"}, + inventory_image = "farming_rice_seed.png", + wield_image = "farming_rice_seed.png", + drawtype = "signlike", + groups = {seed = 1, snappy = 3, attached_node = 1, flammable = 4, growing = 1}, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + sunlight_propagates = true, + selection_box = farming.select, + next_plant = "farming:rice_1", + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:seed_rice") + end +}) + -- rice minetest.register_craftitem("farming:rice", { description = S("Rice"), inventory_image = "farming_rice.png", groups = {seed = 2, food_rice = 1, flammable = 2}, - on_place = function(itemstack, placer, pointed_thing) - return farming.place_seed(itemstack, placer, pointed_thing, "farming:rice_1") - end }) --- replacement for rice seeds that was removed -minetest.register_alias("farming:seed_rice", "farming:rice") +-- dry rice seed to give edible rice +minetest.register_craft({ + type = "cooking", + cooktime = 1, + output = "farming:rice", + recipe = "farming:seed_rice" +}) +-- rice flour and bread minetest.register_craftitem("farming:rice_bread", { description = S("Rice Bread"), inventory_image = "farming_rice_bread.png", @@ -100,8 +122,8 @@ minetest.register_node("farming:rice_6", table.copy(def)) def.tiles = {"farming_rice_7.png"} def.drop = { items = { - {items = {"farming:rice"}, rarity = 1}, - {items = {"farming:rice"}, rarity = 3} + {items = {"farming:seed_rice"}, rarity = 1}, + {items = {"farming:seed_rice"}, rarity = 3} } } minetest.register_node("farming:rice_7", table.copy(def)) @@ -112,8 +134,8 @@ def.groups.growing = nil def.selection_box = farming.select_final def.drop = { items = { - {items = {"farming:rice 2"}, rarity = 1}, - {items = {"farming:rice"}, rarity = 2} + {items = {"farming:seed_rice 2"}, rarity = 1}, + {items = {"farming:seed_rice"}, rarity = 2} } } minetest.register_node("farming:rice_8", table.copy(def)) @@ -121,7 +143,7 @@ minetest.register_node("farming:rice_8", table.copy(def)) -- add to registered_plants farming.registered_plants["farming:rice"] = { crop = "farming:rice", - seed = "farming:rice", + seed = "farming:seed_rice", minlight = farming.min_light, maxlight = farming.max_light, steps = 8 diff --git a/textures/farming_rice_seed.png b/textures/farming_rice_seed.png new file mode 100644 index 0000000000000000000000000000000000000000..8a84f58d063488a2a4b276e7cfd55a0bd19e7ce9 GIT binary patch literal 165 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPE^4e$wZ1=7!NZhLWO_p5vR-#;OXk; Jvd$@?2>?=mHJJba literal 0 HcmV?d00001