From ed35ccceb45b77f901e1d1ccef30fc4ddee10d17 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sun, 8 Apr 2012 18:34:05 +0300 Subject: [PATCH] minetest.get_node_group(name, group) --- builtin/misc.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/builtin/misc.lua b/builtin/misc.lua index 01d5d1d..23baca1 100644 --- a/builtin/misc.lua +++ b/builtin/misc.lua @@ -55,4 +55,11 @@ function minetest.hash_node_position(pos) return (pos.z+32768)*65536*65536 + (pos.y+32768)*65536 + pos.x+32768 end +function minetest.get_node_group(name, group) + if not minetest.registered_nodes[name] or not + minetest.registered_nodes[name].groups[group] then + return 0 + end + return minetest.registered_nodes[name].groups[group] +end