copyWater can now be turned off without turning off copyAir

This commit is contained in:
David Vierra 2010-09-25 21:51:29 -10:00
parent 8c5d5e7388
commit 7e46c941bf

View File

@ -806,12 +806,13 @@ class MCLevel:
def copyBlockArrayMasked(self, blocks, sourceBlocks, copyAir, copyWater):
#assumes sourceBlocks has already been converted to my materials
mask = sourceBlocks == sourceBlocks
if not copyAir:
mask=(sourceBlocks!=0)
if not copyWater:
mask &=(sourceBlocks != self.materials.materialNamed("Water"))
mask &=(sourceBlocks != self.materials.materialNamed("Stationary water"))
mask &=(sourceBlocks != self.materials.materialNamed("Air"))
if not copyWater:
mask &=(sourceBlocks != self.materials.materialNamed("Water"))
mask &=(sourceBlocks != self.materials.materialNamed("Stationary water"))
blocks[mask] = sourceBlocks[mask]
return mask;