本文整理汇总了Python中mceditlib.util.exhaust函数的典型用法代码示例。如果您正苦于以下问题:Python exhaust函数的具体用法?Python exhaust怎么用?Python exhaust使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了exhaust函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: timeFillCeiling
def timeFillCeiling():
temp = bench_temp_level("AnvilWorld")
editor = temp
dim = editor.getDimension()
bounds = dim.bounds
x, y, z = bounds.center
y = 254
x -= size//2
z -= size//2
bounds = BoundingBox((x, y, z), (size, 1, size))
exhaust(dim.fillBlocksIter(bounds, editor.blocktypes["planks"]))
示例2: updateSelection
def updateSelection(self):
if self.dimension is None or self.selection is None:
return
selection = self.selection
self.renderSelection = selection & NonAirMaskSelection(self.dimension, selection)
self.groupNode.clear()
self._loader = None
if selection.chunkCount < 16:
exhaust(self.loadSections())
self.loadTimer.setInterval(333)
示例3: exportSchematic
def exportSchematic(self, selection):
"""
:type selection: mceditlib.box.BoundingBox
:return:
:rtype: WorldEditor
"""
return exhaust(self.exportSchematicIter(selection))
示例4: displaySchematic
def displaySchematic(self, schematic, offset):
if schematic is not None:
dim = schematic.getDimension()
if self.worldScene:
self.sceneHolderNode.removeChild(self.worldScene)
self.loader.timer.stop()
self.loader = None
atlas = self.editorSession.textureAtlas
self.worldScene = WorldScene(dim, atlas)
self.sceneHolderNode.translateOffset = offset
self.sceneHolderNode.addChild(self.worldScene)
self.loader = WorldLoader(self.worldScene)
if dim.chunkCount() <= self.instantDisplayChunks:
exhaust(self.loader.work())
else:
self.loader.timer.start()
else:
self.clearSchematic()
示例5: copyBlocks
def copyBlocks(
self,
sourceLevel,
sourceSelection,
destinationPoint,
blocksToCopy=None,
entities=True,
create=False,
biomes=False,
updateLights=False,
):
return exhaust(
self.copyBlocksIter(
sourceLevel, sourceSelection, destinationPoint, blocksToCopy, entities, create, biomes, updateLights
)
)
示例6: extractSchematicFrom
def extractSchematicFrom(sourceDim, box, *a, **kw):
"""
Extract a schematic from the given dimension within the given selection box. The
minimum corner of the given box becomes the schematic's (0,0,0) coordinate.
Parameters
----------
sourceDim : WorldEditorDimension
box : SelectionBox
a :
kw :
Returns
-------
WorldEditor
"""
return exhaust(extractSchematicFromIter(sourceDim, box, *a, **kw))
示例7: perform
def perform(self):
if len(self.points) > 10:
showProgress("Performing brush...", self._perform(), cancel=True)
else:
exhaust(self._perform())
示例8: extractSchematicFrom
def extractSchematicFrom(sourceDim, box, *a, **kw):
return exhaust(extractSchematicFromIter(sourceDim, box, *a, **kw))
示例9: saveChanges
def saveChanges(self):
exhaust(self.saveChangesIter())
示例10: commitUndo
def commitUndo(self, revisionInfo=None):
exhaust(self.commitUndoIter(revisionInfo))
示例11: generateChunksInLevel
def generateChunksInLevel(self, level, chunks):
return exhaust(self.generateChunksInLevelIter(level, chunks))
示例12: createLevel
def createLevel(self, level, box, simulate=False, **kw):
return exhaust(self.createLevelIter(level, box, simulate, **kw))
示例13: generateAtPosition
def generateAtPosition(self, tempWorld, tempDir, cx, cz):
return exhaust(self.generateAtPositionIter(tempWorld, tempDir, cx, cz))
示例14: loadImmediateChunks
def loadImmediateChunks(self):
if self.selection.chunkCount < 16:
exhaust(self.loadSections())
self.loadTimer.setInterval(333)
示例15: testCopyRelight
def testCopyRelight(pc_world, schematic_world):
destDim = pc_world.getDimension()
exhaust(destDim.copyBlocksIter(schematic_world.getDimension(), BoundingBox((0, 0, 0), (32, 64, 32,)),
destDim.bounds.origin))
pc_world.saveChanges()