fix null field of asset index of 1.7.2

This commit is contained in:
huanghongxun 2015-07-13 13:11:01 +08:00
parent 2434e069f5
commit c321cb5f91
4 changed files with 12150 additions and 2 deletions

1
.gitignore vendored
View File

@ -14,7 +14,6 @@ hs_err_pid*
.gradle
.nb-gradle
*.map
*.bat
*.log
.mine*

4294
HMCL/obfuscate_2.3.3.map Normal file

File diff suppressed because it is too large Load Diff

View File

@ -129,10 +129,11 @@ public class MinecraftLoader extends AbstractMinecraftLoader {
try {
AssetsIndex index = (AssetsIndex) C.gson.fromJson(FileUtils.readFileToString(indexFile, "UTF-8"), AssetsIndex.class);
if (index == null) return assetsDir;
if (index.isVirtual()) {
int cnt = 0;
HMCLog.log("Reconstructing virtual assets folder at " + virtualRoot);
int tot = index.getFileMap().entrySet().size();
int cnt = 0;
for (Map.Entry entry : index.getFileMap().entrySet()) {
File target = new File(virtualRoot, (String) entry.getKey());
File original = new File(new File(objectDir, ((AssetsObject) entry.getValue()).getHash().substring(0, 2)), ((AssetsObject) entry.getValue()).getHash());

7854
HMCSM/obfuscate_0.8.6.map Normal file

File diff suppressed because it is too large Load Diff