def blockstateToID(self, name, properties):
        """
        Converts from a BlockState to a numerical ID/Data pair
    
        :param name: The BlockState name
        :type name: str
        :param properties: A list of Property/Value pairs in dict form
        :type properties: list
        :return: A tuple containing the numerical ID/Data pair (<id>, <data>)
        :rtype: tuple
        """
        
        if ":" in name:
            prefix, name = name.split(":")
        else:
            prefix = "minecraft"
            
        if prefix not in self.blockstates:
            return -1, -1
        elif name not in self.blockstates[prefix]:
            return -1, -1
        
        bid = self.blockstates[prefix][name]["id"]
        for prop in self.blockstates[prefix][name]["properties"]:
            correct = True
            for (key, value) in properties.iteritems():
                if key in prop:
                    correct = correct and (prop[key] == value)
            if correct:
                return bid, prop["<data>"]
        return bid, 0

        Converts from a BlockState to a numerical ID/Data pair
    
        :param name: The BlockState name
        :type name: str
        :param properties: A list of Property/Value pairs in dict form
        :type properties: list
        :return: A tuple containing the numerical ID/Data pair (<id>, <data>)
        :rtype: tuple
        
pymclevel/materials.py