copyWater can now be turned off without turning off copyAir
This commit is contained in:
parent
8c5d5e7388
commit
7e46c941bf
@ -806,11 +806,12 @@ class MCLevel:
|
|||||||
|
|
||||||
def copyBlockArrayMasked(self, blocks, sourceBlocks, copyAir, copyWater):
|
def copyBlockArrayMasked(self, blocks, sourceBlocks, copyAir, copyWater):
|
||||||
#assumes sourceBlocks has already been converted to my materials
|
#assumes sourceBlocks has already been converted to my materials
|
||||||
|
mask = sourceBlocks == sourceBlocks
|
||||||
if not copyAir:
|
if not copyAir:
|
||||||
mask=(sourceBlocks!=0)
|
mask &=(sourceBlocks != self.materials.materialNamed("Air"))
|
||||||
if not copyWater:
|
if not copyWater:
|
||||||
mask &=(sourceBlocks != self.materials.materialNamed("Water"))
|
mask &=(sourceBlocks != self.materials.materialNamed("Water"))
|
||||||
mask &=(sourceBlocks != self.materials.materialNamed("Stationary water"))
|
mask &=(sourceBlocks != self.materials.materialNamed("Stationary water"))
|
||||||
|
|
||||||
blocks[mask] = sourceBlocks[mask]
|
blocks[mask] = sourceBlocks[mask]
|
||||||
return mask;
|
return mask;
|
||||||
|
Reference in New Issue
Block a user