From 2fb0e547a01a6e61b821737e61315bad3312e41e Mon Sep 17 00:00:00 2001 From: Diego Martínez Date: Fri, 5 Apr 2013 02:51:31 -0300 Subject: Use the nodebox as selection box if it's not set manually --- builtin/misc_register.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'builtin') diff --git a/builtin/misc_register.lua b/builtin/misc_register.lua index f9c06a02a..d1e28fdab 100644 --- a/builtin/misc_register.lua +++ b/builtin/misc_register.lua @@ -103,6 +103,10 @@ function minetest.register_item(name, itemdef) -- Apply defaults and add to registered_* table if itemdef.type == "node" then + -- Use the nodebox as selection box if it's not set manually + if itemdef.drawtype == "nodebox" and not itemdef.selection_box then + itemdef.selection_box = itemdef.node_box + end setmetatable(itemdef, {__index = minetest.nodedef_default}) minetest.registered_nodes[itemdef.name] = itemdef elseif itemdef.type == "craft" then -- cgit v1.2.3