2021-05-29 17:12:33 +03:00
local S = minetest.get_translator ( minetest.get_current_modname ( ) )
2019-03-08 01:00:09 +02:00
2017-02-01 14:27:49 +02:00
minetest.register_craftitem ( " mcl_farming:beetroot_seeds " , {
2019-03-08 01:00:09 +02:00
description = S ( " Beetroot Seeds " ) ,
2020-03-12 02:35:11 +02:00
_tt_help = S ( " Grows on farmland " ) ,
2019-03-08 01:00:09 +02:00
_doc_items_longdesc = S ( " Grows into a beetroot plant. Chickens like beetroot seeds. " ) ,
_doc_items_usagehelp = S ( " 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. " ) ,
Add `compostability` to node definition group.
* mcl_cake/init.lua (cake);
* mcl_core/craftitems.lua (apple);
* mcl_core/nodes_base.lua (dirt with grass);
* mcl_core/nodes_cactuscane.lua (cactus, sugarcane);
* mcl_core/nodes_climb.lua (vines);
* mcl_core/nodes_trees.lua (leaves, saplings);
* mcl_dye/init.lua (cocoa beans);
* mcl_farming/beetroot.lua (beetroot, & seeds);
* mcl_farming/carrots.lua (carrot);
* mcl_farming/melon.lua (melon, & slice, & seeds);
* mcl_farming/potatoes.lua (potato, baked potato);
* mcl_farming/pumpkin.lua (pumpkin, carved &, & seeds, & pie);
* mcl_farming/wheat.lua (wheat, cookie, bread, hay block);
* mcl_flowers/init.lua (flowers, ferns, grass, & tall variants);
* mcl_mushrooms/small.lua (red and brown mushrooms);
* mcl_mushrooms/huge.lua (red and brown huge mushrooms);
* mcl_nether/init.lua (nether wart block);
* mcl_nether/nether_wart.lua (nether wart);
* mcl_ocean/kelp.lua (kelp, dried &, & block);
* mcl_ocean/sea_pickle.lua (sea pickle);
* mcl_ocean/seagrass.lua (seagrass).
2022-03-29 13:54:51 +03:00
groups = { craftitem = 1 , c ompostability = 30 } ,
2017-02-01 14:27:49 +02:00
inventory_image = " mcl_farming_beetroot_seeds.png " ,
wield_image = " mcl_farming_beetroot_seeds.png " ,
on_place = function ( itemstack , placer , pointed_thing )
2017-02-06 19:29:13 +02:00
return mcl_farming : place_seed ( itemstack , placer , pointed_thing , " mcl_farming:beetroot_0 " )
2017-02-01 14:27:49 +02:00
end
} )
2017-02-06 19:29:13 +02:00
minetest.register_node ( " mcl_farming:beetroot_0 " , {
2019-03-08 01:00:09 +02:00
description = S ( " Premature Beetroot Plant (Stage 1) " ) ,
_doc_items_longdesc = S ( " 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. " ) ,
_doc_items_entry_name = S ( " Premature Beetroot Plant " ) ,
2017-02-01 14:27:49 +02:00
paramtype = " light " ,
2017-03-14 22:45:21 +02:00
paramtype2 = " meshoptions " ,
2017-03-20 19:51:40 +02:00
sunlight_propagates = true ,
2017-03-14 22:45:21 +02:00
place_param2 = 3 ,
2017-02-01 14:27:49 +02:00
walkable = false ,
drawtype = " plantlike " ,
2017-02-22 15:50:13 +02:00
drop = " mcl_farming:beetroot_seeds " ,
2017-02-06 19:29:13 +02:00
tiles = { " mcl_farming_beetroot_0.png " } ,
2017-04-01 06:10:56 +03:00
inventory_image = " mcl_farming_beetroot_0.png " ,
wield_image = " mcl_farming_beetroot_0.png " ,
2017-02-01 14:27:49 +02:00
selection_box = {
type = " fixed " ,
fixed = {
2017-04-01 06:10:56 +03:00
{ - 0.5 , - 0.5 , - 0.5 , 0.5 , - 5 / 16 , 0.5 }
2017-02-01 14:27:49 +02:00
} ,
} ,
2017-05-20 05:11:14 +03:00
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 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_leaves_defaults ( ) ,
2017-02-22 17:03:59 +02:00
_mcl_blast_resistance = 0 ,
2017-02-01 14:27:49 +02:00
} )
2017-02-06 19:29:13 +02:00
minetest.register_node ( " mcl_farming:beetroot_1 " , {
2019-03-08 01:00:09 +02:00
description = S ( " Premature Beetroot Plant (Stage 2) " ) ,
2017-03-02 20:53:53 +02:00
_doc_items_create_entry = false ,
2017-02-01 14:27:49 +02:00
paramtype = " light " ,
2017-03-14 22:45:21 +02:00
paramtype2 = " meshoptions " ,
2017-03-20 19:51:40 +02:00
sunlight_propagates = true ,
2017-03-14 22:45:21 +02:00
place_param2 = 3 ,
2017-02-01 14:27:49 +02:00
walkable = false ,
drawtype = " plantlike " ,
2017-02-22 15:50:13 +02:00
drop = " mcl_farming:beetroot_seeds " ,
2017-02-06 19:29:13 +02:00
tiles = { " mcl_farming_beetroot_1.png " } ,
2017-04-01 06:10:56 +03:00
inventory_image = " mcl_farming_beetroot_1.png " ,
wield_image = " mcl_farming_beetroot_1.png " ,
2017-02-01 14:27:49 +02:00
selection_box = {
type = " fixed " ,
fixed = {
2017-04-01 06:10:56 +03:00
{ - 0.5 , - 0.5 , - 0.5 , 0.5 , - 3 / 16 , 0.5 }
2017-02-01 14:27:49 +02:00
} ,
} ,
2017-05-20 05:11:14 +03:00
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 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_leaves_defaults ( ) ,
2017-02-22 17:03:59 +02:00
_mcl_blast_resistance = 0 ,
2017-02-01 14:27:49 +02:00
} )
2017-02-06 19:29:13 +02:00
minetest.register_node ( " mcl_farming:beetroot_2 " , {
2019-03-08 01:00:09 +02:00
description = S ( " Premature Beetroot Plant (Stage 3) " ) ,
2017-03-02 20:53:53 +02:00
_doc_items_create_entry = false ,
2017-02-01 14:27:49 +02:00
paramtype = " light " ,
2017-03-14 22:45:21 +02:00
paramtype2 = " meshoptions " ,
2017-03-20 19:51:40 +02:00
sunlight_propagates = true ,
2017-03-14 22:45:21 +02:00
place_param2 = 3 ,
2017-02-01 14:27:49 +02:00
walkable = false ,
drawtype = " plantlike " ,
2017-02-22 15:50:13 +02:00
drop = " mcl_farming:beetroot_seeds " ,
2017-04-01 06:10:56 +03:00
tiles = { " mcl_farming_beetroot_2.png " } ,
inventory_image = " mcl_farming_beetroot_2.png " ,
wield_image = " mcl_farming_beetroot_2.png " ,
2017-02-01 14:27:49 +02:00
selection_box = {
type = " fixed " ,
fixed = {
2017-04-01 06:10:56 +03:00
{ - 0.5 , - 0.5 , - 0.5 , 0.5 , 2 / 16 , 0.5 }
2017-02-01 14:27:49 +02:00
} ,
} ,
2017-05-20 05:11:14 +03:00
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 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_leaves_defaults ( ) ,
2017-02-22 17:03:59 +02:00
_mcl_blast_resistance = 0 ,
2017-02-01 14:27:49 +02:00
} )
minetest.register_node ( " mcl_farming:beetroot " , {
2019-03-08 01:00:09 +02:00
description = S ( " Mature Beetroot Plant " ) ,
_doc_items_longdesc = S ( " 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. " ) ,
2017-03-13 19:52:22 +02:00
_doc_items_create_entry = true ,
2017-02-01 14:27:49 +02:00
paramtype = " light " ,
2017-03-14 22:45:21 +02:00
paramtype2 = " meshoptions " ,
2017-03-20 19:51:40 +02:00
sunlight_propagates = true ,
2017-03-14 22:45:21 +02:00
place_param2 = 3 ,
2017-02-01 14:27:49 +02:00
walkable = false ,
drawtype = " plantlike " ,
drop = {
2019-02-08 06:30:05 +02:00
--[[ drops 1 beetroot guaranteed.
drops 0 - 3 beetroot seeds :
0 seeds : 42.18 %
1 seed : 14.06 %
2 seeds : 18.75 %
3 seeds : 25 % ] ]
2017-02-01 14:27:49 +02:00
max_items = 2 ,
items = {
{ items = { " mcl_farming:beetroot_item " } , rarity = 1 } ,
2017-02-06 19:29:13 +02: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 14:27:49 +02:00
} ,
} ,
2017-02-06 19:29:13 +02:00
tiles = { " mcl_farming_beetroot_3.png " } ,
2017-04-01 06:10:56 +03:00
inventory_image = " mcl_farming_beetroot_3.png " ,
wield_image = " mcl_farming_beetroot_3.png " ,
2017-02-01 14:27:49 +02:00
selection_box = {
type = " fixed " ,
fixed = {
2017-04-01 06:10:56 +03:00
{ - 0.5 , - 0.5 , - 0.5 , 0.5 , 3 / 16 , 0.5 }
2017-02-01 14:27:49 +02:00
} ,
} ,
2017-05-20 05:11:14 +03:00
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 } ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_leaves_defaults ( ) ,
2017-02-22 17:03:59 +02:00
_mcl_blast_resistance = 0 ,
2017-02-01 14:27:49 +02:00
} )
minetest.register_craftitem ( " mcl_farming:beetroot_item " , {
2019-03-08 01:00:09 +02:00
description = S ( " Beetroot " ) ,
_doc_items_longdesc = S ( " Beetroots are both used as food item and a dye ingredient. Pigs like beetroots, too. " ) ,
_doc_items_usagehelp = S ( " Hold it in your hand and right-click to eat it. Rightclick an animal to feed it. " ) ,
2017-02-01 14:27:49 +02:00
inventory_image = " mcl_farming_beetroot.png " ,
wield_image = " mcl_farming_beetroot.png " ,
2017-02-16 18:45:33 +02:00
on_place = minetest.item_eat ( 1 ) ,
on_secondary_use = minetest.item_eat ( 1 ) ,
Add `compostability` to node definition group.
* mcl_cake/init.lua (cake);
* mcl_core/craftitems.lua (apple);
* mcl_core/nodes_base.lua (dirt with grass);
* mcl_core/nodes_cactuscane.lua (cactus, sugarcane);
* mcl_core/nodes_climb.lua (vines);
* mcl_core/nodes_trees.lua (leaves, saplings);
* mcl_dye/init.lua (cocoa beans);
* mcl_farming/beetroot.lua (beetroot, & seeds);
* mcl_farming/carrots.lua (carrot);
* mcl_farming/melon.lua (melon, & slice, & seeds);
* mcl_farming/potatoes.lua (potato, baked potato);
* mcl_farming/pumpkin.lua (pumpkin, carved &, & seeds, & pie);
* mcl_farming/wheat.lua (wheat, cookie, bread, hay block);
* mcl_flowers/init.lua (flowers, ferns, grass, & tall variants);
* mcl_mushrooms/small.lua (red and brown mushrooms);
* mcl_mushrooms/huge.lua (red and brown huge mushrooms);
* mcl_nether/init.lua (nether wart block);
* mcl_nether/nether_wart.lua (nether wart);
* mcl_ocean/kelp.lua (kelp, dried &, & block);
* mcl_ocean/sea_pickle.lua (sea pickle);
* mcl_ocean/seagrass.lua (seagrass).
2022-03-29 13:54:51 +03:00
groups = { food = 2 , eatable = 1 , compostability = 65 } ,
2017-05-20 18:45:04 +03:00
_mcl_saturation = 1.2 ,
2017-02-01 14:27:49 +02:00
} )
minetest.register_craftitem ( " mcl_farming:beetroot_soup " , {
2019-03-08 01:00:09 +02:00
description = S ( " Beetroot Soup " ) ,
_doc_items_longdesc = S ( " Beetroot soup is a food item. " ) ,
2017-02-01 14:27:49 +02:00
stack_max = 1 ,
inventory_image = " mcl_farming_beetroot_soup.png " ,
wield_image = " mcl_farming_beetroot_soup.png " ,
2017-02-16 18:45:33 +02:00
on_place = minetest.item_eat ( 6 , " mcl_core:bowl " ) ,
on_secondary_use = minetest.item_eat ( 6 , " mcl_core:bowl " ) ,
2017-02-16 16:08:26 +02:00
groups = { food = 3 , eatable = 6 } ,
2017-05-20 18:45:04 +03:00
_mcl_saturation = 7.2 ,
2017-02-01 14:27:49 +02: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-04-01 04:54:58 +03:00
mcl_farming : add_plant ( " plant_beetroot " , " mcl_farming:beetroot " , { " mcl_farming:beetroot_0 " , " mcl_farming:beetroot_1 " , " mcl_farming:beetroot_2 " } , 68 , 3 )
2017-03-21 05:56:16 +02: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