diff --git a/mods/default/crafting.lua b/mods/default/crafting.lua index 61f916e7bd..b87e039958 100644 --- a/mods/default/crafting.lua +++ b/mods/default/crafting.lua @@ -48,6 +48,13 @@ minetest.register_craft({ } }) +minetest.register_craft({ + output = 'default:coarse_dirt 4', + recipe = { + {'default:dirt', 'default:gravel'}, + {'default:gravel', 'default:dirt'}, + } +}) minetest.register_craft({ output = 'default:stick 4', diff --git a/mods/default/nodes.lua b/mods/default/nodes.lua index 1678fa5680..73bc6034c2 100644 --- a/mods/default/nodes.lua +++ b/mods/default/nodes.lua @@ -235,6 +235,14 @@ minetest.register_node("default:dirt", { sounds = default.node_sound_dirt_defaults(), }) +minetest.register_node("default:coarse_dirt", { + description = "Coarse Dirt", + tiles = {"default_coarse_dirt.png"}, + is_ground_content = true, + stack_max = 64, + groups = {crumbly=3, soil=1}, + sounds = default.node_sound_dirt_defaults(), +}) minetest.register_node("default:gravel", { description = "Gravel", diff --git a/mods/default/textures/default_coarse_dirt.png b/mods/default/textures/default_coarse_dirt.png new file mode 100644 index 0000000000..86c406ba27 Binary files /dev/null and b/mods/default/textures/default_coarse_dirt.png differ diff --git a/mods/farming/hoes.lua b/mods/farming/hoes.lua index f15d1ea77e..f0905bf1f3 100644 --- a/mods/farming/hoes.lua +++ b/mods/farming/hoes.lua @@ -2,13 +2,19 @@ local function create_soil(pos, inv) if pos == nil then return false end - local node = minetest.env:get_node(pos) + local node = minetest.get_node(pos) local name = node.name - local above = minetest.env:get_node({x=pos.x, y=pos.y+1, z=pos.z}) + local above = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}) if name == "default:dirt" or name == "default:dirt_with_grass" then if above.name == "air" then node.name = "farming:soil" - minetest.env:set_node(pos, node) + minetest.set_node(pos, node) + return true + end + elseif name == "default:coarse_dirt" then + if above.name == "air" then + node.name = "default:dirt" + minetest.set_node(pos, node) return true end end