Make ResourceLoader.blockTexturePaths only return each path once.

Having a 1.7 and a 1.8 jar in the path returns paths twice, and a resource pack returns them again.
This commit is contained in:
David Vierra 2015-04-16 17:25:48 -10:00
parent 2589b07c77
commit 0ef44587ab

View File

@ -42,7 +42,11 @@ class ResourceLoader(object):
yield name
def blockTexturePaths(self):
seen = set()
for zf in self.zipFiles:
for name in zf.namelist():
if name in seen:
continue
seen.add(name)
if re.match(r'assets/\w+/textures/blocks/.*\.png$', name):
yield name