compute a fake whiteLight array depending on the level's size
This commit is contained in:
parent
5400691294
commit
0f70421fde
12
mclevel.py
12
mclevel.py
@ -366,8 +366,8 @@ class MCLevel:
|
|||||||
presentChunks = property(getPresentChunks)
|
presentChunks = property(getPresentChunks)
|
||||||
|
|
||||||
def getChunk(self, cx, cz):
|
def getChunk(self, cx, cz):
|
||||||
if not hasattr(self, 'whiteLight'):
|
#if not hasattr(self, 'whiteLight'):
|
||||||
self.whiteLight = array([[[15] * self.Height] * 16] * 16, uint8);
|
#self.whiteLight = array([[[15] * self.Height] * 16] * 16, uint8);
|
||||||
|
|
||||||
class FakeChunk:
|
class FakeChunk:
|
||||||
def load(self):pass
|
def load(self):pass
|
||||||
@ -375,8 +375,12 @@ class MCLevel:
|
|||||||
|
|
||||||
f = FakeChunk()
|
f = FakeChunk()
|
||||||
f.Blocks = self.blocksForChunk(cx, cz)
|
f.Blocks = self.blocksForChunk(cx, cz)
|
||||||
f.BlockLight = self.whiteLight
|
|
||||||
f.SkyLight = self.whiteLight
|
whiteLight = zeros_like(f.Blocks);
|
||||||
|
whiteLight[:] = 15;
|
||||||
|
|
||||||
|
f.BlockLight = whiteLight
|
||||||
|
f.SkyLight = whiteLight
|
||||||
f.root_tag = TAG_Compound();
|
f.root_tag = TAG_Compound();
|
||||||
|
|
||||||
return f
|
return f
|
||||||
|
Reference in New Issue
Block a user