Allow BlockType to be used in if block
to test for air
This commit is contained in:
parent
fc7eab8906
commit
a86bb1e0fc
@ -91,6 +91,8 @@ class BlockType(namedtuple("_BlockType", "ID meta blocktypeSet")):
|
|||||||
|
|
||||||
return self.blocktypeSet.getBlockTypeAttr(self, attr)
|
return self.blocktypeSet.getBlockTypeAttr(self, attr)
|
||||||
|
|
||||||
|
def __nonzero__(self):
|
||||||
|
return int(self.ID) != 0 # self.ID is a numpy.int
|
||||||
|
|
||||||
id_limit = 4096
|
id_limit = 4096
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user