Make chunk.py check for blocks that need pseudo ancil data and call generate_pseudo_ancildata.
This commit is contained in:
7
chunk.py
7
chunk.py
@@ -456,6 +456,8 @@ class ChunkRenderer(object):
|
|||||||
(up_left_blocks[x,15,z] == blockid if y == 0 else blocks[x,y - 1,z] == blockid)
|
(up_left_blocks[x,15,z] == blockid if y == 0 else blocks[x,y - 1,z] == blockid)
|
||||||
): return 16
|
): return 16
|
||||||
|
|
||||||
|
else: return None
|
||||||
|
|
||||||
def _hash_blockarray(self):
|
def _hash_blockarray(self):
|
||||||
"""Finds a hash of the block array"""
|
"""Finds a hash of the block array"""
|
||||||
if hasattr(self, "_digest"):
|
if hasattr(self, "_digest"):
|
||||||
@@ -654,6 +656,7 @@ class ChunkRenderer(object):
|
|||||||
rendered, and blocks are drawn with a color tint depending on their
|
rendered, and blocks are drawn with a color tint depending on their
|
||||||
depth."""
|
depth."""
|
||||||
blocks = self.blocks
|
blocks = self.blocks
|
||||||
|
pseudo_ancildata_blocks = set([85])
|
||||||
|
|
||||||
if cave:
|
if cave:
|
||||||
# Cave mode. Actually go through and 0 out all blocks that are not in a
|
# Cave mode. Actually go through and 0 out all blocks that are not in a
|
||||||
@@ -704,6 +707,10 @@ class ChunkRenderer(object):
|
|||||||
# also handle furnaces here, since one side has a different texture than the other
|
# also handle furnaces here, since one side has a different texture than the other
|
||||||
ancilData = blockData_expanded[x,y,z]
|
ancilData = blockData_expanded[x,y,z]
|
||||||
try:
|
try:
|
||||||
|
if blockid in pseudo_ancildata_blocks:
|
||||||
|
|
||||||
|
pseudo_ancilData = self.generate_pseudo_ancildata(x,y,z,blockid)
|
||||||
|
ancilData = pseudo_ancilData
|
||||||
t = textures.specialblockmap[(blockid, ancilData)]
|
t = textures.specialblockmap[(blockid, ancilData)]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
t = None
|
t = None
|
||||||
|
|||||||
Reference in New Issue
Block a user