Remove some dead code
This commit is contained in:
parent
50425f384f
commit
9b458c3369
@ -116,10 +116,6 @@ class BrushMode(object):
|
|||||||
"""
|
"""
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
|
|
||||||
def applyToChunkSlices(self, op, chunk, slices, brushBox, brushBoxThisChunk):
|
|
||||||
raise NotImplementedError
|
|
||||||
|
|
||||||
def createOptionsPanel(self, tool):
|
def createOptionsPanel(self, tool):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -128,37 +128,3 @@ class ChunkMeshBase(MeshBase):
|
|||||||
"""
|
"""
|
||||||
self.chunkUpdate = chunkUpdate
|
self.chunkUpdate = chunkUpdate
|
||||||
self.vertexArrays = []
|
self.vertexArrays = []
|
||||||
|
|
||||||
class BlockMeshBase(MeshBase):
|
|
||||||
|
|
||||||
def __init__(self, sectionUpdate):
|
|
||||||
"""
|
|
||||||
|
|
||||||
:type sectionUpdate: SectionUpdate
|
|
||||||
"""
|
|
||||||
self.sectionUpdate = sectionUpdate
|
|
||||||
self.vertexArrays = []
|
|
||||||
|
|
||||||
def getRenderTypeMask(self):
|
|
||||||
return self.sectionUpdate.blockRenderTypes == self.renderType
|
|
||||||
|
|
||||||
def facingBlockLights(self, direction):
|
|
||||||
return self.sectionUpdate.areaBlockLights[directionOffsets[direction]]
|
|
||||||
|
|
||||||
def facingSkyLights(self, direction):
|
|
||||||
return self.sectionUpdate.areaSkyLights[directionOffsets[direction]]
|
|
||||||
|
|
||||||
def makeVertices(self):
|
|
||||||
yield
|
|
||||||
arrays = []
|
|
||||||
renderTypeMask = self.getRenderTypeMask()
|
|
||||||
yield
|
|
||||||
|
|
||||||
for (direction, exposedFaceMask) in enumerate(self.sectionUpdate.exposedBlockMasks):
|
|
||||||
vertexBuffer = self.makeFaceVertices(direction, renderTypeMask, exposedFaceMask)
|
|
||||||
yield
|
|
||||||
if len(vertexBuffer):
|
|
||||||
arrays.append(vertexBuffer)
|
|
||||||
self.vertexArrays = arrays
|
|
||||||
|
|
||||||
makeFaceVertices = NotImplemented
|
|
||||||
|
@ -386,10 +386,8 @@ class SectionUpdate(object):
|
|||||||
|
|
||||||
@profiler.iterator("SectionUpdate")
|
@profiler.iterator("SectionUpdate")
|
||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
renderTypeCounts = numpy.bincount(self.blockRenderTypes.ravel())
|
|
||||||
|
|
||||||
cx, cz = self.chunkUpdate.chunk.chunkPosition
|
cx, cz = self.chunkUpdate.chunk.chunkPosition
|
||||||
cache = self.chunkUpdate.chunkInfo.worldScene.geometryCache
|
|
||||||
|
|
||||||
sectionBounds = SectionBox(cx, self.y, cz)
|
sectionBounds = SectionBox(cx, self.y, cz)
|
||||||
bounds = self.chunkUpdate.chunkInfo.worldScene.bounds
|
bounds = self.chunkUpdate.chunkInfo.worldScene.bounds
|
||||||
|
@ -54,7 +54,6 @@ class Profiler(object):
|
|||||||
finally:
|
finally:
|
||||||
self.exit()
|
self.exit()
|
||||||
|
|
||||||
#@functools.wraps
|
|
||||||
def function(self, name):
|
def function(self, name):
|
||||||
def _decorate(func):
|
def _decorate(func):
|
||||||
log.debug("Decorating %s with %s", func, name)
|
log.debug("Decorating %s with %s", func, name)
|
||||||
|
@ -11,9 +11,7 @@ from mceditlib.block_copy import copyBlocksIter
|
|||||||
from mceditlib.operations.block_fill import FillBlocksOperation
|
from mceditlib.operations.block_fill import FillBlocksOperation
|
||||||
from mceditlib.blocktypes import pc_blocktypes
|
from mceditlib.blocktypes import pc_blocktypes
|
||||||
from mceditlib.selection import BoundingBox
|
from mceditlib.selection import BoundingBox
|
||||||
from mceditlib import nbt
|
|
||||||
from mceditlib.findadapter import findAdapter
|
from mceditlib.findadapter import findAdapter
|
||||||
from mceditlib.levelbase import matchEntityTags
|
|
||||||
from mceditlib.multi_block import getBlocks, setBlocks
|
from mceditlib.multi_block import getBlocks, setBlocks
|
||||||
from mceditlib.schematic import SchematicFileAdapter
|
from mceditlib.schematic import SchematicFileAdapter
|
||||||
from mceditlib.util import displayName, chunk_pos, exhaust, matchEntityTags
|
from mceditlib.util import displayName, chunk_pos, exhaust, matchEntityTags
|
||||||
|
Reference in New Issue
Block a user