2017-01-31 12:35:59 +01:00
|
|
|
minetest.register_node("mcl_farming:soil", {
|
2015-06-29 19:55:56 +02:00
|
|
|
tiles = {"farming_soil.png", "default_dirt.png", "default_dirt.png", "default_dirt.png", "default_dirt.png", "default_dirt.png"},
|
2017-01-08 03:05:41 +01:00
|
|
|
description = "Farmland",
|
2017-01-31 23:32:56 +01:00
|
|
|
drop = "mcl_core:dirt",
|
2015-06-29 19:55:56 +02:00
|
|
|
drawtype = "nodebox",
|
|
|
|
paramtype = "light",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
2017-01-08 03:12:36 +01:00
|
|
|
-- 15/16 of the normal height
|
|
|
|
{-0.5, -0.5, -0.5, 0.5, 0.4375, 0.5},
|
2015-06-29 19:55:56 +02:00
|
|
|
}
|
|
|
|
},
|
2017-01-12 07:07:30 +01:00
|
|
|
groups = { crumbly=3, not_in_creative_inventory=1, soil=2, soil_sapling=1 },
|
2017-01-31 23:32:56 +01:00
|
|
|
sounds = mcl_core.node_sound_dirt_defaults(),
|
2015-06-29 19:55:56 +02:00
|
|
|
})
|
|
|
|
|
2017-01-31 12:35:59 +01:00
|
|
|
minetest.register_node("mcl_farming:soil_wet", {
|
2015-06-29 19:55:56 +02:00
|
|
|
tiles = {"farming_soil_wet.png", "default_dirt.png", "default_dirt.png", "default_dirt.png", "default_dirt.png", "default_dirt.png"},
|
2017-01-08 03:05:41 +01:00
|
|
|
description = "Hydrated Farmland",
|
2017-01-31 23:32:56 +01:00
|
|
|
drop = "mcl_core:dirt",
|
2015-06-29 19:55:56 +02:00
|
|
|
drawtype = "nodebox",
|
|
|
|
paramtype = "light",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
2017-01-08 03:12:36 +01:00
|
|
|
{-0.5, -0.5, -0.5, 0.5, 0.4375, 0.5},
|
2015-06-29 19:55:56 +02:00
|
|
|
}
|
|
|
|
},
|
2017-01-12 07:07:30 +01:00
|
|
|
groups = { crumbly=3, not_in_creative_inventory=1, soil=3, soil_sapling=1 },
|
2017-01-31 23:32:56 +01:00
|
|
|
sounds = mcl_core.node_sound_dirt_defaults(),
|
2015-06-29 19:55:56 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_abm({
|
2017-01-31 12:35:59 +01:00
|
|
|
nodenames = {"mcl_farming:soil"},
|
2015-06-29 19:55:56 +02:00
|
|
|
interval = 15,
|
|
|
|
chance = 3,
|
|
|
|
action = function(pos, node)
|
2017-01-31 23:32:56 +01:00
|
|
|
if minetest.find_node_near(pos, 3, {"mcl_core:water_source", "mcl_core:water_flowing"}) then
|
2017-01-31 12:35:59 +01:00
|
|
|
node.name = "mcl_farming:soil_wet"
|
2017-01-11 18:21:46 +01:00
|
|
|
minetest.set_node(pos, node)
|
2015-06-29 19:55:56 +02:00
|
|
|
end
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|