From: paramat Date: Tue, 8 Nov 2016 17:30:58 +0000 (+0000) Subject: Default: Make snowblock change 'dirt with grass' below X-Git-Tag: 0.4.15~47 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ddea6c431e2cc3d65318a1543cf153cee4058f9e;p=oweals%2Fminetest_game.git Default: Make snowblock change 'dirt with grass' below To be consistent with the snow slab. --- diff --git a/mods/default/nodes.lua b/mods/default/nodes.lua index bb3dfc8c..77dc6c48 100644 --- a/mods/default/nodes.lua +++ b/mods/default/nodes.lua @@ -473,6 +473,13 @@ minetest.register_node("default:snowblock", { dug = {name = "default_snow_footstep", gain = 0.2}, dig = {name = "default_snow_footstep", gain = 0.2} }), + + on_construct = function(pos) + pos.y = pos.y - 1 + if minetest.get_node(pos).name == "default:dirt_with_grass" then + minetest.set_node(pos, {name = "default:dirt_with_snow"}) + end + end, }) minetest.register_node("default:ice", {