2017-01-31 14:35:59 +03:00
minetest.register_node ( " mcl_farming:soil " , {
2015-06-29 20:55:56 +03:00
tiles = { " farming_soil.png " , " default_dirt.png " , " default_dirt.png " , " default_dirt.png " , " default_dirt.png " , " default_dirt.png " } ,
2017-01-08 05:05:41 +03:00
description = " Farmland " ,
2017-03-11 20:32:39 +03:00
_doc_items_longdesc = " Farmland is used for farming, a necessary surface to plant crops. It is created when a hoe is used on dirt or a similar block. Plants are able to grow on farmland, but slowly. Farmland will become hydrated farmland (on which plants grow faster) when it rains or a water source is nearby. " ,
2017-02-01 01:32:56 +03:00
drop = " mcl_core:dirt " ,
2015-06-29 20:55:56 +03:00
drawtype = " nodebox " ,
paramtype = " light " ,
node_box = {
type = " fixed " ,
fixed = {
2017-01-08 05:12:36 +03:00
-- 15/16 of the normal height
{ - 0.5 , - 0.5 , - 0.5 , 0.5 , 0.4375 , 0.5 } ,
2015-06-29 20:55:56 +03:00
}
} ,
2017-02-27 03:26:07 +03:00
groups = { handy = 1 , shovely = 1 , not_in_creative_inventory = 1 , soil = 2 , soil_sapling = 1 } ,
2017-02-11 20:46:23 +03:00
sounds = mcl_sounds.node_sound_dirt_defaults ( ) ,
2017-02-22 18:03:59 +03:00
_mcl_blast_resistance = 3 ,
2017-03-20 21:53:14 +03:00
_mcl_hardness = 0.6 ,
2015-06-29 20:55:56 +03:00
} )
2017-01-31 14:35:59 +03:00
minetest.register_node ( " mcl_farming:soil_wet " , {
2015-06-29 20:55:56 +03:00
tiles = { " farming_soil_wet.png " , " default_dirt.png " , " default_dirt.png " , " default_dirt.png " , " default_dirt.png " , " default_dirt.png " } ,
2017-01-08 05:05:41 +03:00
description = " Hydrated Farmland " ,
2017-03-11 20:32:39 +03:00
_doc_items_longdesc = " Hydrated farmland is used in farming, this is where you can plant and grow some plants. It is created when farmlands is under rain or near water. " ,
2017-02-01 01:32:56 +03:00
drop = " mcl_core:dirt " ,
2015-06-29 20:55:56 +03:00
drawtype = " nodebox " ,
paramtype = " light " ,
node_box = {
type = " fixed " ,
fixed = {
2017-01-08 05:12:36 +03:00
{ - 0.5 , - 0.5 , - 0.5 , 0.5 , 0.4375 , 0.5 } ,
2015-06-29 20:55:56 +03:00
}
} ,
2017-02-27 03:26:07 +03:00
groups = { handy = 1 , shovely = 1 , not_in_creative_inventory = 1 , soil = 3 , soil_sapling = 1 } ,
2017-02-11 20:46:23 +03:00
sounds = mcl_sounds.node_sound_dirt_defaults ( ) ,
2017-02-22 18:03:59 +03:00
_mcl_blast_resistance = 3 ,
2017-03-20 21:53:14 +03:00
_mcl_hardness = 0.6 ,
2015-06-29 20:55:56 +03:00
} )
minetest.register_abm ( {
2017-01-31 14:35:59 +03:00
nodenames = { " mcl_farming:soil " } ,
2015-06-29 20:55:56 +03:00
interval = 15 ,
chance = 3 ,
action = function ( pos , node )
2017-02-18 06:08:27 +03:00
if minetest.find_node_near ( pos , 4 , { " mcl_core:water_source " , " mcl_core:water_flowing " } ) then
2017-01-31 14:35:59 +03:00
node.name = " mcl_farming:soil_wet "
2017-01-11 20:21:46 +03:00
minetest.set_node ( pos , node )
2015-06-29 20:55:56 +03:00
end
end ,
} )