From ff0c75559cc69c4ba4c815629bba80ec799158cf Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 27 Feb 2017 23:14:34 +0100 Subject: [PATCH] Remove deco_block group from simple stairs --- mods/ITEMS/stairs/init.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/stairs/init.lua b/mods/ITEMS/stairs/init.lua index 17c6022864..a334f72f2f 100644 --- a/mods/ITEMS/stairs/init.lua +++ b/mods/ITEMS/stairs/init.lua @@ -231,7 +231,15 @@ end -- Makes stair and slab out of a source node function stairs.register_stair_and_slab_simple(subname, sourcenode, desc_stair, desc_slab) local def = minetest.registered_nodes[sourcenode] - stairs.register_stair_and_slab(subname, sourcenode, def.groups, def.tiles, desc_stair, desc_slab, def.sounds, def._mcl_hardness) + local groups = {} + -- Only allow a strict set of groups to be added to stairs and slabs for more predictable results + local allowed_groups = { "dig_immediate", "handy", "pickaxey", "axey", "shovely", "shearsy", "shearsy_wool", "swordy", "swordy_wool" } + for a=1, #allowed_groups do + if def.groups[allowed_groups[a]] then + groups[allowed_groups[a]] = def.groups[allowed_groups[a]] + end + end + stairs.register_stair_and_slab(subname, sourcenode, groups, def.tiles, desc_stair, desc_slab, def.sounds, def._mcl_hardness) end -- Register all Minecraft stairs and slabs