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:
parent
2589b07c77
commit
0ef44587ab
@ -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
|
||||
|
Reference in New Issue
Block a user