Version 0.41.3
[MineClone/MineClone2/MineClone2-Fixes.git] / mods / ITEMS / mcl_farming / beetroot.lua
blob1776ce030b528b3f5d2cc21f43de5e3426a44880
1 minetest.register_craftitem("mcl_farming:beetroot_seeds", {
2 description = "Beetroot Seeds",
3 _doc_items_longdesc = "Grows into a beetroot plant. Chickens like beetroot seeds.",
4 _doc_items_usagehelp = "Place the beetroot seeds on farmland (which can be created with a hoe) to plant a beetroot plant. They grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it beetroot seeds.",
5 groups = { craftitem=1 },
6 inventory_image = "mcl_farming_beetroot_seeds.png",
7 wield_image = "mcl_farming_beetroot_seeds.png",
8 on_place = function(itemstack, placer, pointed_thing)
9 return mcl_farming:place_seed(itemstack, placer, pointed_thing, "mcl_farming:beetroot_0")
10 end
13 minetest.register_node("mcl_farming:beetroot_0", {
14 description = "Premature Beetroot Plant (First Stage)",
15 _doc_items_longdesc = "Beetroot plants are plants which grow on farmland under sunlight in 4 stages. On hydrated farmland, they grow a bit faster. They can be harvested at any time but will only yield a profit when mature.",
16 _doc_items_entry_name = "Premature Beetroot Plant",
17 paramtype = "light",
18 paramtype2 = "meshoptions",
19 sunlight_propagates = true,
20 place_param2 = 3,
21 walkable = false,
22 drawtype = "plantlike",
23 drop = "mcl_farming:beetroot_seeds",
24 tiles = {"mcl_farming_beetroot_0.png"},
25 inventory_image = "mcl_farming_beetroot_0.png",
26 wield_image = "mcl_farming_beetroot_0.png",
27 selection_box = {
28 type = "fixed",
29 fixed = {
30 {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
33 groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1},
34 sounds = mcl_sounds.node_sound_leaves_defaults(),
35 _mcl_blast_resistance = 0,
38 minetest.register_node("mcl_farming:beetroot_1", {
39 description = "Premature Beetroot Plant (Second Stage)",
40 _doc_items_create_entry = false,
41 paramtype = "light",
42 paramtype2 = "meshoptions",
43 sunlight_propagates = true,
44 place_param2 = 3,
45 walkable = false,
46 drawtype = "plantlike",
47 drop = "mcl_farming:beetroot_seeds",
48 tiles = {"mcl_farming_beetroot_1.png"},
49 inventory_image = "mcl_farming_beetroot_1.png",
50 wield_image = "mcl_farming_beetroot_1.png",
51 selection_box = {
52 type = "fixed",
53 fixed = {
54 {-0.5, -0.5, -0.5, 0.5, -3/16, 0.5}
57 groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1},
58 sounds = mcl_sounds.node_sound_leaves_defaults(),
59 _mcl_blast_resistance = 0,
62 minetest.register_node("mcl_farming:beetroot_2", {
63 description = "Premature Beetroot Plant (Third Stage)",
64 _doc_items_create_entry = false,
65 paramtype = "light",
66 paramtype2 = "meshoptions",
67 sunlight_propagates = true,
68 place_param2 = 3,
69 walkable = false,
70 drawtype = "plantlike",
71 drop = "mcl_farming:beetroot_seeds",
72 tiles = {"mcl_farming_beetroot_2.png"},
73 inventory_image = "mcl_farming_beetroot_2.png",
74 wield_image = "mcl_farming_beetroot_2.png",
75 selection_box = {
76 type = "fixed",
77 fixed = {
78 {-0.5, -0.5, -0.5, 0.5, 2/16, 0.5}
81 groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1},
82 sounds = mcl_sounds.node_sound_leaves_defaults(),
83 _mcl_blast_resistance = 0,
86 minetest.register_node("mcl_farming:beetroot", {
87 description = "Mature Beetroot Plant",
88 _doc_items_longdesc = "A mature beetroot plant is a farming plant which is ready to be harvested for a beetroot and some beetroot seeds. It won't grow any further.",
89 _doc_items_create_entry = true,
90 paramtype = "light",
91 paramtype2 = "meshoptions",
92 sunlight_propagates = true,
93 place_param2 = 3,
94 walkable = false,
95 drawtype = "plantlike",
96 drop = {
97 max_items = 2,
98 items = {
99 { items = {"mcl_farming:beetroot_item"}, rarity = 1 },
100 { items = {"mcl_farming:beetroot_seeds 3"}, rarity = 4 },
101 { items = {"mcl_farming:beetroot_seeds 2"}, rarity = 4 },
102 { items = {"mcl_farming:beetroot_seeds 1"}, rarity = 4 },
105 tiles = {"mcl_farming_beetroot_3.png"},
106 inventory_image = "mcl_farming_beetroot_3.png",
107 wield_image = "mcl_farming_beetroot_3.png",
108 selection_box = {
109 type = "fixed",
110 fixed = {
111 {-0.5, -0.5, -0.5, 0.5, 3/16, 0.5}
114 groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,beetroot=4},
115 sounds = mcl_sounds.node_sound_leaves_defaults(),
116 _mcl_blast_resistance = 0,
119 minetest.register_craftitem("mcl_farming:beetroot_item", {
120 description = "Beetroot",
121 _doc_items_longdesc = "Beetroots are both used as food item and a dye ingredient. Pigs like beetroots, too.",
122 _doc_items_usagehelp = "Hold it in your hand and right-click to eat it. Rightclick an animal to feed it.",
123 inventory_image = "mcl_farming_beetroot.png",
124 wield_image = "mcl_farming_beetroot.png",
125 on_place = minetest.item_eat(1),
126 on_secondary_use = minetest.item_eat(1),
127 groups = { food = 2, eatable = 1 },
128 _mcl_saturation = 1.2,
131 minetest.register_craftitem("mcl_farming:beetroot_soup", {
132 description = "Beetroot Soup",
133 _doc_items_longdesc = "Beetroot soup is a food item.",
134 stack_max = 1,
135 inventory_image = "mcl_farming_beetroot_soup.png",
136 wield_image = "mcl_farming_beetroot_soup.png",
137 on_place = minetest.item_eat(6, "mcl_core:bowl"),
138 on_secondary_use = minetest.item_eat(6, "mcl_core:bowl"),
139 groups = { food = 3, eatable = 6 },
140 _mcl_saturation = 7.2,
143 minetest.register_craft({
144 output = "mcl_farming:beetroot_soup",
145 recipe = {
146 { "mcl_farming:beetroot_item","mcl_farming:beetroot_item","mcl_farming:beetroot_item", },
147 { "mcl_farming:beetroot_item","mcl_farming:beetroot_item","mcl_farming:beetroot_item", },
148 { "", "mcl_core:bowl", "" },
152 mcl_farming:add_plant("plant_beetroot", "mcl_farming:beetroot", {"mcl_farming:beetroot_0", "mcl_farming:beetroot_1", "mcl_farming:beetroot_2"}, 68, 3)
154 if minetest.get_modpath("doc") then
155 for i=1,2 do
156 doc.add_entry_alias("nodes", "mcl_farming:beetroot_0", "nodes", "mcl_farming:beetroot_"..i)