2017-02-10 17:00:29 +01:00
minetest.register_craftitem ( " mcl_farming:wheat_seeds " , {
2017-03-11 18:24:07 +01:00
-- Original Minecraft name: “Seeds”
2015-06-29 19:55:56 +02:00
description = " Wheat Seeds " ,
2017-03-11 18:23:30 +01:00
_doc_items_longdesc = " Grows into a wheat plant. Chickens like wheat seeds. " ,
_doc_items_usagehelp = " Place the wheat seeds on farmland (which can be created with a hoe) to plant a wheat plant. They grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it wheat seeds. " ,
2017-01-20 11:24:39 +01:00
groups = { craftitem = 1 } ,
2015-06-29 19:55:56 +02:00
inventory_image = " farming_wheat_seed.png " ,
on_place = function ( itemstack , placer , pointed_thing )
2017-01-31 12:35:59 +01:00
return mcl_farming : place_seed ( itemstack , placer , pointed_thing , " mcl_farming:wheat_1 " )
2015-06-29 19:55:56 +02:00
end
} )
2017-01-31 12:35:59 +01:00
minetest.register_node ( " mcl_farming:wheat_1 " , {
2017-02-22 15:08:39 +01:00
description = " Premature Wheat Plant (First Stage) " ,
2017-03-02 19:53:53 +01:00
_doc_items_entry_name = " Premature Wheat Plant " ,
2017-03-13 18:52:22 +01:00
_doc_items_longdesc = " Premature wheat plants grow on farmland under sunlight in 4 stages. On hydrated farmland, they grow faster. They can be harvested at any time but will only yield a profit when mature. " ,
2015-06-29 19:55:56 +02:00
paramtype = " light " ,
2017-03-14 21:25:20 +01:00
paramtype2 = " meshoptions " ,
place_param2 = 3 ,
2015-06-29 19:55:56 +02:00
sunlight_propagates = true ,
walkable = false ,
2017-03-14 21:25:20 +01:00
drawtype = " plantlike " ,
2017-02-10 17:00:29 +01:00
drop = " mcl_farming:wheat_seeds " ,
2015-06-29 19:55:56 +02:00
tiles = { " farming_wheat_1.png " } ,
2017-03-13 19:10:52 +01:00
inventory_image = " farming_wheat_1.png " ,
wield_image = " farming_wheat_1.png " ,
2015-06-29 19:55:56 +02:00
selection_box = {
type = " fixed " ,
fixed = {
{ - 0.5 , - 0.5 , - 0.5 , 0.5 , - 0.125 , 0.5 }
} ,
} ,
2017-01-12 07:18:13 +01:00
groups = { dig_immediate = 3 , not_in_creative_inventory = 1 , dig_by_water = 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 ,
2015-06-29 19:55:56 +02:00
} )
2017-01-31 12:35:59 +01:00
minetest.register_node ( " mcl_farming:wheat_2 " , {
2017-02-22 15:08:39 +01:00
description = " Premature Wheat Plant (Second Stage) " ,
2017-03-02 19:53:53 +01:00
_doc_items_create_entry = false ,
2015-06-29 19:55:56 +02:00
sunlight_propagates = true ,
paramtype = " light " ,
2017-03-14 21:25:20 +01:00
paramtype2 = " meshoptions " ,
place_param2 = 3 ,
2015-06-29 19:55:56 +02:00
walkable = false ,
2017-03-14 21:25:20 +01:00
drawtype = " plantlike " ,
2017-02-10 17:00:29 +01:00
drop = " mcl_farming:wheat_seeds " ,
2015-06-29 19:55:56 +02:00
tiles = { " farming_wheat_2.png " } ,
2017-03-13 19:10:52 +01:00
inventory_image = " farming_wheat_2.png " ,
wield_image = " farming_wheat_2.png " ,
2015-06-29 19:55:56 +02:00
selection_box = {
type = " fixed " ,
fixed = {
{ - 0.5 , - 0.5 , - 0.5 , 0.5 , - 0.25 , 0.5 }
} ,
} ,
2017-01-12 07:18:13 +01:00
groups = { dig_immediate = 3 , not_in_creative_inventory = 1 , dig_by_water = 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 ,
2015-06-29 19:55:56 +02:00
} )
2017-01-31 12:35:59 +01:00
minetest.register_node ( " mcl_farming:wheat_3 " , {
2017-02-22 15:08:39 +01:00
description = " Premature Wheat Plant (Third Stage) " ,
2017-03-02 19:53:53 +01:00
_doc_items_create_entry = false ,
2015-06-29 19:55:56 +02:00
sunlight_propagates = true ,
paramtype = " light " ,
2017-03-14 21:25:20 +01:00
paramtype2 = " meshoptions " ,
place_param2 = 3 ,
2015-06-29 19:55:56 +02:00
walkable = false ,
2017-03-14 21:25:20 +01:00
drawtype = " plantlike " ,
2017-02-10 17:00:29 +01:00
drop = " mcl_farming:wheat_seeds " ,
2015-06-29 19:55:56 +02:00
tiles = { " farming_wheat_3.png " } ,
2017-03-13 19:10:52 +01:00
inventory_image = " farming_wheat_3.png " ,
wield_image = " farming_wheat_3.png " ,
2015-06-29 19:55:56 +02:00
selection_box = {
type = " fixed " ,
fixed = {
{ - 0.5 , - 0.5 , - 0.5 , 0.5 , 0.25 , 0.5 }
} ,
} ,
2017-01-12 07:18:13 +01:00
groups = { dig_immediate = 3 , not_in_creative_inventory = 1 , dig_by_water = 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 ,
2015-06-29 19:55:56 +02:00
} )
2017-01-31 12:35:59 +01:00
minetest.register_node ( " mcl_farming:wheat " , {
2017-02-22 15:08:39 +01:00
description = " Mature Wheat Plant " ,
2017-03-13 18:52:22 +01:00
_doc_items_longdesc = " Mature wheat plants are ready to be harvested for wheat and wheat seeds. They won't grow any further. " ,
2015-06-29 19:55:56 +02:00
sunlight_propagates = true ,
paramtype = " light " ,
2017-03-14 21:25:20 +01:00
paramtype2 = " meshoptions " ,
place_param2 = 3 ,
2015-06-29 19:55:56 +02:00
walkable = false ,
2017-03-14 21:25:20 +01:00
drawtype = " plantlike " ,
2015-06-29 19:55:56 +02:00
tiles = { " farming_wheat.png " } ,
2017-03-13 19:10:52 +01:00
inventory_image = " farming_wheat.png " ,
wield_image = " farming_wheat.png " ,
2015-06-29 19:55:56 +02:00
drop = {
max_items = 4 ,
items = {
2017-02-10 17:00:29 +01:00
{ items = { ' mcl_farming:wheat_seeds ' } } ,
{ items = { ' mcl_farming:wheat_seeds ' } , rarity = 2 } ,
{ items = { ' mcl_farming:wheat_seeds ' } , rarity = 5 } ,
2017-02-11 21:38:25 +01:00
{ items = { ' mcl_farming:wheat_item ' } }
2015-06-29 19:55:56 +02:00
}
} ,
2015-07-03 06:58:01 +02:00
selection_box = {
type = " fixed " ,
fixed = {
{ - 0.5 , - 0.5 , - 0.5 , 0.5 , 0.35 , 0.5 }
} ,
} ,
2017-01-12 07:18:13 +01:00
groups = { dig_immediate = 3 , not_in_creative_inventory = 1 , dig_by_water = 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 ,
2015-06-29 19:55:56 +02:00
} )
2017-01-31 12:35:59 +01:00
mcl_farming : add_plant ( " mcl_farming:wheat " , { " mcl_farming:wheat_1 " , " mcl_farming:wheat_2 " , " mcl_farming:wheat_3 " } , 50 , 20 )
2015-06-29 19:55:56 +02:00
2017-02-11 21:38:25 +01:00
minetest.register_craftitem ( " mcl_farming:wheat_item " , {
2017-01-08 03:57:42 +01:00
description = " Wheat " ,
2017-03-18 17:52:41 +01:00
_doc_items_longdesc = " Wheat is used in crafting. Some animals like wheat. " ,
_doc_items_usagehelp = " Rightclick an animal to try to feed it wheat. " ,
2015-06-29 19:55:56 +02:00
inventory_image = " farming_wheat_harvested.png " ,
2017-01-20 04:54:09 +01:00
groups = { craftitem = 1 } ,
2015-06-29 19:55:56 +02:00
} )
minetest.register_craft ( {
2017-01-31 12:35:59 +01:00
output = " mcl_farming:bread " ,
2015-06-29 19:55:56 +02:00
recipe = {
2017-02-11 21:38:25 +01:00
{ ' mcl_farming:wheat_item ' , ' mcl_farming:wheat_item ' , ' mcl_farming:wheat_item ' } ,
2015-06-29 19:55:56 +02:00
}
} )
minetest.register_craft ( {
2017-01-31 12:35:59 +01:00
output = " mcl_farming:cookie 8 " ,
2015-06-29 19:55:56 +02:00
recipe = {
2017-02-11 21:38:25 +01:00
{ ' mcl_farming:wheat_item ' , ' mcl_dye:brown ' , ' mcl_farming:wheat_item ' } ,
2015-06-29 19:55:56 +02:00
}
} )
2017-01-31 12:35:59 +01:00
minetest.register_craftitem ( " mcl_farming:cookie " , {
2015-06-29 19:55:56 +02:00
description = " Cookie " ,
2017-03-18 17:18:12 +01:00
_doc_items_longdesc = " This is a food item which can be eaten for 2 hunger points. " ,
2015-06-29 19:55:56 +02:00
inventory_image = " farming_cookie.png " ,
2017-01-16 14:29:41 +01:00
groups = { food = 2 , eatable = 2 } ,
2017-02-16 17:45:33 +01:00
on_place = minetest.item_eat ( 2 ) ,
on_secondary_use = minetest.item_eat ( 2 ) ,
2015-06-29 19:55:56 +02:00
} )
2017-01-31 12:35:59 +01:00
minetest.register_craftitem ( " mcl_farming:bread " , {
2015-06-29 19:55:56 +02:00
description = " Bread " ,
2017-03-18 17:18:12 +01:00
_doc_items_longdesc = " This is a food item which can be eaten for 5 hunger points. " ,
2015-06-29 19:55:56 +02:00
inventory_image = " farming_bread.png " ,
2017-01-16 14:29:41 +01:00
groups = { food = 2 , eatable = 5 } ,
2017-02-16 17:45:33 +01:00
on_place = minetest.item_eat ( 5 ) ,
on_secondary_use = minetest.item_eat ( 5 ) ,
2015-06-29 19:55:56 +02:00
} )
2017-02-16 21:44:53 +01:00
minetest.register_node ( " mcl_farming:hay_block " , {
description = " Hay Bale " ,
2017-03-11 21:14:15 +01:00
_doc_items_longdesc = " Hay bales are decorative blocks made from wheat. " ,
2017-02-16 21:44:53 +01:00
tiles = { " mcl_farming_hayblock_top.png " , " mcl_farming_hayblock_top.png " , " mcl_farming_hayblock_side.png " } ,
is_ground_content = false ,
stack_max = 64 ,
paramtype2 = " facedir " ,
is_ground_content = false ,
on_place = mcl_util.rotate_axis ,
2017-02-27 18:32:35 +01:00
groups = { handy = 1 , flammable = 2 , building_block = 1 } ,
2017-02-16 21:44:53 +01:00
sounds = mcl_sounds.node_sound_leaves_defaults ( ) ,
2017-02-27 18:32:35 +01:00
_mcl_blast_resistance = 2.5 ,
_mcl_hardness = 0.5 ,
2017-02-16 21:44:53 +01:00
} )
minetest.register_craft ( {
output = ' mcl_farming:hay_block ' ,
recipe = {
{ ' mcl_farming:wheat_item ' , ' mcl_farming:wheat_item ' , ' mcl_farming:wheat_item ' } ,
{ ' mcl_farming:wheat_item ' , ' mcl_farming:wheat_item ' , ' mcl_farming:wheat_item ' } ,
{ ' mcl_farming:wheat_item ' , ' mcl_farming:wheat_item ' , ' mcl_farming:wheat_item ' } ,
}
} )
minetest.register_craft ( {
output = ' mcl_farming:wheat_item 9 ' ,
recipe = {
{ ' mcl_farming:hay_block ' } ,
}
} )