diff --git a/travelnet.lua b/travelnet.lua index 9300a3b..4870279 100644 --- a/travelnet.lua +++ b/travelnet.lua @@ -82,7 +82,9 @@ minetest.register_node("travelnet:travelnet", { local pos = pointed_thing.above; local node_name = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name - if( not node_name or not minetest.registered_nodes[node_name].buildable_to ) then + local def = minetest.registered_nodes[ + minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name] + if not def or not def.buildable_to then minetest.chat_send_player( placer:get_player_name(), S('Not enough vertical space to place the travelnet box!')) return;