--[[ nodes.lua - basic node blocks for Inside The Box ]]-- -- table format: -- [1] name, also used for texture -- [2] true for stair/slab -- [3] tool if diggable version needs to be added -- [4] color versions? local nodes = { {"bricks_clay", true, "pickaxe", sounds.stone}, {"bricks_limestone", true, "pickaxe", sounds.stone}, {"bricks_marble", true, "pickaxe", sounds.stone}, {"bricks_sandstone", true, "pickaxe", sounds.stone}, {"bricks_stone", true, "pickaxe", sounds.stone}, {"bricks_stone_moss", true, "pickaxe", sounds.stone}, {"cobble", true, "pickaxe", sounds.stone}, {"cobble_moss", true, "pickaxe", sounds.stone}, {"limestone", true, "pickaxe", sounds.stone}, {"marble", true, "pickaxe", sounds.stone}, {"sandstone", true, "pickaxe", sounds.stone}, {"stone", true, "pickaxe", sounds.stone}, {"stone_moss", true, "pickaxe", sounds.stone}, {"bronze", false, "pickaxe", sounds.metal}, {"gold", false, "pickaxe", sounds.metal}, {"emerald", false, "pickaxe", sounds.stone}, {"iron", false, "pickaxe", sounds.metal}, {"clay", false, "shovel", sounds.dirt}, {"dirt", false, "shovel", sounds.dirt}, {"gravel", false, "shovel", sounds.gravel}, {"sand", false, "shovel", sounds.sand}, {"wood_dark", true, "axe", sounds.wood}, {"wood_light", true, "axe", sounds.wood}, {"wood_medium", true, "axe", sounds.wood}, {"grass", false, false, sounds.grass}, {"snow", false, "shovel", sounds.snow}, {"ice", false, "pickaxe", sounds.stone}, {"ore_black", false, "pickaxe", sounds.stone}, {"ore_blue", false, "pickaxe", sounds.stone}, {"ore_brown", false, "pickaxe", sounds.stone}, {"ore_cyan", false, "pickaxe", sounds.stone}, {"ore_gold", false, "pickaxe", sounds.stone}, {"ore_green", false, "pickaxe", sounds.stone}, {"ore_red", false, "pickaxe", sounds.stone}, } local function make_stair_slab(name, groups, b1, b2, snd) minetest.register_node("nodes:" .. name .. b1 .. "_stairs", { description = name .. " stairs" .. b2, tiles = {name .. ".png"}, drawtype = "mesh", mesh = "stairs_stair.obj", paramtype = "light", paramtype2 = "facedir", groups = groups, selection_box = { type = "fixed", fixed = { {-1/2, -1/2, -1/2, 1/2, 0, 1/2}, {-1/2, 0, 0, 1/2, 1/2, 1/2}, }, }, collision_box = { type = "fixed", fixed = { {-1/2, -1/2, -1/2, 1/2, 0, 1/2}, {-1/2, 0, 0, 1/2, 1/2, 1/2}, }, }, sounds = snd, }) minetest.register_node("nodes:" .. name .. b1 .. "_slab", { description = name .. " slab" .. b2, tiles = {name .. ".png"}, drawtype = "nodebox", paramtype = "light", paramtype2 = "facedir", groups = groups, node_box = { type = "fixed", fixed = {-1/2, -1/2, -1/2, 1/2, 0, 1/2}, }, sounds = snd, }) end for _, v in pairs(nodes) do local groups = {node = 1} if v[3] then -- register diggable node version groups[v[3]] = 3 minetest.register_node("nodes:" .. v[1] .. "_breakable", { description = v[1] .. " (breakable)", tiles = {v[1] .. ".png"}, groups = groups, sounds = v[4], }) if v[2] then make_stair_slab(v[1], groups, "_breakable", " (breakable)", v[4]) end end minetest.register_node("nodes:" .. v[1], { description = v[1], tiles = {v[1] .. ".png"}, groups = {node = 1, unbreakable = 1}, sounds = v[4], }) frame.register("nodes:" .. v[1]) if v[2] then make_stair_slab(v[1], {node = 1, unbreakable = 1}, "", "") walls.register("nodes:" .. v[1] .. "_wall", v[1] .. " Wall", v[1] .. ".png", v[4]) end end for _, v in pairs({"yellow", "white", "violet", "red", "pink", "orange", "magenta", "grey", "green", "dark_grey", "dark_green", "cyan", "brown", "blue", "black"}) do minetest.register_node("nodes:wool_" .. v, { description = v .. " wool", tiles = {"wool_" .. v .. ".png"}, groups = {node = 1, unbreakable = 1}, sounds = sounds.sand, }) make_stair_slab("wool_" .. v, {node = 1, unbreakable = 1}, "", "") minetest.register_node("nodes:wool_" .. v .. "_breakable", { description = v .. " wool (breakable", tiles = {"wool_" .. v .. ".png"}, groups = {axe = 1, node = 1}, sounds = sounds.sand, }) make_stair_slab("wool_" .. v, {axe = 1, node = 1}, "_breakable", " (breakable)", sounds.sand) frame.register("nodes:wool_" .. v) end -- trunks minetest.register_node("nodes:trunk_light_breakable", { description = "Light Trunk (breakable)", tiles = {"trunk_light_top.png", "trunk_light_top.png", "trunk_light.png"}, groups = {axe = 1, node = 1}, paramtype2 = "facedir", sounds = sounds.wood, }) minetest.register_node("nodes:trunk_light", { description = "Light Trunk", tiles = {"trunk_light_top.png", "trunk_light_top.png", "trunk_light.png"}, groups = {node = 1, unbreakable = 1}, paramtype2 = "facedir", sounds = sounds.wood, }) frame.register("nodes:trunk_light") minetest.register_node("nodes:trunk_medium_breakable", { description = "Medium Trunk (breakable)", tiles = {"trunk_medium_top.png", "trunk_medium_top.png", "trunk_medium.png"}, groups = {axe = 1, node = 1}, paramtype2 = "facedir", sounds = sounds.wood, }) minetest.register_node("nodes:trunk_medium", { description = "medium Trunk", tiles = {"trunk_medium_top.png", "trunk_medium_top.png", "trunk_medium.png"}, groups = {node = 1, unbreakable = 1}, paramtype2 = "facedir", sounds = sounds.wood, }) frame.register("nodes:trunk_medium") minetest.register_node("nodes:trunk_dark_breakable", { description = "Dark Trunk (breakable)", tiles = {"trunk_dark_top.png", "trunk_dark_top.png", "trunk_dark.png"}, groups = {axe = 1, node = 1}, paramtype2 = "facedir", sounds = sounds.wood, }) minetest.register_node("nodes:trunk_dark", { description = "Dark Trunk", tiles = {"trunk_dark_top.png", "trunk_dark_top.png", "trunk_dark.png"}, groups = {node = 1, unbreakable = 1}, paramtype2 = "facedir", sounds = sounds.wood, }) frame.register("nodes:trunk_dark") -- barrier minetest.register_node("nodes:barrier", { description = "Barrier", pointable = true, -- make it easy to understand that it's a barrier drawtype = "allfaces_optional", inventory_image = "barrier.png", tiles = {"itb_blank.png"}, sunlight_propagates = true, paramtype = "light", collision_box = { type = "fixed", -- oversized to prevent crawling through fixed = {-1,-0.5,-1,1,1,1}, }, }) local function lamp_on_untrigger(pos) local meta = minetest.get_meta(pos) local node = minetest.get_node(pos) meta:set_string("on_name", node.name) node.name = "nodes:lamp_bar_0" minetest.swap_node(pos, node) end -- glass minetest.register_node("nodes:glass", { description = "glass", drawtype = "glasslike_framed_optional", sunlight_propagates = true, paramtype = "light", tiles = {"glass.png"}, groups = {node = 1, unbreakable = 1}, sounds = sounds.glass, }) frame.register("nodes:glass") minetest.register_node("nodes:glass_breakable", { description = "glass (breakable)", drawtype = "glasslike_framed_optional", sunlight_propagates = true, paramtype = "light", tiles = {"glass.png"}, groups = {node = 1, pickaxe = 1}, sounds = sounds.glass, }) -- light fixtures for _, v in pairs({14, 11, 8, 0}) do local on_trigger = function(pos) end local on_untrigger = function(pos) end if v == 0 then on_trigger = function(pos) local meta = minetest.get_meta(pos) local node = minetest.get_node(pos) local new_name = meta:get_string("on_name") if new_name ~= "" then node.name = new_name minetest.swap_node(pos, node) if string.find(new_name, "broken") then minetest.get_node_timer(pos):start(math.random(50)/10) end end end else on_untrigger = lamp_on_untrigger end minetest.register_node("nodes:lamp_bar_" .. v, { description = "A Lamp (" .. v .. ")", light_source = v, sunlight_propagates = true, tiles = {"lamp_bar.png"}, paramtype = "light", paramtype2 = "facedir", drawtype = "nodebox", node_box = { type = "fixed", fixed = {-1, 1/4, 1/4, 1, 1/2, 1/2}, }, groups = {node = 1, unbreakable = 1}, sounds = sounds.glass, on_rotate = screwdriver.rotate_simple(), on_trigger = on_trigger, on_untrigger = on_untrigger, after_dig_node = mech.after_dig, }) end minetest.register_node("nodes:lamp_bar_broken", { description = "A Broken Lamp (flickering)", light_source = 8, sunlight_propagates = true, tiles = {"lamp_bar.png"}, paramtype = "light", paramtype2 = "facedir", drawtype = "nodebox", node_box = { type = "fixed", fixed = {-1, 1/4, 1/4, 1, 1/2, 1/2}, }, groups = {node = 1, unbreakable = 1}, sounds = sounds.glass, on_rotate = screwdriver.rotate_simple(), on_trigger = function(pos) end, on_untrigger = lamp_on_untrigger, on_timer = function(pos) local node = minetest.get_node(pos) minetest.set_node(pos, {name = "nodes:lamp_bar_broken_off", param2 = node.param2}) end, on_construct = function(pos) minetest.get_node_timer(pos):start(math.random(50)/10) end, after_dig_node = mech.after_dig, }) minetest.register_node("nodes:lamp_bar_broken_off", { description = "A Broken Lamp (flickering, off)", sunlight_propagates = true, tiles = {"lamp_bar.png"}, paramtype = "light", paramtype2 = "facedir", drawtype = "nodebox", node_box = { type = "fixed", fixed = {-1, 1/4, 1/4, 1, 1/2, 1/2}, }, groups = {node = 1, unbreakable = 1}, sounds = sounds.glass, on_rotate = screwdriver.rotate_simple(), on_trigger = function(pos) end, on_untrigger = lamp_on_untrigger, on_timer = function(pos) local node = minetest.get_node(pos) minetest.set_node(pos, {name = "nodes:lamp_bar_broken", param2 = node.param2}) end, on_construct = function(pos) minetest.get_node_timer(pos):start(math.random(50)/10) end, after_dig_node = mech.after_dig, }) for _, wood in ipairs({"wood_dark", "wood_light", "wood_medium"}) do fences.register_fence("nodes:fence_" .. wood, { description = wood .. " Fence", texture = wood .. "_fence.png", inventory_image = "default_fence_overlay.png^" .. wood .. ".png^default_fence_overlay.png^[makealpha:255,126,126", wield_image = "default_fence_overlay.png^" .. wood .. ".png^default_fence_overlay.png^[makealpha:255,126,126", groups = {node = 1, unbreakable = 1}, sounds = sounds.wood, }) end -- ladders, rope & vines for _, n in pairs({ {"ladder", "signlike"}, {"rope", "plantlike"}, {"vine", "signlike"}, }) do minetest.register_node("nodes:" .. n[1], { description = n[1], drawtype = n[2], tiles = {n[1] .. ".png"}, inventory_image = n[1] .. ".png", paramtype = "light", paramtype2 = "wallmounted", sunlight_propagates = true, walkable = false, climbable = true, selection_box = n[2] == "signlike" and {type = "wallmounted"}, groups = {node = 1, unbreakable = 1}, sounds = sounds.wood, }) frame.register("nodes:" .. n[1]) end -- special nodes -- liquids minetest.register_node("nodes:water_source", { description = "Water Source", drawtype = "liquid", tiles = { { name = "water_source_animated.png", animation = { type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 2.0, }, }, }, special_tiles = { -- New-style water source material (mostly unused) { name = "water_source_animated.png", animation = { type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 2.0, }, backface_culling = false, }, }, alpha = 160, paramtype = "light", walkable = false, pointable = false, diggable = false, buildable_to = true, is_ground_content = false, drop = "", drowning = 1, liquidtype = "source", liquid_alternative_flowing = "nodes:water_flowing", liquid_alternative_source = "nodes:water_source", liquid_viscosity = 1, post_effect_color = {a = 203, r = 30, g = 60, b = 90}, groups = {water = 3, liquid = 3, puts_out_fire = 1, cools_lava = 1}, sounds = sounds.water, }) minetest.register_node("nodes:water_flowing", { description = "Flowing Water", drawtype = "flowingliquid", tiles = {"water.png"}, special_tiles = { { name = "water_flowing_animated.png", backface_culling = false, animation = { type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 0.8, }, }, { name = "water_flowing_animated.png", backface_culling = true, animation = { type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 0.8, }, }, }, alpha = 160, paramtype = "light", paramtype2 = "flowingliquid", walkable = false, pointable = false, diggable = false, buildable_to = true, is_ground_content = false, drop = "", drowning = 1, liquidtype = "flowing", liquid_alternative_flowing = "nodes:water_flowing", liquid_alternative_source = "nodes:water_source", liquid_viscosity = 1, post_effect_color = {a = 203, r = 30, g = 60, b = 90}, groups = {water = 3, liquid = 3, puts_out_fire = 1, not_in_creative_inventory = 1, cools_lava = 1}, sounds = sounds.water, }) minetest.register_node("nodes:river_water_source", { description = "River Water Source", drawtype = "liquid", tiles = { { name = "river_water_source_animated.png", animation = { type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 2.0, }, }, }, special_tiles = { { name = "river_water_source_animated.png", animation = { type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 2.0, }, backface_culling = false, }, }, alpha = 160, paramtype = "light", walkable = false, pointable = false, diggable = false, buildable_to = true, is_ground_content = false, drop = "", drowning = 1, liquidtype = "source", liquid_alternative_flowing = "nodes:river_water_flowing", liquid_alternative_source = "nodes:river_water_source", liquid_viscosity = 1, liquid_renewable = false, liquid_range = 2, post_effect_color = {a = 203, r = 30, g = 76, b = 90}, groups = {water = 3, liquid = 3, puts_out_fire = 1, cools_lava = 1}, sounds = sounds.water, }) minetest.register_node("nodes:river_water_flowing", { description = "Flowing River Water", drawtype = "flowingliquid", tiles = {"river_water.png"}, special_tiles = { { name = "river_water_flowing_animated.png", backface_culling = false, animation = { type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 0.8, }, }, { name = "river_water_flowing_animated.png", backface_culling = true, animation = { type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 0.8, }, }, }, alpha = 160, paramtype = "light", paramtype2 = "flowingliquid", walkable = false, pointable = false, diggable = false, buildable_to = true, is_ground_content = false, drop = "", drowning = 1, liquidtype = "flowing", liquid_alternative_flowing = "nodes:river_water_flowing", liquid_alternative_source = "nodes:river_water_source", liquid_viscosity = 1, liquid_renewable = false, liquid_range = 2, post_effect_color = {a = 203, r = 30, g = 76, b = 90}, groups = {water = 3, liquid = 3, puts_out_fire = 1, not_in_creative_inventory = 1, cools_lava = 1}, sounds = sounds.water, }) minetest.register_node("nodes:lava_source", { description = "Lava Source", drawtype = "liquid", tiles = { { name = "lava_source_animated.png", animation = { type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.0, }, }, }, special_tiles = { -- New-style lava source material (mostly unused) { name = "lava_source_animated.png", animation = { type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.0, }, backface_culling = false, }, }, paramtype = "light", light_source = 8, walkable = false, pointable = false, diggable = false, buildable_to = true, is_ground_content = false, drop = "", drowning = 1, liquidtype = "source", liquid_alternative_flowing = "nodes:lava_flowing", liquid_alternative_source = "nodes:lava_source", liquid_viscosity = 7, liquid_renewable = false, damage_per_second = 4 * 2, post_effect_color = {a = 191, r = 255, g = 64, b = 0}, groups = {lava = 3, liquid = 2, igniter = 1}, sounds = sounds.water, }) minetest.register_node("nodes:lava_flowing", { description = "Flowing Lava", drawtype = "flowingliquid", tiles = {"lava.png"}, special_tiles = { { name = "lava_flowing_animated.png", backface_culling = false, animation = { type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.3, }, }, { name = "lava_flowing_animated.png", backface_culling = true, animation = { type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.3, }, }, }, paramtype = "light", paramtype2 = "flowingliquid", light_source = 8, walkable = false, pointable = false, diggable = false, buildable_to = true, is_ground_content = false, drop = "", drowning = 1, liquidtype = "flowing", liquid_alternative_flowing = "nodes:lava_flowing", liquid_alternative_source = "nodes:lava_source", liquid_viscosity = 7, liquid_renewable = false, damage_per_second = 4 * 2, post_effect_color = {a = 191, r = 255, g = 64, b = 0}, groups = {lava = 3, liquid = 2, igniter = 1, not_in_creative_inventory = 1}, sounds = sounds.water, }) -- tnt -- fire minetest.register_node("nodes:fire", { description = "Fire", drawtype = "firelike", tiles = { { name = "fire_animated.png", animation = { type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 1.6, }, }, }, inventory_image = "fire.png", paramtype = "light", light_source = 13, walkable = false, buildable_to = true, sunlight_propagates = true, damage_per_second = 4, groups = {igniter = 2, dig_immediate = 3}, drop = "", }) frame.register("nodes:fire") -- chests: -- empty (fake) chest -- chest-with-key -- chest-with-tool for _, name in ipairs({ "nothing", "boxes:nexus", "tools:axe", "tools:pickaxe", "tools:shovel", "tools:sword", "tools:flint_and_steel", }) do minetest.register_node("nodes:chest_with_" .. string.gsub(name, ":", "_"), { description = "Chest with " .. name, drawtype = "mesh", paramtype = "light", paramtype2 = "facedir", mesh = "chest_close.obj", tiles = {"chest.png"}, on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) node.name = "nodes:chest_open" minetest.set_node(pos, node) if name ~= "nothing" then if itemstack:item_fits(name) then itemstack:add_item(name) return itemstack end clicker:get_inventory():add_item("main", name) end return itemstack end, }) end minetest.register_alias("nodes:chest_with_boxes_findme_item", "nodes:chest_with_boxes_nexus") minetest.register_node("nodes:chest_open", { description = "Chest", drawtype = "mesh", paramtype = "light", paramtype2 = "facedir", mesh = "chest_open.obj", tiles = {"chest.png"}, on_construct = function(pos) minetest.sound_play("chest_open", {pos = pos}) minetest.get_node_timer(pos):start(3.0) end, on_timer = function(pos) minetest.sound_play("chest_close", {pos = pos}) local node = minetest.get_node(pos) minetest.set_node(pos, {name = "nodes:chest_with_nothing", param2 = node.param2}) end, groups = {node = 0}, }) -- vegetation: -- leaves for _, v in pairs({ "leaves_light", "leaves_medium", "leaves_dark", }) do minetest.register_node("nodes:" .. v .. "_breakable", { description = v .. " (breakable)", drawtype = "allfaces_optional", tiles = {v .. ".png"}, groups = {node = 1, axe = 1}, sounds = sounds.leaves, }) minetest.register_node("nodes:" .. v, { description = v, drawtype = "allfaces_optional", tiles = {v .. ".png"}, groups = {node = 1, unbreakable = 1}, sounds = sounds.leaves, }) end -- grass variants -- flowers -- farming plants -- flowerpot combos for _, n in pairs({ {"grass_1", 56}, {"grass_2", 56}, {"grass_3", 56}, {"grass_4", 56}, {"grass_5", 56}, {"rose", 9}, {"dandelion", 9}, {"white_tulip", 9}, {"allium", 9}, {"orchid", 9}, {"daisy", 9}, {"houstonia", 9}, {"paeonia", 9}, {"wheat_stage_0", 11}, {"wheat_stage_1", 11}, {"wheat_stage_2", 11}, {"wheat_stage_3", 11}, {"wheat_stage_4", 11}, {"wheat_stage_5", 11}, {"wheat_stage_6", 11}, {"wheat_stage_7", 11}, {"potatoes_stage_0", 10}, {"potatoes_stage_1", 10}, {"potatoes_stage_2", 10}, {"potatoes_stage_3", 10}, {"carrots_stage_0", 8}, {"carrots_stage_1", 8}, {"carrots_stage_2", 8}, {"carrots_stage_3", 8}, {"sapling_1", 8}, {"sapling_2", 8}, {"sapling_3", 8}, {"sapling_4", 8}, {"sapling_5", 8}, {"sapling_6", 8}, }) do if n[2] then minetest.register_node("nodes:" .. n[1], { description = n[1], drawtype = "plantlike", place_param2 = n[2], tiles = {n[1] .. ".png"}, paramtype = "light", paramtype2 = "meshoptions", sunlight_propagates = true, walkable = false, selection_box = { type = "fixed", fixed = {-1/4, -1/2, -1/4, 1/4, 1/4, 1/4}, }, sounds = sounds.grass, }) else minetest.register_node("nodes:" .. n[1], { description = n[1], drawtype = "plantlike", tiles = {n[1] .. ".png"}, paramtype = "light", sunlight_propagates = true, walkable = false, selection_box = { type = "fixed", fixed = {-1/4, -1/2, -1/4, 1/4, 1/4, 1/4}, }, sounds = sounds.grass, }) end frame.register("nodes:" .. n[1]) minetest.register_node("nodes:flowerpot_" ..n[1], { description = "Pot with " .. n[1], drawtype = "mesh", mesh = "flowerpot.obj", tiles = { {name = "pot.png"}, {name = n[1] .. ".png"}, }, paramtype = "light", sunlight_propagates = true, collision_box = { type = "fixed", fixed = {-1/4, -1/2, -1/4, 1/4, -1/8, 1/4}, }, selection_box = { type = "fixed", fixed = {-1/4, -1/2, -1/4, 1/4, 1/2, 1/4}, }, sounds = sounds.wood, }) end -- empty flowerpot minetest.register_node("nodes:flowerpot_empty", { description = "Pot (empty)", drawtype = "mesh", mesh = "flowerpot.obj", tiles = { {name = "pot.png"}, {name = "itb_blank.png"}, }, paramtype = "light", sunlight_propagates = true, collision_box = { type = "fixed", fixed = {-1/4, -1/2, -1/4, 1/4, -1/8, 1/4}, }, selection_box = { type = "fixed", fixed = {-1/4, -1/2, -1/4, 1/4, 1/2, 1/4}, }, sounds = sounds.wood, }) -- soil for _, v in pairs({ "soil", "soil_wet", }) do -- register diggable node version minetest.register_node("nodes:" .. v .. "_breakable", { description = v .. " (breakable)", tiles = {{name = v .. ".png"}, {name = "dirt.png"}}, groups = {node = 1, shovel = 1}, sounds = sounds.dirt, }) minetest.register_node("nodes:" .. v, { description = v, tiles = {{name = v .. ".png"}, {name = "dirt.png"}}, groups = {node = 1, unbreakable = 1}, sounds = sounds.dirt, }) frame.register("nodes:" .. v) end -- dirt with grass, minetest.register_node("nodes:dirt_with_grass_breakable", { description = "Dirt with grass (breakable)", tiles = {"grass.png", "dirt.png", "grass_side.png"}, groups = {node = 1, shovel = 1}, sounds = sounds.dirt, }) minetest.register_node("nodes:dirt_with_grass", { description = "Dirt with grass", tiles = {"grass.png", "dirt.png", "grass_side.png"}, groups = {node = 1, unbreakable = 1}, sounds = sounds.dirt, }) frame.register("nodes:dirt_with_grass") -- dirt with snow minetest.register_node("nodes:dirt_with_snow_breakable", { description = "Dirt with snow (breakable)", tiles = {"snow.png", "dirt.png", "grass_side_snowed.png"}, groups = {node = 1, shovel = 1}, sounds = sounds.snow, }) minetest.register_node("nodes:dirt_with_snow", { description = "Dirt with snow", tiles = {"snow.png", "dirt.png", "grass_side_snowed.png"}, groups = {node = 1, unbreakable = 1}, sounds = sounds.snow, }) frame.register("nodes:dirt_with_snow")