2017-02-01 13:27:49 +01:00
minetest.register_craftitem ( " mcl_farming:beetroot_seeds " , {
description = " Beetroot Seeds " ,
2017-03-11 18:23:30 +01:00
_doc_items_longdesc = " Grows into a beetroot plant. Chickens like beetroot seeds. " ,
_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. " ,
2017-02-01 13:27:49 +01:00
groups = { craftitem = 1 } ,
inventory_image = " mcl_farming_beetroot_seeds.png " ,
wield_image = " mcl_farming_beetroot_seeds.png " ,
on_place = function ( itemstack , placer , pointed_thing )
2017-02-06 18:29:13 +01:00
return mcl_farming : place_seed ( itemstack , placer , pointed_thing , " mcl_farming:beetroot_0 " )
2017-02-01 13:27:49 +01:00
end
} )
2017-02-06 18:29:13 +01:00
minetest.register_node ( " mcl_farming:beetroot_0 " , {
2017-02-22 15:08:39 +01:00
description = " Premature Beetroot Plant (First Stage) " ,
2017-03-13 18:52:22 +01:00
_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. " ,
2017-03-02 19:53:53 +01:00
_doc_items_entry_name = " Premature Beetroot Plant " ,
2017-02-01 13:27:49 +01:00
paramtype = " light " ,
2017-03-14 21:45:21 +01:00
paramtype2 = " meshoptions " ,
2017-03-20 18:51:40 +01:00
sunlight_propagates = true ,
2017-03-14 21:45:21 +01:00
place_param2 = 3 ,
2017-02-01 13:27:49 +01:00
walkable = false ,
drawtype = " plantlike " ,
2017-02-22 14:50:13 +01:00
drop = " mcl_farming:beetroot_seeds " ,
2017-02-06 18:29:13 +01:00
tiles = { " mcl_farming_beetroot_0.png " } ,
2017-02-01 13:27:49 +01:00
selection_box = {
type = " fixed " ,
fixed = {
{ - 0.5 , - 0.5 , - 0.5 , 0.5 , - 0.125 , 0.5 }
} ,
} ,
2017-03-29 22:58:31 +02:00
groups = { dig_immediate = 3 , not_in_creative_inventory = 1 , dig_by_water = 1 , dig_by_piston = 1 } ,
2017-02-11 18:46:23 +01:00
sounds = mcl_sounds.node_sound_leaves_defaults ( ) ,
2017-02-22 16:03:59 +01:00
_mcl_blast_resistance = 0 ,
2017-02-01 13:27:49 +01:00
} )
2017-02-06 18:29:13 +01:00
minetest.register_node ( " mcl_farming:beetroot_1 " , {
2017-02-22 15:08:39 +01:00
description = " Premature Beetroot Plant (Second Stage) " ,
2017-03-02 19:53:53 +01:00
_doc_items_create_entry = false ,
2017-02-01 13:27:49 +01:00
paramtype = " light " ,
2017-03-14 21:45:21 +01:00
paramtype2 = " meshoptions " ,
2017-03-20 18:51:40 +01:00
sunlight_propagates = true ,
2017-03-14 21:45:21 +01:00
place_param2 = 3 ,
2017-02-01 13:27:49 +01:00
walkable = false ,
drawtype = " plantlike " ,
2017-02-22 14:50:13 +01:00
drop = " mcl_farming:beetroot_seeds " ,
2017-02-06 18:29:13 +01:00
tiles = { " mcl_farming_beetroot_1.png " } ,
2017-02-01 13:27:49 +01:00
selection_box = {
type = " fixed " ,
fixed = {
{ - 0.5 , - 0.5 , - 0.5 , 0.5 , - 0.125 , 0.5 }
} ,
} ,
2017-03-29 22:58:31 +02:00
groups = { dig_immediate = 3 , not_in_creative_inventory = 1 , dig_by_water = 1 , dig_by_piston = 1 } ,
2017-02-11 18:46:23 +01:00
sounds = mcl_sounds.node_sound_leaves_defaults ( ) ,
2017-02-22 16:03:59 +01:00
_mcl_blast_resistance = 0 ,
2017-02-01 13:27:49 +01:00
} )
2017-02-06 18:29:13 +01:00
minetest.register_node ( " mcl_farming:beetroot_2 " , {
2017-02-22 15:08:39 +01:00
description = " Premature Beetroot Plant (Third Stage) " ,
2017-03-02 19:53:53 +01:00
_doc_items_create_entry = false ,
2017-02-01 13:27:49 +01:00
paramtype = " light " ,
2017-03-14 21:45:21 +01:00
paramtype2 = " meshoptions " ,
2017-03-20 18:51:40 +01:00
sunlight_propagates = true ,
2017-03-14 21:45:21 +01:00
place_param2 = 3 ,
2017-02-01 13:27:49 +01:00
walkable = false ,
drawtype = " plantlike " ,
2017-02-22 14:50:13 +01:00
drop = " mcl_farming:beetroot_seeds " ,
2017-02-06 18:29:13 +01:00
tiles = { " farming_carrot_2.png " } ,
2017-02-01 13:27:49 +01:00
selection_box = {
type = " fixed " ,
fixed = {
{ - 0.5 , - 0.5 , - 0.5 , 0.5 , - 0.125 , 0.5 }
} ,
} ,
2017-03-29 22:58:31 +02:00
groups = { dig_immediate = 3 , not_in_creative_inventory = 1 , dig_by_water = 1 , dig_by_piston = 1 } ,
2017-02-11 18:46:23 +01:00
sounds = mcl_sounds.node_sound_leaves_defaults ( ) ,
2017-02-22 16:03:59 +01:00
_mcl_blast_resistance = 0 ,
2017-02-01 13:27:49 +01:00
} )
minetest.register_node ( " mcl_farming:beetroot " , {
2017-02-22 15:08:39 +01:00
description = " Mature Beetroot Plant " ,
2017-03-13 18:52:22 +01:00
_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. " ,
_doc_items_create_entry = true ,
2017-02-01 13:27:49 +01:00
paramtype = " light " ,
2017-03-14 21:45:21 +01:00
paramtype2 = " meshoptions " ,
2017-03-20 18:51:40 +01:00
sunlight_propagates = true ,
2017-03-14 21:45:21 +01:00
place_param2 = 3 ,
2017-02-01 13:27:49 +01:00
walkable = false ,
drawtype = " plantlike " ,
drop = {
max_items = 2 ,
items = {
{ items = { " mcl_farming:beetroot_item " } , rarity = 1 } ,
2017-02-06 18:29:13 +01:00
{ items = { " mcl_farming:beetroot_seeds 3 " } , rarity = 4 } ,
{ items = { " mcl_farming:beetroot_seeds 2 " } , rarity = 4 } ,
{ items = { " mcl_farming:beetroot_seeds 1 " } , rarity = 4 } ,
2017-02-01 13:27:49 +01:00
} ,
} ,
2017-02-06 18:29:13 +01:00
tiles = { " mcl_farming_beetroot_3.png " } ,
2017-02-01 13:27:49 +01:00
selection_box = {
type = " fixed " ,
fixed = {
{ - 0.5 , - 0.5 , - 0.5 , 0.5 , - 0.125 , 0.5 }
} ,
} ,
2017-03-29 22:58:31 +02:00
groups = { dig_immediate = 3 , not_in_creative_inventory = 1 , dig_by_water = 1 , dig_by_piston = 1 } ,
2017-02-11 18:46:23 +01:00
sounds = mcl_sounds.node_sound_leaves_defaults ( ) ,
2017-02-22 16:03:59 +01:00
_mcl_blast_resistance = 0 ,
2017-02-01 13:27:49 +01:00
} )
minetest.register_craftitem ( " mcl_farming:beetroot_item " , {
description = " Beetroot " ,
2017-03-11 18:23:30 +01:00
_doc_items_longdesc = " Beetroots can be eaten for 1 hunger point. Pigs like beetroots, too. " ,
_doc_items_usagehelp = " Hold it in your hand and right-click to eat it. Rightclick an animal to feed it. " ,
2017-02-01 13:27:49 +01:00
inventory_image = " mcl_farming_beetroot.png " ,
wield_image = " mcl_farming_beetroot.png " ,
2017-02-16 17:45:33 +01:00
on_place = minetest.item_eat ( 1 ) ,
on_secondary_use = minetest.item_eat ( 1 ) ,
2017-02-01 13:27:49 +01:00
groups = { food = 2 , eatable = 1 } ,
} )
minetest.register_craftitem ( " mcl_farming:beetroot_soup " , {
description = " Beetroot Soup " ,
2017-03-11 18:23:30 +01:00
_doc_items_longdesc = " Beetroot soup is a healthy soup which can be consumed for 6 hunger points. " ,
2017-02-01 13:27:49 +01:00
stack_max = 1 ,
inventory_image = " mcl_farming_beetroot_soup.png " ,
wield_image = " mcl_farming_beetroot_soup.png " ,
2017-02-16 17:45:33 +01:00
on_place = minetest.item_eat ( 6 , " mcl_core:bowl " ) ,
on_secondary_use = minetest.item_eat ( 6 , " mcl_core:bowl " ) ,
2017-02-16 15:08:26 +01:00
groups = { food = 3 , eatable = 6 } ,
2017-02-01 13:27:49 +01:00
} )
minetest.register_craft ( {
output = " mcl_farming:beetroot_soup " ,
recipe = {
{ " mcl_farming:beetroot_item " , " mcl_farming:beetroot_item " , " mcl_farming:beetroot_item " , } ,
{ " mcl_farming:beetroot_item " , " mcl_farming:beetroot_item " , " mcl_farming:beetroot_item " , } ,
{ " " , " mcl_core:bowl " , " " } ,
} ,
} )
2017-02-06 18:29:13 +01:00
mcl_farming : add_plant ( " mcl_farming:beetroot " , { " mcl_farming:beetroot_0 " , " mcl_farming:beetroot_1 " , " mcl_farming:beetroot_2 " } , 68 , 3 )
2017-03-21 04:56:16 +01:00
if minetest.get_modpath ( " doc " ) then
for i = 1 , 2 do
doc.add_entry_alias ( " nodes " , " mcl_farming:beetroot_0 " , " nodes " , " mcl_farming:beetroot_ " .. i )
end
end