Allow BlockType to be used in if block to test for air

This commit is contained in:
David Vierra 2016-09-16 03:54:35 -10:00
parent fc7eab8906
commit a86bb1e0fc

View File

@ -91,6 +91,8 @@ class BlockType(namedtuple("_BlockType", "ID meta blocktypeSet")):
return self.blocktypeSet.getBlockTypeAttr(self, attr)
def __nonzero__(self):
return int(self.ID) != 0 # self.ID is a numpy.int
id_limit = 4096